cli: [Bug]: 'The introspection endpoint returned a 502' when using `shopify theme dev`

Please confirm that you have:

  • Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
  • Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?

Other

Expected behavior

Should start the dev process.

Actual behavior

Timeout after 2-3 minutes with this terminal message:

╭─ error ────────────────────────────────────────────────────────────╮
│                                                                    │
│  The introspection endpoint returned a 502:                        │
│  https://accounts.shopify.com/oauth/introspection                  │
│                                                                    │
╰────────────────────────────────────────────────────────────────────╯

Verbose output

2023-03-30T17:27:56.242Z: Running command theme dev
  shopify:theme:dev init version: @oclif/core@2.1.4 argv: [ '--verbose' ] +0ms
2023-03-30T17:27:56.285Z: Ensuring that the user is authenticated with the Theme API with the following scopes:
[]

2023-03-30T17:27:56.286Z: Ensuring that the user is authenticated with the Admin API with the following scopes for the store club-chaussures.myshopify.com:
[]

2023-03-30T17:27:56.287Z: Getting session store...
2023-03-30T17:27:56.291Z: Validating existing session against the scopes:
[
  "openid",
  "https://api.shopify.com/auth/shop.admin.graphql",
  "https://api.shopify.com/auth/shop.admin.themes",
  "https://api.shopify.com/auth/partners.collaborator-relationships.readonly",
  "https://api.shopify.com/auth/shop.storefront-renderer.devtools",
  "https://api.shopify.com/auth/partners.app.cli.access"
]
For applications:
{
  "adminApi": {
    "scopes": [],
    "storeFqdn": "XXX.myshopify.com"
  }
}

2023-03-30T17:27:56.291Z: Sending Identity Introspection request to URL: https://accounts.shopify.com/oauth/introspection
2023-03-30T17:27:56.292Z: Sending POST request to URL https://accounts.shopify.com/oauth/introspection
With request headers:
 - User-Agent: Shopify CLI; v=3.44.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2023-03-30T17:28:56.462Z: Request to https://accounts.shopify.com/oauth/introspection completed in 60161 ms
With response headers:
 - content-type: text/html
 - x-request-id: 5a82fda8-97e2-4842-83ad-611cda4cd844
    
2023-03-30T17:28:56.463Z: Sending GET request to URL https://accounts.shopify.com/.well-known/openid-configuration.json
With request headers:
 - User-Agent: Shopify CLI; v=3.44.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2023-03-30T17:28:56.613Z: Request to https://accounts.shopify.com/.well-known/openid-configuration.json completed in 148 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"1eb4e9d462ffcdab29ed596345fa4cb0"
 - x-request-id: f6624627-c1ee-4e47-8074-136829a6c4c0
    
2023-03-30T17:28:56.643Z: Sending Identity Introspection request to URL: https://accounts.shopify.com/oauth/introspection
2023-03-30T17:28:56.643Z: Sending POST request to URL https://accounts.shopify.com/oauth/introspection
With request headers:
 - User-Agent: Shopify CLI; v=3.44.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2023-03-30T17:29:56.758Z: Request to https://accounts.shopify.com/oauth/introspection completed in 60114 ms
With response headers:
 - content-type: text/html
 - x-request-id: af54dc3e-ebbf-48c2-b8ae-70e037923db0
    
╭─ error ────────────────────────────────────────────────────────────╮
│                                                                    │
│  The introspection endpoint returned a 502:                        │
│  https://accounts.shopify.com/oauth/introspection                  │
│                                                                    │
╰────────────────────────────────────────────────────────────────────╯

2023-03-30T17:29:56.786Z: Unable to log analytics event - no information on executed command


### Reproduction steps

1. Run `shopify theme dev`
2. Wait.
3. Wait.
4. And then nothing.

### Operating System

MacOS 12.5.1

### Shopify CLI version (check your project's `package.json` if you're not sure)

3.44.1

### Shell

Bash

### Node version (run `node -v` if you're not sure)

v16.14.2

### What language and version are you using in your application?

_No response_

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 4
  • Comments: 28 (4 by maintainers)

Most upvoted comments

Can you try running auth logout and retrying?

Can you try running auth logout and retrying?

Arkham – you are a genius! Your suggestin worked for me. For the other commenters, here are the steps that I took:

  1. Ran 'yarn run shopify auth logout
  2. Re-ran shopify app dev --reset
  3. Was prompted to press any key open login page and re-authenticate
  4. CLI script then continued on without any issues.

Thank you, Tom

npm run shopify auth logout then npm run dev worked!

shopify auth logout and npm run dev --reset worked instantly in Windows. But on Mac it took me 4 tries doing the same thing until it worked.

Can you try running auth logout and retrying?

Arkham – you are a genius! Your suggestin worked for me. For the other commenters, here are the steps that I took:

  1. Ran 'yarn run shopify auth logout
  2. Re-ran shopify app dev --reset
  3. Was prompted to press any key open login page and re-authenticate
  4. CLI script then continued on without any issues.

Thank you, Tom

You’re a legend!

Same issue here. Suggest that Shopify updates its status page to reflect this: https://www.shopifystatus.com/