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.
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=“184.108.40.206” 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=“220.127.116.11” dyno= connect= service= status=503 bytes= protocol=https
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:
"message": "Failed to fetch",
"stack": "TypeError: Failed to fetch