skip to Main Content

I am trying to create a Shopify public app with firebase database. All working with local but not authenticating with Heroku. It’s deploying fine but not loading the app (showing application error)

enter image description here

On log it will showing some error like

enter image description here

I’m following these tutorial https://medium.com/code-undefined/how-to-deploy-your-shopify-react-app-to-heroku-5dbc5a51738

Here is my server.js
https://github.com/amit-codeking/notification-bar/blob/master/server/server.js

Thanks in advance for you help!

2

Answers


  1. The app is looking for the API_SECRET_KEY config value to be defined, but it is not. This is causing the params.API_SECRET_KEY.length line to error, as it cannot call .length on params.API_SECRET_KEY due to it resolving as undefined.

    You can follow the Heroku documentation to add this config value to your Heroku app. It seems as though the blog has it mislabeled as SHOPIFY_API_SECRET_KEY so you may just need to rename that config value to match what your application is expecting. You may hit the same error with SHOPIFY_API_KEY just being API_KEY as well, so be on the look out.

    heroku config:set API_SECRET_KEY whateverYourKeyIs
    
    Login or Signup to reply.
  2. The correct config vars are:

    SHOPIFY_API_KEY

    SHOPIFY_API_SECRET

    I furthermore had to configure HOST and SCOPES.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search