question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Server works locally but not on Heroku after following all given steps

See original GitHub issue

Intended Outcome:

I made a server using GraphQL and Apollo that works locally, and would expect that when I add the needed changes (a Procfile, Environment variables, etc), and try to deploy it to Heroku, it would work.

Actual Outcome:

The server code works locally, for example, on localhost:4000, but when on Heroku, it deploys successfully but then the GraphQL Playground says that the Server cannot be reached, and in the right hand, results side of the page, it shows “error”: “Failed to fetch schema. Please check your connection”

How to Reproduce the Issue:

You can see the problem here- http://vr-test-server.herokuapp.com/ If you want to pull the code itself, for local and for production, the repository can be cloned by git clone https://github.com/Naman-Goyal/VRUncannyValleyServer.git

The project can be built by running npm install, and run by npm start

The local version of the server is on the “Local” branch The production version of the server that is set up to push to heroku is on the “Production” branch

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
kala-goyalcommented, Sep 25, 2018

Thank you so much! It’s working now.

1reaction
surajkrishancommented, Mar 29, 2021

i tried passing both values to true i.e { playground : true, introspection: true } not working for me 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting Node.js Deploys - Heroku Dev Center
Your Node.js deploy failed - now what? Start with these simple steps to troubleshoot a build issue. Check the buildpack. Is the app...
Read more >
Heroku Node.js App Works Locally but not when deployed
Edit: here is my client side Angular code that is making a call to the server: var deferred = $q.defer(); function thisUserCreated(id) {...
Read more >
App works locally but crashes on Heroku [Solved] - JavaScript
Everything works fine locally but crashes when deployed to heroku. I've changed the port that I'm listening to from 3000 to process.env.
Read more >
How to Make Changes to The Application Deployed on Heroku
Step 1: Download and install Heroku CLI. Heroku CLI can easily be downloaded and installed by the following the steps given here. Make...
Read more >
Deploy with Heroku and MySQL | The Full-Stack Blog
In development, we get to use our local SQL servers for storing our ... but that won't work with a deployed application, since...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found