Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Error while polling for changes #4897

Open
2 tasks done
bigskillet opened this issue Nov 20, 2024 · 16 comments · Fixed by #5001
Open
2 tasks done

[Bug]: Error while polling for changes #4897

bigskillet opened this issue Nov 20, 2024 · 16 comments · Fixed by #5001
Labels
Area: @shopify/theme @shopify/theme package issues State: Waiting for feedback Type: Bug Something isn't working

Comments

@bigskillet
Copy link

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?

Theme

Expected behavior

No errors.

Actual behavior

Polling errors while running: shopify theme dev --store store-name --theme-editor-sync --live-reload full-page. Related to --theme-editor-sync perhaps?

Image

Verbose output

Sorry, I killed the terminal before doing this.

Reproduction steps

  1. Run shopify theme dev --store store-name --theme-editor-sync --live-reload full-page
  2. Make edits to files and error will eventually appear

Operating System

macOS Sequoia 15.1.1

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

3.7.0

Shell

No response

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

No response

What language and version are you using in your application?

No response

@bigskillet bigskillet added the Type: Bug Something isn't working label Nov 20, 2024
@mgmanzella
Copy link
Contributor

👋 can you re run this and share the verbose output? or at minimum a copy-pastable version of the request is (i cant copy it from the image) -- thanks in advance

@bigskillet
Copy link
Author

bigskillet commented Nov 21, 2024

Here's the text from that screenshot, extracted with Chat-GPT:

Error while polling for changes.

The Admin GraphQL API responded unsuccessfully with the HTTP status 401 and errors:
“[API] Service is not valid for authentication”

Request ID: 75102210-6986-4c80-84f4-964b670714ed-1732129546

Error:
Too many polling errors…

Please check the errors above and ensure you have a stable internet connection.

Starting the server with --verbose doesn't immediately give the error - it's random. I haven't been able to spot any correlations. I've been running --verbose since you asked and it keeps looping the follow code. Not sure if it's producing/revealing the error or not.

2024-11-21T16:15:32.366Z: Sending "Admin" GraphQL request:
  query getThemeFileChecksums($id: ID!, $after: String) {
  theme(id: $id) {
    files(first: 250, after: $after) {
      nodes {
        filename
        size
        checksumMd5
        __typename
      }
      userErrors {
        filename
        code
        __typename
      }
      pageInfo {
        hasNextPage
        endCursor
        __typename
      }
      __typename
    }
    __typename
  }
}

With variables:
{
  "id": "gid://shopify/OnlineStoreTheme/129630306352",
  "after": null
}

With request headers:
 - User-Agent: Shopify CLI; v=3.70.0
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

to https://store-name.myshopify.com/admin/api/2024-10/graphql.json

@tannerkovach
Copy link

Getting the same issue here as well. I'm assuming it's related to previous versions of the cli where you'd get kicked off randomly and need to re-authenticate. Happening pretty consistently though with this newer version of 'shopify theme dev'.

@bigskillet
Copy link
Author

Another thing I'm noticing with --theme-editor-sync, which may be related to the polling issue, is that every time I start the server, it asks me to reconcile a file that has already been reconciled. For example, if I choose to keep the local version, stop the server, then restart, it'll ask to reconcile again. The same thing happens if I choose the remote – and I notice it doesn't update my local files. Seems like this would all be polling related, or no?

@lukeh-shopify
Copy link
Contributor

👋🏻 When you encounter the error with verbose logs, are there any request ID headers being output? That would be helpful so we can investigate if there is anything going wrong on our end

@JasonHassold
Copy link

Hey all, I've also been running into this issue.

The command I ran was shopify theme dev --theme-editor-sync --verbose

Even when not making any file changes it seems to be performing a repetitive call below and eventually errors out. Makes a call or a couple of calls every about every 2 seconds or so.

Note: I've redacted the store name

2024-11-29T02:56:55.582Z: Request to https://{STORE NAME}.myshopify.com/admin/api/2024-10/graphql.json completed in 328 ms
With response headers:
 - content-type: application/json; charset=utf-8
 - server-timing: processing;dur=148, graphql;desc="admin/query/other", cfRequestDuration;dur=226.999998
 - x-request-id: 1b926f0b-2b2e-4193-89c9-1a374d713ecf-1732849015
    
2024-11-29T02:56:55.582Z: Sending "Admin" GraphQL request:
  query getThemeFileChecksums($id: ID!, $after: String) {
  theme(id: $id) {
    files(first: 250, after: $after) {
      nodes {
        filename
        size
        checksumMd5
        __typename
      }
      userErrors {
        filename
        code
        __typename
      }
      pageInfo {
        hasNextPage
        endCursor
        __typename
      }
      __typename
    }
    __typename
  }
}

With variables:
{
  "id": "gid://shopify/OnlineStoreTheme/144575332602",
  "after": "InNlY3Rpb25zXC9wcm9kdWN0LXJldmVhbGVyLXRlbXBsYXRlLmxpcXVpZCI="
}

Sometimes the after variable is null

With variables:
{
  "id": "gid://shopify/OnlineStoreTheme/144575332602",
  "after": null
}

cc @lukeh-shopify

@JasonHassold
Copy link

@catlee I'm still having this error even on v3.71.1

@catlee
Copy link
Contributor

catlee commented Dec 4, 2024

Even when not making any file changes it seems to be performing a repetitive call below and eventually errors out. Makes a call or a couple of calls every about every 2 seconds or so.

This is normal when running with --theme-editor-sync; we're polling for changes made via the theme editor.

What is the actual error produced?

@JasonHassold
Copy link

JasonHassold commented Dec 4, 2024

@catlee here's what I'm seeing with verbose output. I start shopify theme dev --theme-editor-sync and after 30 - 60 seconds it just errors out. Not making any file updates locally or theme edits remotely.

Image

@catlee catlee reopened this Dec 4, 2024
@catlee
Copy link
Contributor

catlee commented Dec 4, 2024

Are you using theme kit to access the shop?

Do you see any lines that say, "Error while polling for changes" before the CLI exits?

@JasonHassold
Copy link

@catlee I'm confused by the theme kit question

The error appears twice, the second one is what I showed above quits the CLI command and the first one is just a little while before it

@rcasimmons
Copy link

rcasimmons commented Jan 7, 2025

@catlee / @mgmanzella / @lukeh-shopify

Have we got an update on the above - it's frustrating that the last response was from a developer on 5th December and this is still an ongoing issue.

It's making working with Shopify more of a chore than a help really - considering software stability was supposedly on your radar from the previous unstable builds.

Verbose log
With variables:
{
  "id": "gid://shopify/OnlineStoreTheme/177708925313",
  "after": "InNlY3Rpb25zXC9jb21wYXJlLXRhYmxlLmxpcXVpZCI="
}

With request headers:
 - User-Agent: Shopify CLI; v=3.72.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json
2025-01-07T11:07:34.672Z: Request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json completed in 399 ms
With response headers:
 - content-type: application/json; charset=utf-8
 - server-timing: processing;dur=169, graphql;desc="admin/query/other", cfRequestDuration;dur=204.999924
 - x-request-id: d81e28ac-7c2d-4046-a82d-7efedf7a48ed-1736248054
    
2025-01-07T11:07:34.672Z: Sending "Admin" GraphQL request:
  query getThemeFileChecksums($id: ID!, $after: String) {
  theme(id: $id) {
    files(first: 250, after: $after) {
      nodes {
        filename
        size
        checksumMd5
        __typename
      }
      userErrors {
        filename
        code
        __typename
      }
      pageInfo {
        hasNextPage
        endCursor
        __typename
      }
      __typename
    }
    __typename
  }
}

With variables:
{
  "id": "gid://shopify/OnlineStoreTheme/177708925313",
  "after": "InNuaXBwZXRzXC9ib29zdC1zZC1hcHAubGlxdWlkIg=="
}

With request headers:
 - User-Agent: Shopify CLI; v=3.72.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json
2025-01-07T11:07:35.082Z: Request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json completed in 410 ms
With response headers:
 - content-type: application/json; charset=utf-8
 - server-timing: processing;dur=139, graphql;desc="admin/query/other", cfRequestDuration;dur=180.999994
 - x-request-id: cf90d064-166a-40ee-8d8b-7696f493c4ab-1736248055
    
2025-01-07T11:07:35.083Z: Sending "Admin" GraphQL request:
  query getThemeFileChecksums($id: ID!, $after: String) {
  theme(id: $id) {
    files(first: 250, after: $after) {
      nodes {
        filename
        size
        checksumMd5
        __typename
      }
      userErrors {
        filename
        code
        __typename
      }
      pageInfo {
        hasNextPage
        endCursor
        __typename
      }
      __typename
    }
    __typename
  }
}

With variables:
{
  "id": "gid://shopify/OnlineStoreTheme/177708925313",
  "after": "InRlbXBsYXRlc1wvcGFnZS5pbmdyZWRpZW50cy5qc29uIg=="
}

With request headers:
 - User-Agent: Shopify CLI; v=3.72.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json
2025-01-07T11:07:35.422Z: Request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json completed in 340 ms
With response headers:
 - content-type: application/json; charset=utf-8
 - server-timing: processing;dur=92, graphql;desc="admin/query/other", cfRequestDuration;dur=132.999897
 - x-request-id: ca6e4bc6-8a3e-4e2a-a2bc-a6d9495881ef-1736248055
    
2025-01-07T11:07:38.448Z: Sending "Admin" GraphQL request:
  query getThemeFileChecksums($id: ID!, $after: String) {
  theme(id: $id) {
    files(first: 250, after: $after) {
      nodes {
        filename
        size
        checksumMd5
        __typename
      }
      userErrors {
        filename
        code
        __typename
      }
      pageInfo {
        hasNextPage
        endCursor
        __typename
      }
      __typename
    }
    __typename
  }
}

With variables:
{
  "id": "gid://shopify/OnlineStoreTheme/177708925313",
  "after": null
}

With request headers:
 - User-Agent: Shopify CLI; v=3.72.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json
2025-01-07T11:07:38.700Z: Request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json completed in 252 ms
With response headers:

    
╭─ error ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                            │
│  Error while polling for changes.                                                                                          │
│                                                                                                                            │
│  request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json failed, reason:                           │
│                                                                                                                            │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

2025-01-07T11:07:38.703Z: Error while polling for changes.
FetchError: request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json failed, reason: 
    at ClientRequest.<anonymous> (file:///home/dev/.nvm/versions/node/v23.2.0/lib/node_modules/@shopify/cli/dist/chunk-VWNWE4HG.js:26484:18)
    at ClientRequest.emit (node:events:507:28)
    at ClientRequest.emit (node:domain:489:12)
    at emitErrorEvent (node:_http_client:104:11)
    at TLSSocket.socketErrorListener (node:_http_client:512:5)
    at TLSSocket.emit (node:events:507:28)
    at TLSSocket.emit (node:domain:489:12)
    at emitErrorNT (node:internal/streams/destroy:170:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
2025-01-07T11:07:41.705Z: Sending "Admin" GraphQL request:
  query getThemeFileChecksums($id: ID!, $after: String) {
  theme(id: $id) {
    files(first: 250, after: $after) {
      nodes {
        filename
        size
        checksumMd5
        __typename
      }
      userErrors {
        filename
        code
        __typename
      }
      pageInfo {
        hasNextPage
        endCursor
        __typename
      }
      __typename
    }
    __typename
  }
}

With variables:
{
  "id": "gid://shopify/OnlineStoreTheme/177708925313",
  "after": null
}

With request headers:
 - User-Agent: Shopify CLI; v=3.72.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json
2025-01-07T11:07:41.957Z: Request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json completed in 252 ms
With response headers:

    
2025-01-07T11:07:44.959Z: Sending "Admin" GraphQL request:
  query getThemeFileChecksums($id: ID!, $after: String) {
  theme(id: $id) {
    files(first: 250, after: $after) {
      nodes {
        filename
        size
        checksumMd5
        __typename
      }
      userErrors {
        filename
        code
        __typename
      }
      pageInfo {
        hasNextPage
        endCursor
        __typename
      }
      __typename
    }
    __typename
  }
}

With variables:
{
  "id": "gid://shopify/OnlineStoreTheme/177708925313",
  "after": null
}

With request headers:
 - User-Agent: Shopify CLI; v=3.72.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json
2025-01-07T11:07:45.314Z: Request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json completed in 355 ms
With response headers:
 - content-type: application/json; charset=utf-8
 - server-timing: processing;dur=128, graphql;desc="admin/query/other", cfRequestDuration;dur=174.999952
 - x-request-id: 35d8f31a-4c35-44c9-9743-7b47d3fecb56-1736248065
    
2025-01-07T11:07:45.314Z: Sending "Admin" GraphQL request:
  query getThemeFileChecksums($id: ID!, $after: String) {
  theme(id: $id) {
    files(first: 250, after: $after) {
      nodes {
        filename
        size
        checksumMd5
        __typename
      }
      userErrors {
        filename
        code
        __typename
      }
      pageInfo {
        hasNextPage
        endCursor
        __typename
      }
      __typename
    }
    __typename
  }
}

With variables:
{
  "id": "gid://shopify/OnlineStoreTheme/177708925313",
  "after": "InNlY3Rpb25zXC9jb21wYXJlLXRhYmxlLmxpcXVpZCI="
}

With request headers:
 - User-Agent: Shopify CLI; v=3.72.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json
2025-01-07T11:07:45.567Z: Request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json completed in 252 ms
With response headers:

    
2025-01-07T11:07:48.570Z: Sending "Admin" GraphQL request:
  query getThemeFileChecksums($id: ID!, $after: String) {
  theme(id: $id) {
    files(first: 250, after: $after) {
      nodes {
        filename
        size
        checksumMd5
        __typename
      }
      userErrors {
        filename
        code
        __typename
      }
      pageInfo {
        hasNextPage
        endCursor
        __typename
      }
      __typename
    }
    __typename
  }
}

With variables:
{
  "id": "gid://shopify/OnlineStoreTheme/177708925313",
  "after": null
}

With request headers:
 - User-Agent: Shopify CLI; v=3.72.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json
2025-01-07T11:07:49.108Z: Request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json completed in 538 ms
With response headers:
 - content-type: application/json; charset=utf-8
 - server-timing: processing;dur=299, graphql;desc="admin/query/other", cfRequestDuration;dur=347.000122
 - x-request-id: 3f87aec7-809e-4149-aa37-bbb71ce54135-1736248069
    
2025-01-07T11:07:49.109Z: Sending "Admin" GraphQL request:
  query getThemeFileChecksums($id: ID!, $after: String) {
  theme(id: $id) {
    files(first: 250, after: $after) {
      nodes {
        filename
        size
        checksumMd5
        __typename
      }
      userErrors {
        filename
        code
        __typename
      }
      pageInfo {
        hasNextPage
        endCursor
        __typename
      }
      __typename
    }
    __typename
  }
}

With variables:
{
  "id": "gid://shopify/OnlineStoreTheme/177708925313",
  "after": "InNlY3Rpb25zXC9jb21wYXJlLXRhYmxlLmxpcXVpZCI="
}

With request headers:
 - User-Agent: Shopify CLI; v=3.72.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json
2025-01-07T11:07:49.487Z: Request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json completed in 378 ms
With response headers:
 - content-type: application/json; charset=utf-8
 - server-timing: processing;dur=156, graphql;desc="admin/query/other", cfRequestDuration;dur=197.000027
 - x-request-id: 64799ab2-6c7b-4229-b51d-dc947f29ccf2-1736248069
    
2025-01-07T11:07:49.487Z: Sending "Admin" GraphQL request:
  query getThemeFileChecksums($id: ID!, $after: String) {
  theme(id: $id) {
    files(first: 250, after: $after) {
      nodes {
        filename
        size
        checksumMd5
        __typename
      }
      userErrors {
        filename
        code
        __typename
      }
      pageInfo {
        hasNextPage
        endCursor
        __typename
      }
      __typename
    }
    __typename
  }
}

With variables:
{
  "id": "gid://shopify/OnlineStoreTheme/177708925313",
  "after": "InNuaXBwZXRzXC9ib29zdC1zZC1hcHAubGlxdWlkIg=="
}

With request headers:
 - User-Agent: Shopify CLI; v=3.72.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json
2025-01-07T11:07:49.892Z: Request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json completed in 404 ms
With response headers:
 - content-type: application/json; charset=utf-8
 - server-timing: processing;dur=180, graphql;desc="admin/query/other", cfRequestDuration;dur=217.000008
 - x-request-id: 5fde0f9d-14fc-403d-acd4-4facbb20c3ff-1736248070
    
2025-01-07T11:07:49.892Z: Sending "Admin" GraphQL request:
  query getThemeFileChecksums($id: ID!, $after: String) {
  theme(id: $id) {
    files(first: 250, after: $after) {
      nodes {
        filename
        size
        checksumMd5
        __typename
      }
      userErrors {
        filename
        code
        __typename
      }
      pageInfo {
        hasNextPage
        endCursor
        __typename
      }
      __typename
    }
    __typename
  }
}

With variables:
{
  "id": "gid://shopify/OnlineStoreTheme/177708925313",
  "after": "InRlbXBsYXRlc1wvcGFnZS5pbmdyZWRpZW50cy5qc29uIg=="
}

With request headers:
 - User-Agent: Shopify CLI; v=3.72.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json
2025-01-07T11:07:50.218Z: Request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json completed in 325 ms
With response headers:
 - content-type: application/json; charset=utf-8
 - server-timing: processing;dur=123, graphql;desc="admin/query/other", cfRequestDuration;dur=166.999817
 - x-request-id: 1f4928d9-75d5-45bb-99d7-676178d9315e-1736248070
    
2025-01-07T11:07:53.246Z: Sending "Admin" GraphQL request:
  query getThemeFileChecksums($id: ID!, $after: String) {
  theme(id: $id) {
    files(first: 250, after: $after) {
      nodes {
        filename
        size
        checksumMd5
        __typename
      }
      userErrors {
        filename
        code
        __typename
      }
      pageInfo {
        hasNextPage
        endCursor
        __typename
      }
      __typename
    }
    __typename
  }
}

With variables:
{
  "id": "gid://shopify/OnlineStoreTheme/177708925313",
  "after": null
}

With request headers:
 - User-Agent: Shopify CLI; v=3.72.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json
2025-01-07T11:07:53.608Z: Request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json completed in 362 ms
With response headers:
 - content-type: application/json; charset=utf-8
 - server-timing: processing;dur=150, graphql;desc="admin/query/other", cfRequestDuration;dur=201.000214
 - x-request-id: 349fdc26-6fa2-454a-82f2-7d1212911867-1736248073
    
2025-01-07T11:07:53.609Z: Sending "Admin" GraphQL request:
  query getThemeFileChecksums($id: ID!, $after: String) {
  theme(id: $id) {
    files(first: 250, after: $after) {
      nodes {
        filename
        size
        checksumMd5
        __typename
      }
      userErrors {
        filename
        code
        __typename
      }
      pageInfo {
        hasNextPage
        endCursor
        __typename
      }
      __typename
    }
    __typename
  }
}

With variables:
{
  "id": "gid://shopify/OnlineStoreTheme/177708925313",
  "after": "InNlY3Rpb25zXC9jb21wYXJlLXRhYmxlLmxpcXVpZCI="
}

With request headers:
 - User-Agent: Shopify CLI; v=3.72.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json
2025-01-07T11:07:53.862Z: Request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json completed in 253 ms
With response headers:

    
╭─ error ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                            │
│  Error while polling for changes.                                                                                          │
│                                                                                                                            │
│  request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json failed, reason:                           │
│                                                                                                                            │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

2025-01-07T11:07:53.864Z: Error while polling for changes.
FetchError: request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json failed, reason: 
    at ClientRequest.<anonymous> (file:///home/dev/.nvm/versions/node/v23.2.0/lib/node_modules/@shopify/cli/dist/chunk-VWNWE4HG.js:26484:18)
    at ClientRequest.emit (node:events:507:28)
    at ClientRequest.emit (node:domain:489:12)
    at emitErrorEvent (node:_http_client:104:11)
    at TLSSocket.socketErrorListener (node:_http_client:512:5)
    at TLSSocket.emit (node:events:507:28)
    at TLSSocket.emit (node:domain:489:12)
    at emitErrorNT (node:internal/streams/destroy:170:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
2025-01-07T11:07:56.866Z: Sending "Admin" GraphQL request:
  query getThemeFileChecksums($id: ID!, $after: String) {
  theme(id: $id) {
    files(first: 250, after: $after) {
      nodes {
        filename
        size
        checksumMd5
        __typename
      }
      userErrors {
        filename
        code
        __typename
      }
      pageInfo {
        hasNextPage
        endCursor
        __typename
      }
      __typename
    }
    __typename
  }
}

With variables:
{
  "id": "gid://shopify/OnlineStoreTheme/177708925313",
  "after": null
}

With request headers:
 - User-Agent: Shopify CLI; v=3.72.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json
2025-01-07T11:07:57.119Z: Request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json completed in 253 ms
With response headers:

    
2025-01-07T11:08:00.121Z: Sending "Admin" GraphQL request:
  query getThemeFileChecksums($id: ID!, $after: String) {
  theme(id: $id) {
    files(first: 250, after: $after) {
      nodes {
        filename
        size
        checksumMd5
        __typename
      }
      userErrors {
        filename
        code
        __typename
      }
      pageInfo {
        hasNextPage
        endCursor
        __typename
      }
      __typename
    }
    __typename
  }
}

With variables:
{
  "id": "gid://shopify/OnlineStoreTheme/177708925313",
  "after": null
}

With request headers:
 - User-Agent: Shopify CLI; v=3.72.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json
2025-01-07T11:08:00.374Z: Request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json completed in 253 ms
With response headers:

    
2025-01-07T11:08:03.377Z: Sending "Admin" GraphQL request:
  query getThemeFileChecksums($id: ID!, $after: String) {
  theme(id: $id) {
    files(first: 250, after: $after) {
      nodes {
        filename
        size
        checksumMd5
        __typename
      }
      userErrors {
        filename
        code
        __typename
      }
      pageInfo {
        hasNextPage
        endCursor
        __typename
      }
      __typename
    }
    __typename
  }
}

With variables:
{
  "id": "gid://shopify/OnlineStoreTheme/177708925313",
  "after": null
}

With request headers:
 - User-Agent: Shopify CLI; v=3.72.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json
2025-01-07T11:08:03.820Z: Request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json completed in 443 ms
With response headers:
 - content-type: application/json; charset=utf-8
 - server-timing: processing;dur=218, graphql;desc="admin/query/other", cfRequestDuration;dur=275.000095
 - x-request-id: e53eda29-64e0-40f5-a6b2-a6ad8bd90555-1736248083
    
2025-01-07T11:08:03.821Z: Sending "Admin" GraphQL request:
  query getThemeFileChecksums($id: ID!, $after: String) {
  theme(id: $id) {
    files(first: 250, after: $after) {
      nodes {
        filename
        size
        checksumMd5
        __typename
      }
      userErrors {
        filename
        code
        __typename
      }
      pageInfo {
        hasNextPage
        endCursor
        __typename
      }
      __typename
    }
    __typename
  }
}

With variables:
{
  "id": "gid://shopify/OnlineStoreTheme/177708925313",
  "after": "InNlY3Rpb25zXC9jb21wYXJlLXRhYmxlLmxpcXVpZCI="
}

With request headers:
 - User-Agent: Shopify CLI; v=3.72.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json
2025-01-07T11:08:04.195Z: Request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json completed in 374 ms
With response headers:
 - content-type: application/json; charset=utf-8
 - server-timing: processing;dur=134, graphql;desc="admin/query/other", cfRequestDuration;dur=190.999985
 - x-request-id: 276d25c5-29f7-4eec-9950-c58e0b075878-1736248084
    
2025-01-07T11:08:04.195Z: Sending "Admin" GraphQL request:
  query getThemeFileChecksums($id: ID!, $after: String) {
  theme(id: $id) {
    files(first: 250, after: $after) {
      nodes {
        filename
        size
        checksumMd5
        __typename
      }
      userErrors {
        filename
        code
        __typename
      }
      pageInfo {
        hasNextPage
        endCursor
        __typename
      }
      __typename
    }
    __typename
  }
}

With variables:
{
  "id": "gid://shopify/OnlineStoreTheme/177708925313",
  "after": "InNuaXBwZXRzXC9ib29zdC1zZC1hcHAubGlxdWlkIg=="
}

With request headers:
 - User-Agent: Shopify CLI; v=3.72.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json
2025-01-07T11:08:04.448Z: Request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json completed in 253 ms
With response headers:

    
2025-01-07T11:08:07.450Z: Sending "Admin" GraphQL request:
  query getThemeFileChecksums($id: ID!, $after: String) {
  theme(id: $id) {
    files(first: 250, after: $after) {
      nodes {
        filename
        size
        checksumMd5
        __typename
      }
      userErrors {
        filename
        code
        __typename
      }
      pageInfo {
        hasNextPage
        endCursor
        __typename
      }
      __typename
    }
    __typename
  }
}

With variables:
{
  "id": "gid://shopify/OnlineStoreTheme/177708925313",
  "after": null
}

With request headers:
 - User-Agent: Shopify CLI; v=3.72.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json
2025-01-07T11:08:08.072Z: Request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json completed in 621 ms
With response headers:
 - content-type: application/json; charset=utf-8
 - server-timing: processing;dur=161, graphql;desc="admin/query/other", cfRequestDuration;dur=205.999851
 - x-request-id: f99e8b65-8f8b-4604-84ce-fdf76cf02919-1736248088
    
2025-01-07T11:08:08.072Z: Sending "Admin" GraphQL request:
  query getThemeFileChecksums($id: ID!, $after: String) {
  theme(id: $id) {
    files(first: 250, after: $after) {
      nodes {
        filename
        size
        checksumMd5
        __typename
      }
      userErrors {
        filename
        code
        __typename
      }
      pageInfo {
        hasNextPage
        endCursor
        __typename
      }
      __typename
    }
    __typename
  }
}

With variables:
{
  "id": "gid://shopify/OnlineStoreTheme/177708925313",
  "after": "InNlY3Rpb25zXC9jb21wYXJlLXRhYmxlLmxpcXVpZCI="
}

With request headers:
 - User-Agent: Shopify CLI; v=3.72.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json
2025-01-07T11:08:08.467Z: Request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json completed in 395 ms
With response headers:
 - content-type: application/json; charset=utf-8
 - server-timing: processing;dur=156, graphql;desc="admin/query/other", cfRequestDuration;dur=208.999872
 - x-request-id: a932de8b-9a3d-43f6-8f3a-24ddb5dbcb18-1736248088
    
2025-01-07T11:08:08.468Z: Sending "Admin" GraphQL request:
  query getThemeFileChecksums($id: ID!, $after: String) {
  theme(id: $id) {
    files(first: 250, after: $after) {
      nodes {
        filename
        size
        checksumMd5
        __typename
      }
      userErrors {
        filename
        code
        __typename
      }
      pageInfo {
        hasNextPage
        endCursor
        __typename
      }
      __typename
    }
    __typename
  }
}

With variables:
{
  "id": "gid://shopify/OnlineStoreTheme/177708925313",
  "after": "InNuaXBwZXRzXC9ib29zdC1zZC1hcHAubGlxdWlkIg=="
}

With request headers:
 - User-Agent: Shopify CLI; v=3.72.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json
2025-01-07T11:08:08.800Z: Request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json completed in 332 ms
With response headers:
 - content-type: application/json; charset=utf-8
 - server-timing: processing;dur=134, graphql;desc="admin/query/other", cfRequestDuration;dur=176.000118
 - x-request-id: da47fba7-f4e0-481a-9983-98192b1cd710-1736248089
    
2025-01-07T11:08:08.801Z: Sending "Admin" GraphQL request:
  query getThemeFileChecksums($id: ID!, $after: String) {
  theme(id: $id) {
    files(first: 250, after: $after) {
      nodes {
        filename
        size
        checksumMd5
        __typename
      }
      userErrors {
        filename
        code
        __typename
      }
      pageInfo {
        hasNextPage
        endCursor
        __typename
      }
      __typename
    }
    __typename
  }
}

With variables:
{
  "id": "gid://shopify/OnlineStoreTheme/177708925313",
  "after": "InRlbXBsYXRlc1wvcGFnZS5pbmdyZWRpZW50cy5qc29uIg=="
}

With request headers:
 - User-Agent: Shopify CLI; v=3.72.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json
2025-01-07T11:08:09.054Z: Request to https://fushi-wellbeing.myshopify.com/admin/api/2025-01/graphql.json completed in 253 ms
With response headers:

    
╭─ error ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                            │
│  Too many polling errors...                                                                                                │
│                                                                                                                            │
│  Please check the errors above and ensure you have a stable internet connection.                                           │
│                                                                                                                            │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

@bigskillet
Copy link
Author

I'm still seeing the polling errors as well on v3.72.2. I notice that it happens a lot more if I'm working at coffee shops. I wonder if it has anything to do with spotty wifi connections maybe?

Also, when using --theme-editor-sync, it asks me to choose local/remote for config/settings_data.json every time I start dev. It never remembers that the file was reconciled already. Even if I do shopify theme push before starting dev. Not sure if that has anything to do with the polling/syncing, but thought I'd mention it.

@rcasimmons
Copy link

I'm still seeing the polling errors as well on v3.72.2. I notice that it happens a lot more if I'm working at coffee shops. I wonder if it has anything to do with spotty wifi connections maybe?

Also, when using --theme-editor-sync, it asks me to choose local/remote for config/settings_data.json every time I start dev. It never remembers that the file was reconciled already. Even if I do shopify theme push before starting dev. Not sure if that has anything to do with the polling/syncing, but thought I'd mention it.

Ditto, I get the recurring syncing question too.

As for internet, in my case atleast, I'm on a wired, home connection so not sure if it's isolated to spotty connections - my latency, speed and other factors are absolutely fine. I can browse, use Shopify without a hitch.

I guess we're just going to have to wait for a reply.

@catlee
Copy link
Contributor

catlee commented Jan 7, 2025

Thank you for your patience. We're having trouble reproducing this one, and the logs don't make it clear why the polling is failing.

Would you be able to run the CLI version from the PR below? I've added some more logging, and improved the retry logic a bit.

#5163 (comment)

@rcasimmons
Copy link

Thank you for your patience. We're having trouble reproducing this one, and the logs don't make it clear why the polling is failing.

Would you be able to run the CLI version from the PR below? I've added some more logging, and improved the retry logic a bit.

#5163 (comment)

Appreciate your response on this matter.

I will try the PR tomorrow to see if it gives us further logging. The platform I seemed to have this issue was on Windows via WSL Ubuntu 24.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: @shopify/theme @shopify/theme package issues State: Waiting for feedback Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants