Shopify CLI deploy Heroku -- page unresponsive

Topic summary

Issue: A Shopify CLI Node app deployed to Heroku renders inside Shopify Admin but is completely unresponsive. Opening the app URL directly shows “https:undefined…” errors, and the browser console reports “AppBridgeError: APP::ERROR::INVALID_CONFIG: apiKey must be provided,” suggesting environment variables aren’t being read.

What was configured: Heroku config vars set (SHOPIFY_API_KEY, SHOPIFY_SECRET_KEY, scopes, host, shop). App URL and whitelisted redirect URL updated to the Heroku domain.

Key finding/resolution: Several users report it starts working only after making an initial commit and running “git push heroku master” in addition to “shopify deploy heroku.” This indicates the deploy step alone didn’t propagate the code/config as expected.

Debugging tips shared:

  • Log process.env.SHOPIFY_API_KEY on Heroku to confirm it’s present.
  • If push says “up to date,” inspect .gitignore (files may not be committed/deployed).

Open questions/remaining issues: One user still affected suspects the HOST env var; no confirmed value was provided. Another asks why a manual “git push heroku master” is necessary and whether it’s documented. Status: partially resolved; cause and documentation remain unclear.

Summarized with AI on February 16. AI used: gpt-5.

My memory on this is really foggy as this was months ago, but I recall when I created a Rails app using shopify CLI and deployed to heroku, I needed to also make sure I manually added the environment variables in the Heroku interface.