Our community is looking for talented writers who are passionate about our ecosystem (jamstack, open-source, javascript) and willing to share their knowledge/experiences through our Write for the community program.
Hello, I followed the instructions provided in the tutorial, but after i deploy it to Heroku and click view it just shows the âApplication errorâ screen.
Checking the logs shows me H10 error codes which means that the application crashes. I tried numerous times with projects in both Europe and the U.S servers but the result is the same. I havenât altered anything in my strapi and followed the tutorial step-by-step. Is there any way to fix this?
2022-02-05T14:40:57.887822+00:00 heroku[web.1]: Process exited with status 1
2022-02-05T14:40:57.994003+00:00 heroku[web.1]: State changed from starting to crashed
2022-02-05T14:40:59.282556+00:00 heroku[router]: at=error code=H10 desc=âApp crashedâ method=GET path="/" host=
I have tried deploying my project to Heroku and got this error have anyone have a solution
remote: ModuleNotFoundError: Module not found: Error: Canât resolve â@strapi/design-system/Carouselâ in â/tmp/build_7a488f6f/node_modules/@strapi/plugin-upload/admin/src/components/MediaLibraryInput/Carouselâ
I have followed this tutorial but my information is not saved to db and I have to create all the content anew after pushing updates to schema/collections from GH. Also, I cannot get API access to the content, which is really frustrating, lol.
You can fix this issue by adding app keys for your production deployment. You can add it to your heroku config vars:
In heroku, go to your app â settings â config vars
Add a new variable with the name APP_KEYS and for values, a comma seperated list of secure keys, e.g secure1,secure2. But use actually secure randomly generated strings
The app should automatically redeploy when updating the config vars if you turned on automatic deploys, if not deploy manually and that should work
For anyone whoâs still having this issue as of March 2022, the official Strapi v4 docs have not been updated to support the fix. The following solution worked to fix my issue, the same as OPâs.
Per @iamjulianâs answer (via StackOverflow), here is a specific example of how I solved this with two randomly generated secret keys.
On my Mac, I ran the following terminal command a total of 2 times. This command generates a random alphanumeric string thatâs 16 characters long. (Running this twice gives you two different random strings.) Example output: afe7405d67f206b6
openssl rand -base64 8 | md5 | head -c16; echo
With your 2 keys (e.g. afe7405d67f206b6 and 63e90c0711630990), add a new Heroku Config Var to your app with key: APP_KEYS, value: (your two secret keys separated by a comma , (no space), e.g. afe7405d67f206b6,63e90c0711630990
In your config/env/production/server.js file, here is an example of how this will look:
Iâll leave the true reasoning behind why this works for someone who actually understands it. It seems to me that entering these secret keys directly into the codebase completely nullifies any sense of secrecy for these keys⌠Maybe weâre supposed to add config/env/* to our .gitignore?
At the end of the day, it works. However, at very least, this absolutely should be in the official Strapi v4 docs for Heroku deployments. To whomever on the Strapi team is responsible for this: please consider updating the docs to include this (or a different, officially supported solution).
Thanks to everyone who contributed to this answer!
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command heroku logs --tail
the installation documents is a complete problem, we have tried it on different platforms such as google engine, heroku, aws and it is a total problem, the documentation is not correct, we lost a week of the whole team trying to install it, and we found a solution a lot more effective calling the information from the database in json, it is much more flexible and scalable, even wordpress with woocommer is much easier to use and scale, strapi is going to stop being used because of how complex it is to install on servers and not very scalable. there are better technologies like firebase.
If anyone else is using Strapi v4.1.8 and is getting error with missing jwtSecret, just downgrade strapi dependencies in package.json to 4.1.7, delete yarn.lock and package-lock.json and deploy it again to heroku⌠Just spent 3 hours to find a solution for thisâŚ
Depending on the version of Strapi you started with, and if you push your local secrets to Heroku, make sure there is no space in the JWT admin key in the .env file. If there is your env variables in Heroku will not be populated correctly.