Shopify Theme Dev - 502 Error - Failed to perform theme synchronization

I have reproduced the issue on the latest CLI version.

Yes, I am on the latest version

I have searched existing posts and this report is not a duplicate.

Yes, this isn’t a duplicate

In which of these areas are you experiencing a problem?

Theme

Expected behavior

Command runs ok?

Actual behavior

502 Error

Failed to perform the initial theme synchronization. │
│ │
│ The Admin GraphQL API responded unsuccessfully with the HTTP status 502 │
│ and errors: │
│ │
│ {}

Reproduction steps

Setup a theme with a lot of files, then run shopify theme dev

Verbose output

-templates/page.brand-gifts-for-her.json: success
2025-10-31T14:08:51.829Z: Request to https://xxx.myshopify.com/admin/api/2025-10/graphql.json completed in 16235 ms
With response headers:

  • content-type: text/html

╭─ error ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ Failed to perform the initial theme synchronization. │
│ │
│ The Admin GraphQL API responded unsuccessfully with the HTTP status 502 and errors: │
│ │
│ {}

Operating system

Windows 11

CLI version

3.86.1

Shell

Git bash, Powershell

Nodejs version

24.6.0

What language and version are you using in your application?

N/A

How many theme files are we talking about here @ceri_waters ? I don’t access to your full verbose logs, but do you think it could be timing out because of the number of liquid or asset files?

Also how often do you hit this 502 error? Every theme dev call i assume?

Hi @AlokSwamy thanks for the response,

Yes very likely timing out due to the number of files, there’s a lot of page templates (just shy of 400) 120 snippets, 120 sections

If I delete the majority of additional templates, then run shopify theme dev and then restore them it works - but as you can imagine is a massive pain to do.

Thanks,
Ceri.

The logs in your original message shows that it completed ~16 seconds. Not sure if there are more important logs above/below that.

The timeout should be a generous 90 seconds. But if you really think it’s a timeout issue, you could pass in this flag when doing theme dev . It would disable retries (which isn’t great for poor network connections), but disable timeouts.

SHOPIFY_CLI_SKIP_NETWORK_LEVEL_RETRY=1 shopify theme dev

I would love it if you shared your full verbose logs (and redact any passwords inside)

@AlokSwamy That was the end of the verbose output, there wasn’t anything after it. It’s working at the moment, but I believe that’s because it’s just referencing the previous development theme so it isn’t uploading all of the resources.

Once the development theme expires and the issue comes back to life I’ll send across the output unless there’s a way of making it ‘forget’ the development theme?

You could delete the development theme:

shopify theme list will reveal it’s theme-id

shopify theme delete -t <theme-id>will delete it

But if it’s currently working, i don’t want to ruin your environment by deleting the theme. But if you still have your old verbose logs, I’d love to have your Request ID so we can investigate where in the pipeline it’s failing.