Default APP using Shopify CLI not working in default Heroku deployment

Solved
fversolatto
Tourist
6 0 3

I've developed a full application created using Shopify CLI and it works fine in ngrok (using my local environment), but deploying in Heroku using the default deployment model presented in docs the application didn't even start.
PS: I've setup all keys in Heroku as .env file.

Just for test, I created the default APP (that one created using shopify create command) and did the same process... no success at all.

Could you please show me a direction?

 

I'm using the follow versions of Node/NPM
√ node v14.16.1
√ npm 6.14.12

 

Follow the Heroku's log

2021-09-03T20:21:47.795087+00:00 app[web.1]: npm ERR! 
2021-09-03T20:21:47.795190+00:00 app[web.1]: npm ERR! Failed at the shopify-app-node@1.0.0 start script.
2021-09-03T20:21:47.795301+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-09-03T20:21:47.798885+00:00 app[web.1]: 
2021-09-03T20:21:47.798977+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-09-03T20:21:47.799051+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2021-09-03T20_21_47_795Z-debug.log
2021-09-03T20:21:47.849318+00:00 heroku[web.1]: Process exited with status 1
2021-09-03T20:21:47.954985+00:00 heroku[web.1]: State changed from starting to crashed
2021-09-03T20:22:05.413289+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/?hmac=80689a7c1c4c038c6c359d4e641faa726420d60c7ebbd31826a0be67ddf77460&shop=fabio-development-test.myshopify.com&timestamp=1630700524" host=helloworldshopify.herokuapp.com request_id=211d417f-032d-41b4-b36a-7379b707b2a2 fwd="186.204.111.175" dyno= connect= service= status=503 bytes= protocol=https
2021-09-03T20:22:06.314530+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=helloworldshopify.herokuapp.com request_id=de13a58f-c9f2-41df-8c9f-64a1a3e8a20c fwd="186.204.111.175" dyno= connect= service= status=503 bytes= protocol=https

 

 

awwdam
Shopify Staff
Shopify Staff
154 22 14

Hey @fversolatto, just wanted to connect and pass on this GitHub - Start Guide as a starting point. It covers specific steps for setup when using shopify_app and deploying to Heroku! - Cheers!

awwdam | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes
fversolatto
Tourist
6 0 3

Hi @awwdam !!!

Thanks for your reply !!!!

I did exactly what you mention, by the way still not working

The only difference between you sample and mine is the plattforme: the one you sent is using rails and mine is node based (I'm using de default delivered by Shopify CLI).

Do you have any idea in how can I fix it?

My bests regards !!!

awwdam
Shopify Staff
Shopify Staff
154 22 14

This is an accepted solution.

Hey @fversolatto,

Thanks for getting back. Looking here again, two of the lines you shared stood out:

1.  npm ERR! /app/.npm/_logs/2021-09-03T20_21_47_795Z-debug.log - if you haven't already, I would start by checking those logs and then reviewing this troubleshooting guide.

2. npm ERR! Failed at the shopify-app-node@1.0.0 start script - this lead me to a reference of npm dependency issue in shopify-app-node (GitHub repo) that might be worth exploring.

Otherwise, working through some other common troubleshooting steps like: updating versions for CLInode and npm - (node LTS is currently 14.17.6 and includes npm 6.14.15) or running npm cache clean  may help rule out local factors. Past that, for errors and more technical questions regarding the Shopify CLI directly, this GitHub repo (CLI) is going to be a good place to post! If you can't find an open issue that is directly related to what you are seeing (or asking), feel free to create a new one and include as much detail as possible.


Hope all of this helps point you in the right direction - Cheers!

awwdam | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

fversolatto
Tourist
6 0 3

Hi @awwdam !!!

 

Thank you for your time, your answers and for your attention!!!

 

My best !