Issue with Updating Scopes for Staging App Version on Shopify

Solved

Issue with Updating Scopes for Staging App Version on Shopify

AncleMarvel
Shopify Partner
2 0 3

Hello Shopify Community,

I've encountered a perplexing issue while trying to update the access scopes for my application across different deployment environments (dev, staging, production). Here's a detailed breakdown of the problem:

  • My production app, which is already live and listed in the Shopify store, needed a new feature that requires the read_customers scope.
  • To test this, I added the rule to the access_scopes in the config for my staging version and pushed these changes using the Shopify CLI.
  • Despite these updates, Shopify keeps responding that I lack the necessary access for the read_customers scope in my staging environment, although the process seemed to succeed without errors.

Here are the steps I followed:

 

  1. Ran npm run shopify app config link, selected my organization and app version, which created the shopify.app.staging.toml file.
  2. Executed npm run shopify app config push -- --config staging and reinstalled the app.
  3. No errors were reported, and I verified that the altered data is being fetched.

Notably, the dev version of the app doesn't have this problem, and the required scope shows up correctly in the app settings in the Shopify store.

I'm trying to understand why the scope update is not reflecting correctly for the staging environment despite following the necessary procedures. Is there something I'm missing in the update process, or could this be an issue with the Shopify platform or CLI?

Any insights, suggestions, or similar experiences are welcome. Thank you in advance for your help!

Accepted Solution (1)
GrackleBird
Shopify Partner
13 1 3

This is an accepted solution.

@RafayBetalogics Actually the issue for us was that we had not upgraded to the latest version of the CLI. It works now. Thanks for the response. 

View solution in original post

Replies 7 (7)

idanh
Shopify Partner
1 0 0

Did you find a solution to this?

MarkAajuLarsen
Shopify Partner
2 0 1

I have a similar problem where whenever I create a new app the scopes are not synced with the partner dashboard and then OAuth fails - been going on for a few days now. 

RafayBetalogics
Shopify Partner
4 0 0

Hey Ancle, did you find its solution, my changes are also not being reflected in the production app, while working all fine in the dev.

Sahood
Shopify Partner
6 0 1

Still facing the issue, have any fixes

GrackleBird
Shopify Partner
13 1 3

Hi, we are facing a similar issue. @AncleMarvel have you (or @MarkAajuLarsen@idanh@RafayBetalogics@Sahood) managed  to find a solution for this? 

RafayBetalogics
Shopify Partner
4 0 0

The fix for this is actually you have to set environment variable for scopes before building and deploying the app in whatever hosting paltform you are using,
for my case I was using digital ocean so I updated the scopes variable here -> settings/app-level environment variables

enviraonment variable.PNG

GrackleBird
Shopify Partner
13 1 3

This is an accepted solution.

@RafayBetalogics Actually the issue for us was that we had not upgraded to the latest version of the CLI. It works now. Thanks for the response.