Comments (29)
I think I see your issue. You have the dashboard and server running on the same VPS, and you are loading the dashboard from your VPS via some method that give your VPS a URL that you can access from your browser. But since your serverURL
is set to localhost
in your config file, your browser then tries to access localhost
which goes to the localhost
of the machine your browser is running on, not the localhost
of the machine your Parse Server is running on.
from parse-dashboard.
Did you include your parse mount point in the server URL?
from parse-dashboard.
Yup. I can even go to that url and i get the unauthorized json string
from parse-dashboard.
I got it working pointing to a heroku instance... hmmm let me give it a good look over
from parse-dashboard.
That sounds strange. Can you check in your browser debugger what the response is to the /serverInfo endpoint of your Parse Server?
from parse-dashboard.
So if i put in an external url i.e. not localhost it works perfect. as soon as i put in localhost with the mount point it says it can't be found. If i run /serverInfo on the parse server i get "cannot find variable serverInfo". or typed into the address bar i get "cannot GET /serverInfo"
from parse-dashboard.
What version is your Parse Server?
from parse-dashboard.
2.1.4 latest just installed it today
from parse-dashboard.
If you execute this cURL on your localhost, what is the response:
curl -X GET -H "X-Parse-Application-Id: appId" -H "X-Parse-Master-Key: masterKey" http://localhost:1337/parse/serverInfo
This will help me determine if the bug is in the dashboard or the server
from parse-dashboard.
from parse-dashboard.
You need to include the keys in your cURL. Please use the exact curl I sent you including the method and headers, but replace the mount, appId and masterKey with your mount, appId and masterKey (make sure not to include master key when you show me the results)
from parse-dashboard.
and that mount does work and is in fact working right now with my parse server but in the config i specify the full non localhost url
from parse-dashboard.
you still need the /serverInfo at the end of your URL for the curl. So if your mount point is anni
use http://localhost:1337/anni/serverInfo
Can you also paste the contents of your parse-dashboard-config.json
file, with the master keys removed?
from parse-dashboard.
AH sorry bout that its getting late haha.
from parse-dashboard.
Your parse-dashboard-config.json
file has http://parse.kilabytecloud.com:1337/anni
as your serverURL, but you say it's your localhost
server that the dashboard can't connect to. Are you sure your config file is correct?
That server response is correct, so the problem is not with the server.
from parse-dashboard.
ya sorry thats my current config and its working i'll redo it with the local host my bad... :/
from parse-dashboard.
from parse-dashboard.
That looks like it should work. Can you try removing the users, javascript key, and rest key from your config, and see if that changes anything?
from parse-dashboard.
nope still unreachable with that setup
from parse-dashboard.
OK, I guess it's time to dig into the code. Can you open dashboard/Dashboard.js
and on line 145 replace 'unable to connect to server'
with JSON.stringify(error)
and then refresh the dashboard and tell me what the new error is?
from parse-dashboard.
Server not reachable: {"code":100,"message":"XMLHttpRequest failed: "Unable to connect to the Parse API""}
from parse-dashboard.
That is what I would expect if your Parse Server was not running, but it must be running if your cURL succeeded. What URL are you accessing the dashboard on? localhost:4040
? You don't have anything in your hosts
file that lets you visit other domains but still have them be localhost
, do you? Also, can you open the Chrome Debugger, and on the Network tab, find the failing /serverInfo
request, and screenshot the info for that request? It should look something like this:
minus the master key of course.
from parse-dashboard.
Well i won't be able to make a local host request from my browser as my computer and VPS reside on different networks and i can't vpn to my vps. I'm going to send in a support request to my VPS provider in regards to referencing localhost.
from parse-dashboard.
right but the config file for the parse-server is set to localhost. and that would be correct since the file resides on the VPS its referencing itself. if parse-dash is also running on the same VPS and its config has localhost in it then it should still reference the VPS machine and not my personal local machine no diff then how parse-server is accessing localhost? or have i just lost all hope at this early morning hour haha
from parse-dashboard.
The npm run dashboard
command starts a small express app that only sends the config file and dashboard's HTML and JS to the browser, and validates your username, password, and https. Once the browser has the config file, it sends requests to the serverURL(s) in the config file. If that URL is localhost
, it will send requests to localhost
which is the localhost
of the machine the browser is running on.
from parse-dashboard.
Ah gotcha. thanks for clearing that up and sticking through it haha 👍 👍
from parse-dashboard.
No worries! I'm glad people are using the dashboard. I'm surprised at the number of people trying to deploy the dashboard to heroku or other remote services, I personally quite prefer the local experience. I'm going to open an issue to improve the heroku experience, hopefully someone will pick it up :)
from parse-dashboard.
That would be great! Im basically building both one instance on heroku and one on the VPS while i evaluate which rabbit hole to go down.
from parse-dashboard.
Im with the same problem, i have a VPS with the dashboard and parse server, i changed my config.json and my index.html removing the localhost with my server ip but the problem persist :C whats the solution of this problem?
from parse-dashboard.
Related Issues (20)
- Config page is blank HOT 4
- Add support for node 20 HOT 3
- Copy a CLP of one Class to another HOT 1
- Add text filters like "starts with" for Pointers HOT 1
- Selected app isn't in sidebar app list HOT 4
- Dashboard scrolls when selecting row in data browser HOT 5
- Select rows by pressing and dragging cursor over checkboxes HOT 3
- clicking "Class Level Permissions" gives error "TypeError: ce.current is null" HOT 1
- Add configuration store on server HOT 1
- When deleting all code in the JS Console editor the default code gets filled in again HOT 1
- Cloud Config date converts to object HOT 1
- Reload Cloud Config param before updating HOT 1
- Add atomic update for Cloud Config parameter HOT 1
- feat: clean up dependencies and switch some dependencies to dev deps HOT 1
- Add page size and current page index to data browser HOT 12
- Descriptive stats not showing HOT 3
- Crash after setting the filter using context menu and opening filters panel HOT 1
- Dynamic master key HOT 1
- Add graph visualization for selected cells in data browser HOT 2
- Filter string is erased when changing filter condition HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parse-dashboard.