Repository navigation
Description
Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Dashboard!
- [ YEP] You're running version >=1.0.18 of Parse Dashboard.
- [YEP ] You're running version >=2.2.18 of Parse Server.
- [TO THE BEST OF MY KNOWLEDGE ] You've searched through existing issues. Chances are that your issue has been reported or resolved before.
Environment Setup
Hi,
I have searched through the listed issues, trying various solutions but nothing I have tried seems to work.
Okay so, I have a Parse Server which is up an running on Heroku, using the MongoDB add on. This part works absolutely fine. I have setup the config vars in Heroku using the process.env parameters
Trying to use the Parse Dashboard is where the problems occur. I have created a new app on Heroku and am trying to point it at the the app. I'm not experienced, in anyway with server hosting etc, so please bare with me. I believe I am using it as 'middleware'
The setup for the Dashboard app index.js file looks as such:
var express = require('express');
var ParseDashboard = require('parse-dashboard');
var path = require('path');
var allowInsecureHTTP = process.env.PARSE_DASHBOARD_ALLOW_INSECURE_HTTP || 'true'
var dashboard = new ParseDashboard({
apps: [
{
appId: process.env.PARSE_DASHBOARD_APP_ID || 'myAppId',
masterKey: process.env.PARSE_DASHBOARD_MASTER_KEY || 'myMasterKey',
serverURL: process.env.PARSE_DASHBOARD_SERVER_URL || 'http://localhost:1337/parse',
appName: process.env.PARSE_DASHBOARD_APP_NAME || 'MyApp',
javascriptKey: process.env.PARSE_DASHBOARD_JAVASCRIPT_KEY || 'NOT USED',
production: process.env.PARSE_DASHBOARD_PRODUCTION || 'true'
},
],
users: [
{
user: process.env.PARSE_DASHBOARD_USER_ID || 'user1',
pass: process.env.PARSE_DASHBOARD_USER_PASSWORD || 'pass'
},
],
}, allowInsecureHTTP);
var app = express();
app.enable('trust proxy');
// make the Parse Dashboard available at /
app.use('/', dashboard);
var port = process.env.PORT || 4040;
var httpServer = require('http').createServer(app);
httpServer.listen(port, function() {
console.log('parse-dashboard-example running on port ' + port + '.');
});
The code compiles fine and is pushed to the git repo on my Heroku application
However, when I click the open app button, I get the following screen
It says the server is unreachable
Steps to reproduce
I'm not too sure how to reproduce - I have a Parse Server running on MongoDB through Heroku on it's own application
I have the Parse Dashboard running on it's own application and I am trying to point it at the database
Logs/Trace
Note: If you get a browser JS error please run npm run dev. This will provide source maps and a much more useful stack trace.
2016-09-07T12:17:32.400889+00:00 heroku[router]: at=info method=GET path="/" host=dashboard-miref.herokuapp.com request_id=590d7b71-37c7-435a-a7b2-ad8081394fe5 fwd="31.49.28.44" dyno=web.1 connect=0ms service=14ms status=304 bytes=146
2016-09-07T12:17:32.438191+00:00 heroku[router]: at=info method=GET path="/bundles/dashboard.bundle.js" host=dashboard-miref.herokuapp.com request_id=5f6c2186-4e35-4290-8b7c-f9703d1d86ec fwd="31.49.28.44" dyno=web.1 connect=0ms service=7ms status=304 bytes=240
2016-09-07T12:17:32.500089+00:00 heroku[web.1]: Process exited with status 143
2016-09-07T12:17:32.662113+00:00 heroku[router]: at=info method=GET path="/parse-dashboard-config.json" host=dashboard-miref.herokuapp.com request_id=efe2f13b-084e-4732-b138-5d39740cb9aa fwd="31.49.28.44" dyno=web.1 connect=1ms service=6ms status=200 bytes=484
2016-09-07T12:17:35.745295+00:00 heroku[router]: at=info method=GET path="/bundles/sprites.svg" host=dashboard-miref.herokuapp.com request_id=aeec261f-f517-448f-850a-3c3ba8cbff48 fwd="31.49.28.44" dyno=web.1 connect=1ms service=3ms status=304 bytes=239

Activity
flovilmart commentedon Sep 7, 2016
You should set the public server URL for your parse-server, now it looks like it's pointing to 'http://localhost:1337/parse'
PauloxD commentedon Sep 7, 2016
I have setup a config variable in the dashboard settings section that points to the server's url
flovilmart commentedon Sep 7, 2016
Not sure how heroku works, but it's very likely that the contents of that variable don't point to the right server.
If you try to replace that whole line with:
PauloxD commentedon Sep 7, 2016
I have also just tried hard coding it.
It didn't like that either
flovilmart commentedon Sep 7, 2016
Does it work locally connecting with your remote heroku server? It's very unlikely to be a problem with parse-dashboard itself but a configuration error.
PauloxD commentedon Sep 7, 2016
To be honest, I haven't tried and am unsure on how to do it. If you would like me to try, I am happy to do so, but could you give me some instruction (please not just a link to the readme file)
flovilmart commentedon Sep 7, 2016
You haven't tried to run parse-dashboard locally? Is your parse-server running and accessible?
PauloxD commentedon Sep 7, 2016
No. I simply downloaded the repo. updated the information and pushed it to my Heroku application.
The Parse Server works fine, I can send and receive information from it, on both REST and iOS formats
flovilmart commentedon Sep 7, 2016
So if the parse-server work fine, this is very likely that the URL is wrong. I can't help more than that without seeing the configuration.
Also, everything you need to know to run/deploy should be in the README.
PauloxD commentedon Sep 7, 2016
Here is a screenshot of the config variables
Update: Removed Screen shot as it showed some information that I didn't want public
flovilmart commentedon Sep 7, 2016
You should use HTTPS to connect to your heroku server, as you're transmitting the masterKey over HTTP, anyone could be able to steal it :)
PauloxD commentedon Sep 7, 2016
I read somewhere that this is not required as Heroku hides itself. But I will try changing it to HTTPS and let you know
PauloxD commentedon Sep 7, 2016
Um I feel like a complete dimwit now,
Simply changing the url to https: worked like a charm. Thank you Sir