I followed the tutorial up until the step to deploy the client. My production server is running and I’m able to query it. I added my production URL to the client code and deployed it to my repository and Heroku, but currently seeing this:
In my inspector tools, Console tab I also see the error messageBlocked a frame with origin "https://xia-client-catstronauts.herokuapp.com" from accessing a frame with origin "https://www.herokucdn.com". Protocols, domains, and ports must match.
I have the same problem. I finished the lift off. the application worked for a while and suddenly I have the same error even tho I didnt make any changes. Locally it works without any problem.
Also I have a problem with installing dependencies at full stack tutorial and side quest with authentication. after saying npm install it gives me like 200 rows of errors and I dont understand it at all from what I think there is some problem with an sqlite3 dependency because it leads to some url from where it should download the dependency probably and the url throws an error not found. So it will never install packages.
I will open a new one Thanks. It shows me this
2022-08-26T16:19:54.576217+00:00 heroku[router]: at=error code=H10 desc=“App crashed” method=GET path=“/favicon.ico” host=client-catstronauts-test.herokuapp.com request_id=30710e66-9e6f-49d4-800b-1308d138f361 fwd=“37.48.35.250” dyno= connect= service= status=503 bytes= protocol=https
@Pavel_Hajduch I also have the same error message:
2022-08-26T17:00:46.759587+00:00 heroku[router]: at=error code=H10 desc=“App crashed” method=GET path=“/favicon.ico” host=xia-client-catstronauts.herokuapp.com request_id=4db41246-fa6f-4e28-b99a-333585440a9a fwd=“137.220.78.79” dyno= connect= service= status=503 bytes= protocol=https
I’ll need to investigate more what has changed since the course (it looks like the course was using ApolloServer 3.0.2 while yours uses 3.10).
In the meantime, it looks like you added cors config which got your Studio connection working. Can you try updating the below code snippet to point to your client URI instead of your server?
Now I can see in the logs for my client that it starts up rather than crashing straight away, and I am getting a HTTP status code of 200 now.
In the browser I now see the Catstronaut page with no content displayed like in my local environment, it just shows the error message ERROR: Load failed
No slash at the end of the client URL! I have encountered this before and it was definitely frustrating!! With that, it should fix your issues with the client saying “Failed to fetch”.
Second, if your client is still crashing in the logs, you can try this suggestion another user proposed. It requires adding a new config var in Heroku: NODE_OPTIONS set to --max_old_space_size=1024.
Let me know if those work for you and thank you again for your patience!
I also want to note that I removed the cors options in my server and it still worked! So I’m not sure what the original issue was there. You can try the above suggestions, make sure they work, and then afterwards, try removing the cors options from the server as well.
Happy to continue troubleshooting with you and get this sorted!
Thank you so much for helping me, I started seeing the Catstronauts page displayed correctly after adding the new config var in Heroku: NODE_OPTIONS set to --max_old_space_size=1024 to my Apollo client.
When I removed the CORS options, the server and the client appeared to still be running, but when I used Apollo Studio Explorer to query my server it started showing this error again:
"name": "TypeError",
"message": "Failed to fetch",
"stack": "TypeError: Failed to fetch