Giter VIP home page Giter VIP logo

Comments (29)

drew-gross avatar drew-gross commented on August 31, 2024 1

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.

drew-gross avatar drew-gross commented on August 31, 2024

Did you include your parse mount point in the server URL?

from parse-dashboard.

kilabyte avatar kilabyte commented on August 31, 2024

Yup. I can even go to that url and i get the unauthorized json string

from parse-dashboard.

kilabyte avatar kilabyte commented on August 31, 2024

I got it working pointing to a heroku instance... hmmm let me give it a good look over

from parse-dashboard.

drew-gross avatar drew-gross commented on August 31, 2024

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.

kilabyte avatar kilabyte commented on August 31, 2024

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.

drew-gross avatar drew-gross commented on August 31, 2024

What version is your Parse Server?

from parse-dashboard.

kilabyte avatar kilabyte commented on August 31, 2024

2.1.4 latest just installed it today

from parse-dashboard.

drew-gross avatar drew-gross commented on August 31, 2024

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.

kilabyte avatar kilabyte commented on August 31, 2024

Same.
screen shot 2016-03-05 at 12 48 13 am

from parse-dashboard.

drew-gross avatar drew-gross commented on August 31, 2024

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.

kilabyte avatar kilabyte commented on August 31, 2024

screen shot 2016-03-05 at 1 02 15 am

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.

drew-gross avatar drew-gross commented on August 31, 2024

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.

kilabyte avatar kilabyte commented on August 31, 2024

AH sorry bout that its getting late haha.
screen shot 2016-03-05 at 1 08 47 am

screen shot 2016-03-05 at 1 07 36 am

from parse-dashboard.

drew-gross avatar drew-gross commented on August 31, 2024

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.

kilabyte avatar kilabyte commented on August 31, 2024

ya sorry thats my current config and its working i'll redo it with the local host my bad... :/

from parse-dashboard.

kilabyte avatar kilabyte commented on August 31, 2024

screen shot 2016-03-05 at 1 15 54 am
screen shot 2016-03-05 at 1 15 42 am

from parse-dashboard.

drew-gross avatar drew-gross commented on August 31, 2024

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.

kilabyte avatar kilabyte commented on August 31, 2024

nope still unreachable with that setup
screen shot 2016-03-05 at 1 22 33 am

from parse-dashboard.

drew-gross avatar drew-gross commented on August 31, 2024

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.

kilabyte avatar kilabyte commented on August 31, 2024

Server not reachable: {"code":100,"message":"XMLHttpRequest failed: "Unable to connect to the Parse API""}

from parse-dashboard.

drew-gross avatar drew-gross commented on August 31, 2024

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:

image

minus the master key of course.

from parse-dashboard.

kilabyte avatar kilabyte commented on August 31, 2024

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.

kilabyte avatar kilabyte commented on August 31, 2024

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.

drew-gross avatar drew-gross commented on August 31, 2024

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.

kilabyte avatar kilabyte commented on August 31, 2024

Ah gotcha. thanks for clearing that up and sticking through it haha 👍 👍

from parse-dashboard.

drew-gross avatar drew-gross commented on August 31, 2024

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.

kilabyte avatar kilabyte commented on August 31, 2024

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.

rmfigueirido avatar rmfigueirido commented on August 31, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.