shopify-api-js icon indicating copy to clipboard operation
shopify-api-js copied to clipboard

Node React API Shopify App Installation

Open shopify-development-code opened this issue 3 years ago • 6 comments

TypeError: Cannot read properties of undefined (reading 'map') at new AuthScopes (/var/www/html/productOptions/node_modules/@shopify/shopify-api/dist/auth/scopes/index.js:15:14) at AuthScopes.equals (/var/www/html/productOptions/node_modules/@shopify/shopify-api/dist/auth/scopes/index.js:40:21) at /var/www/html/productOptions/node_modules/@shopify/koa-shopify-auth/dist/src/verify-request/verify-token.js:24:79 at step (/var/www/html/productOptions/node_modules/tslib/tslib.js:133:27) at Object.next (/var/www/html/productOptions/node_modules/tslib/tslib.js:114:57) at fulfilled (/var/www/html/productOptions/node_modules/tslib/tslib.js:104:62) at processTicksAndRejections (node:internal/process/task_queues:96:5)

You'll probably need to provide a little more background/context than just a single error message.

limeforadime avatar Mar 05 '22 04:03 limeforadime

@ShikhaPant did u find a fix ??, i'm having the same issue.

ismailalabou avatar Sep 20 '22 22:09 ismailalabou

There's not a lot of context provided but it might be there aren't any scopes being provided to the Shopify.Context during initialization, or not provided in the correct format. It should be either a comma-separated string (e.g., 'read_products, write_products') or an array of strings (e.g., ['read_products', 'write_products']).

mkevinosullivan avatar Sep 21 '22 14:09 mkevinosullivan

There's not a lot of context provided but it might be there aren't any scopes being provided to the Shopify.Context during initialization, or not provided in the correct format. It should be either a comma-separated string (e.g., 'read_products, write_products') or an array of strings (e.g., ['read_products', 'write_products']).

mine are like this: image

ismailalabou avatar Sep 21 '22 16:09 ismailalabou

and this is my frontend error message & devtool console errors: image image

ismailalabou avatar Sep 21 '22 16:09 ismailalabou

There's not enough information here, or background.

  1. how was the app created? (e.g. using the CLI, copying a template, ...?)
  2. are you using the Shopify CLI to run the app during development?
  3. for the console messages, what are the corresponding URLs, requests, responses that are causing those messages
  4. how/when does the error occur? please provide the steps that lead to this error.

For the given FE error message, what is the shop= parameter in the URL?

mkevinosullivan avatar Sep 21 '22 17:09 mkevinosullivan

There's not enough information here, or background.

  1. how was the app created? (e.g. using the CLI, copying a template, ...?)
  2. are you using the Shopify CLI to run the app during development?
  3. for the console messages, what are the corresponding URLs, requests, responses that are causing those messages
  4. how/when does the error occur? please provide the steps that lead to this error.

For the given FE error message, what is the shop= parameter in the URL?

  1. using the cli
  2. no the app is hosted by Heroku, production.
  3. when app first loads

the shop= parameter in the URL is the dev store i'm trying to test the app on

P.S: i'm using the old deprecated shopify app node template (next.js/koa.js)

ismailalabou avatar Sep 22 '22 16:09 ismailalabou

This issue is stale because it has been open for 90 days with no activity. It will be closed if no further action occurs in 14 days.

github-actions[bot] avatar Nov 22 '22 02:11 github-actions[bot]

@ismailalabou Will you be able to migrate to v6 of the this library? I believe it could help solving your problem. I will close this issue since you are using deprecated template. If it happens to you again with v6 of the shopify-api-js library, feel free to reopen this issue.

cquemin avatar Jan 12 '23 17:01 cquemin