-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Connectivity in local instance #364
Comments
Hi, @davinci07. Thanks for the report. As you mentioned, the switch to POST instead of GET for the database queries changed quite a bit. One of the side effects was requiring the use of the proxy server. Are you using the proxy server in your setup? |
Ah, I was not. I tried to make a connection with proxy.py to my Neptune instance earlier but was unsuccessful. I'll adjust today and see if that fixes it. If you have any recommendations on how to setup one, that would be greatly appreciated. |
Typically, I would tell you to go read the development guide. However, it seems to be a bit out of date and lacking some detail. I'll make a note to get this updated. For now, here are the basics. Feel free to ask for clarification on anything. Make sure your code is updatedgit checkout main
git pull Ensure you are running the correct Node versionWe are using v20 now. If you are using NVM, you can simply do: nvm use Otherwise, use whatever method you use to install Node v20. Enable CorepackWe use Corepack to ensure the package manager used for the project is consistent. corepack enable Run the appInstall the dependencies and start the servers. pnpm install
pnpm start Open the appLaunch your web browser of choice and navigate to
Connect to databaseAt this point, Graph Explorer should be successfully running and it is asking you for connection details. This part is specific to your personal setup. To ensure the proxy server is configured to be used, here are a few guidelines.
![]() |
Hi @kmcginnes, thank you for the advice for how to best do the updates. After I got the code up to date I tried a few variations including your initial recommendation for the connection, a CORS extension for Firefox, and a proxy.py in the attached screenshots, however I still was not able to connect and received the following errors regardless of the variation. Do you know if this a CORS setting I need to change in Firefox? I tried in Chrome as well with the same results. |
From what I can tell you seem to be doing everything right. Let's try a few things to see if we can narrow the scope of the issue.
|
@davinci07 Can you copy the CORS error from the browser and paste the full text as a comment here? Feel free to scrub any private URLs. I'm just curious about the exact message. |
Yes here are the errors I received with the updated pull: CORS: POST: GET: [Summary API] TypeError: Console: |
Hi @kmcginnes I seemed to have solved the issue in the following manner for WSL: Using:
Setup for G-E:
This should return everything correctly. No need for a proxy-server since its built into G-E but it needs the changes in packages/graph-explorer-proxy-server/node-server.js |
That's great news! I'm glad you figured it out. In hindsight, it makes sense that port 80 must've been used by another service. I believe we should move Graph Explorer off the assumption that port 80 will be open for any developer running Graph Explorer locally. I'll add an issue for this change. I'd like to know more about the access control change you made.
My line numbers don't align with yours since we seem to be using different versions of the code. Can you link within GitHub to the line of code you changed? Or better yet, make a small example branch with the changes you made. |
Yes, here is the link:
The headers within this line should be more like:
This fixed any of the CORS issues within Firefox and Chrome so it should help |
That's an interesting result. I admit that my understanding of CORS is limited, but from what I'm reading, adding a There seems to be a few allowed header options on the request side, but you are not using these and it works. Very confusing. Additionally, we are enabling CORS pre-flight checks in Express middleware, which should handle these things for us.
@davinci07 would you mind trying one more thing and commenting out the new header you added to the request for |
Huh... interesting. That seemed to have worked with and without the header change. CORS issues that were encountered earlier in Firefox/Chrome have disappeared even though using proxy-servers. Seems like the change in the ports/port forwarding was the necessary fix for local. Feel free to close this issue! |
@davinci07 That's great news! 🎉 Thanks for letting me know. |
##Community Note
Description
I am trying to create a local instance of the graph-explorer on my machine (not docker because I have a forked branch with some custom features) to connect to my Neptune graph-database after updating a version of the G-E from 1.2.0 to 1.5.x (synced up to this PR. Previously I was able to access the graph database on a local instance of the graph-explorer on windows with
npm run start
and opening an SSH tunnel to the Neptune instance. However, with the upgrade I have not been able to access the database at all and ran into some network issue. with the change to POST when fetching from /gremlin but not frompg/statistics/summary?mode=detailed
. This seems to be similar to this issue but there wasn't any issue with the size of the graph in the 1.2.0 instance.Environment
Steps to Reproduce
npm i
in /packages/graph-explorer and /graph-explorerssh -i <pem file> -N -L 8182:<neptune endpoint>:8182 <ec2 instance that port forwards neptune data>
https://localhost:8182
Expected Behavior
This should be providing the connection after port forwarding and not have issues to the
gremlin
request at startThe text was updated successfully, but these errors were encountered: