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]: 502 Response from Theme Kit GraphQL themeFilesUpsert mutation when using CI/CD #5031

Open
2 tasks done
phv-ppuente opened this issue Dec 4, 2024 · 11 comments
Open
2 tasks done
Assignees
Labels
Area: @shopify/theme @shopify/theme package issues Severity: 2 High Severity Type: Bug Something isn't working

Comments

@phv-ppuente
Copy link

phv-ppuente commented Dec 4, 2024

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

shopify theme push creates a theme on my store using the same theme files that successfully created themes two days prior

Actual behavior

This issue coincided with #5010. After resolving that issue by removing empty theme files from our repo we encountered this problem.

Our CI/CD pipeline in GitHub actions fails consistently and has this 502 response. (EDIT: I removed some extraneous information about my local testing that I think was a red herring.)

╭─ error ──────────────────────────────────────────────────────────────────────╮
│                                                                              │
│                                                                              │
│  The Admin GraphQL API responded unsuccessfully with the HTTP status 502     │
│  and errors:                                                                 │
│                                                                              │
│  {}                                                                          │
│                                                                              │
│  Request ID: 3037df53-9e06-488e-a483-15ddef4a350a-1733336241                 │
│                                                                              │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

2024-12-04T18:17:34.196Z:
Running system process:
  · Command: npm prefix
  · Working directory: /<DIRECTORY>

╭─ error ──────────────────────────────────────────────────────────────────────╮
│                                                                              │
│                                                                              │
│  The Admin GraphQL API responded unsuccessfully with the HTTP status 502     │
│  and errors:                                                                 │
│                                                                              │
│  {}                                                                          │
│                                                                              │
│  Request ID: 3037df53-9e06-488e-a483-15ddef4a350a-1733336241                 │
│                                                                              │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

Verbose output

Note: The verbose output includes the contents of all theme files. This content is very large because it contains all theme files. Some of these files are relatively large JS bundles (80-160KB). I have also redacted all template content to protect PI. I also do not have the full output because my bash history doesn't go far enough back. This is starting with what was available:

Verbose output
<SEVERAL ASSETS AND LARGE PRODUCTION BUILDS OF JS APPLICATIONS CUT OFF BY THE CONSOLE HISTORY>
<TRUNCATED FROM AN ENTIRE PRODUCTION BUILD OF AN ENTIRE REACT APP>
     }
  }
]
}

With request headers:
- X-Shopify-Shop: naturemade1-dev.myshopify.com
- User-Agent: Shopify CLI; v=3.71.1
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: linux
- Content-Type: application/json

to https://theme-kit-access.shopifyapps.com/cli/admin/api/2024-10/graphql.json
2024-12-04T18:17:26.486Z: Request to https://theme-kit-access.shopifyapps.com/cli/admin/api/2024-10/graphql.json completed in 4950 ms
With response headers:
- cache-control: max-age=0, private, must-revalidate
- content-type: application/json; charset=utf-8
- etag: W/"245f5148c2294a04de548fc2d0f37823"
- server-timing: processing;dur=3355, socket_queue;dur=2.691, cfRequestDuration;dur=4696.999788
- x-request-id: 34ab3904-12ac-47c6-8f1c-37537f1d83c8-1733336241

2024-12-04T18:17:26.486Z: File Upload Results:
-sections/nm-testimonials-carousel.liquid: success
-sections/nm-two-col-featured-product.liquid: success
-sections/nm-trusted-advisor.liquid: success
-sections/nm-three-col-featured-content.liquid: success
-sections/nm-two-col-call-to-action.liquid: success
-sections/nm-ugc-module.liquid: success
-sections/nm-two-col-alternating-content.liquid: success
-sections/nm-usp-survey-table.liquid: success
-sections/nm-video-carousel-module.liquid: success
-sections/nm-wellblends-collection-about.liquid: success
-sections/nm-wellblends-collection-chart.liquid: success
-sections/nm-video-module.liquid: success
-sections/nm-usp-verified-product-table.liquid: success
-sections/nm-wellblends-collection-faq.liquid: success
-sections/nm-wellblends-collection-hero.liquid: success
-sections/nm-wellblends-collection-featured.liquid: success
-sections/nm-wellblends-collection-description.liquid: success
-sections/nm-wellblends-collection-related-resources.liquid: success
-sections/nm-wellblends-collection-video-text.liquid: success
-sections/nm-wellblends-collection-heading-block.liquid: success
-sections/nm-wellblends-video-image-text.liquid: success
-sections/nm-wellblends-collection-text-block.liquid: success
-sections/nm-wellblends-collection-quote.liquid: success
-sections/nm-where-to-buy.liquid: success
-sections/page.liquid: success
-sections/nm-writers-section.liquid: success
-sections/nm-work-by-numbers.liquid: success
-sections/plp-intro-hero.liquid: success
-sections/rich-text.liquid: success
-sections/pickup-availability.liquid: success
-sections/product-recommendations.liquid: success
-sections/section-plp-related-products.liquid: success
-sections/section-quote-block.liquid: success
-sections/predictive-search.liquid: success
-sections/section-product-recommendations.liquid: success
-sections/video.liquid: success
2024-12-04T18:17:27.329Z: Request to https://theme-kit-access.shopifyapps.com/cli/admin/api/2024-10/graphql.json completed in 5788 ms
With response headers:
- cache-control: max-age=0, private, must-revalidate
- content-type: application/json; charset=utf-8
- etag: W/"d838a0f7076e5fa3667b9d051e5e3969"
- server-timing: processing;dur=3793, socket_queue;dur=3.561, cfRequestDuration;dur=5493.999958
- x-request-id: d904eaad-9214-4147-9ca2-f8933c2491ea-1733336241

2024-12-04T18:17:27.330Z: File Upload Results:
-snippets/cart-count-filtered.liquid: success
-snippets/cart-item-bundle.liquid: success
-snippets/bv-summary.liquid: success
-snippets/card-placeholder.liquid: success
-snippets/cart-item-bundle-new.liquid: success
-snippets/cart-item.liquid: success
-snippets/cart-notification.liquid: success
-snippets/checkout-free-sample-handling-script.liquid: success
-snippets/cart-preview.liquid: success
-snippets/chunks-cart-scripts.liquid: success
-snippets/chunks-blog-scripts.liquid: success
-snippets/chunks-global-scripts.liquid: success
-snippets/chunks-search-scripts.liquid: success
-snippets/chunks-plp-scripts.liquid: success
-snippets/chunks-home-scripts.liquid: success
-snippets/chunks-page-scripts.liquid: success
-snippets/chunks-pdp-scripts.liquid: success
-snippets/css-variables.liquid: success
-snippets/collection-about-content.liquid: success
-snippets/chunks-wellblends-scripts.liquid: success
-snippets/glide-arrows.liquid: success
-snippets/compare-product-placeholder.liquid: success
-snippets/collection-card.liquid: success
-snippets/glide-bullets-v2.liquid: success
-snippets/glide-bullets.liquid: success
-snippets/feature-icons.liquid: success
-snippets/gtm-checkout.liquid: success
-snippets/heart-button.liquid: success
-snippets/icon-accordion.liquid: success
-snippets/icon-instagram-v2.liquid: success
-snippets/gtm.liquid: success
-snippets/icons.liquid: success
-snippets/klaviyo-poup-custom-styles.liquid: success
-snippets/icon-external-link-white.liquid: success
-snippets/meta-tags.liquid: success
-snippets/image-element.liquid: success
-snippets/marketing-card.liquid: success
-snippets/modal-options.liquid: success
-snippets/mw_CMB_objects.liquid: success
-snippets/nm-article-related-products.liquid: success
-snippets/nm-bundle-collection-products.liquid: success
-snippets/nm-custom-product-card.liquid: success
-snippets/nm-main-product-jumplinks.liquid: success
-snippets/keyboard-navigation-quicklinks.liquid: success
-snippets/nm-marketing-card-js.liquid: success
-snippets/nm-marketing-card-related.liquid: success
-snippets/nm-marketing-card-no-js.liquid: success
-snippets/nm-marketing-card-subcollections-no-js.liquid: success
-snippets/nm-marketing-card.liquid: success
-snippets/nm-menu-cta-product.liquid: success
2024-12-04T18:17:27.462Z: Request to https://theme-kit-access.shopifyapps.com/cli/admin/api/2024-10/graphql.json completed in 5918 ms
With response headers:
- cache-control: max-age=0, private, must-revalidate
- content-type: application/json; charset=utf-8
- etag: W/"1d823b31cfcec850e45440926a752797"
- server-timing: processing;dur=3844, socket_queue;dur=8.87, cfRequestDuration;dur=5688.999891
- x-request-id: 3952bbbc-6d8f-47c7-90b1-859299b27c23-1733336241

2024-12-04T18:17:27.462Z: File Upload Results:
-snippets/nm-pdp-promo-bar.liquid: success
-snippets/nm-no-search-result-tips.liquid: success
-snippets/nm-marketing-card-related-no-js.liquid: success
-snippets/nm-mobile-nav.liquid: success
-snippets/nm-search-results-information.liquid: success
-snippets/nm-product-card.liquid: success
-snippets/nm-product-thumbnail.liquid: success
-snippets/nm-promo-bar.liquid: success
-snippets/nm-search-results-product-line.liquid: success
-snippets/nm-search-results-articles.liquid: success
-snippets/nm-search-results-product.liquid: success
-snippets/nm-sleep-collection-products.liquid: success
-snippets/nu-nm-product-card.liquid: success
-snippets/nu-to-nm-banner.liquid: success
-snippets/nu-nm-product-item.liquid: success
-snippets/nurish-conversion-row-placeholder.liquid: success
-snippets/opens-in-new-window-label.liquid: success
-snippets/nurish-products-JSON.liquid: success
-snippets/onetrust-banner.liquid: success
-snippets/pagination.liquid: success
-snippets/image-preload-link.liquid: success
-snippets/order-status-marketing-card.liquid: success
-snippets/pdp-discontinued-item-variables.liquid: success
-snippets/pdp-benefits-content.liquid: success
-snippets/pdp-dosage-interactions-content.liquid: success
-snippets/pdp-details-view-more.liquid: success
-snippets/pdp-nutrient-shortfalls-content.liquid: success
-snippets/pdp-ingredients-content.liquid: success
-snippets/pharmacist-recommended-bar.liquid: success
-snippets/pdp-reviews-placeholder.liquid: success
-snippets/persistent-cart-modal.liquid: success
-snippets/pickup-availability-info.liquid: success
-snippets/pdp-usp-logo.liquid: success
-snippets/placeholder-card-article.liquid: success
-snippets/price.liquid: success
-snippets/placeholder-card-collection.liquid: success
-snippets/product-card-placeholder.liquid: success
-snippets/product-serving-size.liquid: success
-snippets/product-card-v2.liquid: success
-snippets/product-thumbnail.liquid: success
-snippets/product-media.liquid: success
-snippets/product-card.liquid: success
-snippets/product-type.liquid: success
-snippets/qualtrics-iframe-resizer.liquid: success
-snippets/rewind_menu_backup_do_not_delete.liquid: success
-snippets/variant-radios.liquid: success
-snippets/social-sharing.liquid: success
-snippets/wishlist-modal.liquid: success
-snippets/upper-limits.liquid: success
-snippets/vwo.liquid: success
2024-12-04T18:17:28.636Z: Request to https://theme-kit-access.shopifyapps.com/cli/admin/api/2024-10/graphql.json completed in 7102 ms
With response headers:
- cache-control: max-age=0, private, must-revalidate
- content-type: application/json; charset=utf-8
- etag: W/"4a2cefe8824a0f2aec69c4d99222f06e"
- server-timing: processing;dur=4709, socket_queue;dur=3.754, cfRequestDuration;dur=6812.999964
- x-request-id: ccb678ce-a2f6-4a4b-a789-6a7d39cd61a9-1733336241

2024-12-04T18:17:28.636Z: File Upload Results:
-sections/nm-industry-research.liquid: success
-sections/nm-intagram-carousel.liquid: success
-sections/nm-insight-signup.liquid: success
-sections/nm-image-with-content-overlay.liquid: success
-sections/nm-intro-banner.liquid: success
-sections/nm-learn-articles.liquid: success
-sections/nm-login.liquid: success
-sections/nm-media-left-right.liquid: success
-sections/nm-main-bundle.liquid: success
-sections/nm-newsletter-signup.liquid: success
-sections/nm-main-product.liquid: success
-sections/nm-patient-resources.liquid: success
-sections/nm-nurish-to-naturemade-table.liquid: success
-sections/nm-meet-experts.liquid: success
-sections/nm-off-canvas-form.liquid: success
-sections/nm-pdp-benefits-bundle.liquid: success
-sections/nm-page-about.liquid: success
-sections/nm-pdf-links.liquid: success
-sections/nm-partners-section.liquid: success
-sections/nm-pdp-benefits.liquid: success
-sections/nm-pdp-disclaimer.liquid: success
-sections/nm-pdp-dosage-interactions-bundle.liquid: success
-sections/nm-pdp-ingredients-bundle.liquid: success
-sections/nm-pdp-nutrients-shortfalls-bundle.liquid: success
-sections/nm-pdp-dosage-interactions.liquid: success
-sections/nm-pdp-ingredients.liquid: success
-sections/nm-pdp-nutrients-shortfalls.liquid: success
-sections/nm-product-carousel.liquid: success
-sections/nm-product-compare.liquid: success
-sections/nm-preview-cart-count.liquid: success
-sections/nm-pdp-tabs.liquid: success
-sections/nm-pdp-related-products.liquid: success
-sections/nm-product-recommendations.liquid: success
-sections/nm-quiz-benefits.liquid: success
-sections/nm-product-reviews.liquid: success
-sections/nm-product.liquid: success
-sections/nm-related-resources.liquid: success
-sections/nm-related-products.liquid: success
-sections/nm-quiz-hero.liquid: success
-sections/nm-quiz-cta.liquid: success
-sections/nm-repeating-featured-cards.liquid: success
-sections/nm-reveal-modal.liquid: success
-sections/nm-register.liquid: success
-sections/nm-sleep-collection-product-list.liquid: success
-sections/nm-search-results-global.liquid: success
-sections/nm-search-results.liquid: success
-sections/nm-static-image-hero.liquid: success
-sections/nm-resources-banner.liquid: success
-sections/nm-static-image-hero-page.liquid: success
-sections/nm-subscribe-banner.liquid: success
2024-12-04T18:17:29.054Z: Request to https://theme-kit-access.shopifyapps.com/cli/admin/api/2024-10/graphql.json completed in 7524 ms
With response headers:
- cache-control: max-age=0, private, must-revalidate
- content-type: application/json; charset=utf-8
- etag: W/"00daa8e787512fd529a613dcb4983614"
- server-timing: processing;dur=4604, socket_queue;dur=8.292, cfRequestDuration;dur=7247.999907
- x-request-id: eac74230-2b13-4abe-9e9d-9da03b12c89e-1733336241

2024-12-04T18:17:29.055Z: File Upload Results:
-sections/nm-author-columns.liquid: success
-sections/nm-best-seller-new-product.liquid: success
-sections/nm-ask-our-experts-copy.liquid: success
-sections/nm-banner-callout.liquid: success
-sections/nm-bundle-collection-product-list.liquid: success
-sections/nm-brands-logos.liquid: success
-sections/nm-best-seller-new-product-shopify.liquid: success
-sections/nm-call-to-action-centered.liquid: success
-sections/nm-bundle-pdp-tabs.liquid: success
-sections/nm-bundle-pdp-reviews.liquid: success
-sections/nm-bundle-faq.liquid: success
-sections/nm-bypass-block.liquid: success
-sections/nm-cart-icon-bubble.liquid: success
-sections/nm-category-about.liquid: success
-sections/nm-cart-related-products.liquid: success
-sections/nm-clinical-studies.liquid: success
-sections/nm-clients-carousel.liquid: success
-sections/nm-collection-intro.liquid: success
-sections/nm-collection-intro-custom.liquid: success
-sections/nm-collection-about.liquid: success
-sections/nm-contact-columns.liquid: success
-sections/nm-contact-form.liquid: success
-sections/nm-content-with-sidebar.liquid: success
-sections/nm-copy-section.liquid: success
-sections/nm-custom-related-products.liquid: success
-sections/nm-exclusive-offers.liquid: success
-sections/nm-communication-preferences.liquid: success
-sections/nm-experts-section.liquid: success
-sections/nm-events-module.liquid: success
-sections/nm-faq.liquid: success
-sections/nm-faq-page.liquid: success
-sections/nm-featured-product.liquid: success
-sections/nm-featured-content.liquid: success
-sections/nm-filter-modal.liquid: success
-sections/nm-featured-posts-listing.liquid: success
-sections/nm-footer.liquid: success
-sections/nm-full-bleed-featured-content.liquid: success
-sections/nm-general-content-module.liquid: success
-sections/nm-get-started-recommendations.liquid: success
-sections/nm-get-started-accordion-grid.liquid: success
-sections/nm-get-started-about.liquid: success
-sections/nm-get-in-touch.liquid: success
-sections/nm-hcp-content.liquid: success
-sections/nm-header-no-nav.liquid: success
-sections/nm-hcp-about-columns.liquid: success
-sections/nm-header.liquid: success
-sections/nm-homepage-hero.liquid: success
-sections/nm-health-goals.liquid: success
-sections/nm-image-banner.liquid: success
-sections/nm-how-to-become-an-affiliate.liquid: success
2024-12-04T18:17:29.215Z: Request to https://theme-kit-access.shopifyapps.com/cli/admin/api/2024-10/graphql.json completed in 7689 ms
With response headers:
- cache-control: max-age=0, private, must-revalidate
- content-type: application/json; charset=utf-8
- etag: W/"d19f65221b44e2f66f1c6f124254b229"
- server-timing: processing;dur=4325, socket_queue;dur=10.18, cfRequestDuration;dur=7454.999924
- x-request-id: e5188fae-29ac-47b9-b87e-b80229287bb2-1733336241

2024-12-04T18:17:29.216Z: File Upload Results:
-sections/cart-icon-bubble.liquid: success
-sections/cart-icon-bubble-desktop.liquid: success
-sections/cart-preview-section.liquid: success
-sections/cart-notification-button.liquid: success
-sections/cart-live-region-text.liquid: success
-sections/cart-notification-product.liquid: success
-sections/cart-progress-bars.liquid: success
-sections/contact-form.liquid: success
-sections/collage.liquid: success
-sections/collection-list.liquid: success
-sections/customer-auth-token.liquid: success
-sections/custom-liquid.liquid: success
-sections/customer-updated-recently-viewed-cards.liquid: success
-sections/apps.liquid: success
-sections/featured-collection.liquid: success
-sections/featured-blog.liquid: success
-sections/featured-product.liquid: success
-sections/header.liquid: success
-sections/home-social-media-module.liquid: success
-sections/home-about-module.liquid: success
-sections/home-category-feature-promo.liquid: success
-sections/footer.liquid: success
-sections/image-banner.liquid: success
-sections/image-with-text.liquid: success
-sections/main-404.liquid: success
-sections/innovations-carousel.liquid: success
-sections/main-blog.liquid: success
-sections/instafeed.liquid: success
-sections/main-cart-footer.liquid: success
-sections/main-article.liquid: success
-sections/main-cart-items.liquid: success
-sections/announcement-bar.liquid: success
-sections/main-collection-filter.liquid: success
-sections/main-list-collections.liquid: success
-sections/main-collection-banner.liquid: success
-sections/main-page.liquid: success
-sections/main-password-footer.liquid: success
-sections/main-password-header.liquid: success
-sections/main-collection-product-grid.liquid: success
-sections/main-product.liquid: success
-sections/main-search.liquid: success
-sections/new-home-hero.liquid: success
-sections/newsletter.liquid: success
-sections/multicolumn.liquid: success
-sections/nm-accordion-module.liquid: success
-sections/nm-algolia-product-list.liquid: success
-sections/nm-alternating-featured-content.liquid: success
-sections/nm-ask-our-experts-bios.liquid: success
-sections/nm-ask-an-expert-form.liquid: success
-sections/nm-acf-faq-page.liquid: success
2024-12-04T18:17:29.216Z: Uploading the following files:
-templates/article.json
-templates/blog.json
-templates/404.json
-templates/article.resource-details.json
-templates/cart.json
-templates/collection.bundles.json
-templates/collection.alternate-collection.json
-templates/collection.json
-templates/collection.wellblends.json
-templates/collection.wellblends-sleep.json
-templates/index.json
-templates/page.about.json
-templates/page.ask-our-experts-landing.json
-templates/list-collections.json
-templates/page.communication-preferences.json
-templates/page.coupons.json
-templates/page.contact.json
-templates/page.experts.json
-templates/page.get-started-landing.json
-templates/page.hcp-landing.json
-templates/page.json
-templates/page.learn.json
-templates/page.help-center.json
-templates/page.home.json
-templates/page.partner-with-nature-made.json
-templates/page.nurish-naturemade.json
-templates/page.quic.json
-templates/page.rdi-module-library.json
-templates/page.pickleball.json
-templates/page.quiz.json
-templates/page.resource-details.json
-templates/page.subscriptions.json
-templates/page.usp-survery-table.json
-templates/page.usp-verified-product-table.json
-templates/page.where-to-buy.json
-templates/page.wellblends.json
-templates/password.json
-templates/product.nurish.json
-templates/product.bundle.json
-templates/product.json
-templates/product.wellblends.json
-templates/search.json
-templates/product.recharge-bundle.json
2024-12-04T18:17:29.217Z: Sending "Admin" GraphQL request:
mutation themeFilesUpsert($files: [OnlineStoreThemeFilesUpsertFileInput!]!, $themeId: ID!) {
themeFilesUpsert(files: $files, themeId: $themeId) {
  upsertedThemeFiles {
    filename
    __typename
  }
  userErrors {
    filename
    message
    __typename
  }
  __typename
}
}

With variables:
{
"themeId": "gid://shopify/OnlineStoreTheme/123769127009",
"files": [
  {
    "filename": "templates/article.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/blog.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
      }
  },
  {
    "filename": "templates/404.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/article.resource-details.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/cart.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/collection.bundles.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/collection.alternate-collection.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/collection.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/collection.wellblends.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/collection.wellblends-sleep.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/index.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/page.about.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/page.ask-our-experts-landing.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/list-collections.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/page.communication-preferences.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/page.coupons.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/page.contact.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/page.experts.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/page.get-started-landing.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/page.hcp-landing.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/page.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/page.learn.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/page.help-center.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/page.home.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/page.partner-with-nature-made.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/page.nurish-naturemade.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/page.quic.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/page.rdi-module-library.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/page.pickleball.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/page.quiz.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/page.resource-details.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/page.subscriptions.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/page.usp-survery-table.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/page.usp-verified-product-table.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/page.where-to-buy.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/page.wellblends.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/password.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/product.nurish.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/product.bundle.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/product.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/product.wellblends.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
      }
  },
  {
    "filename": "templates/search.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  },
  {
    "filename": "templates/product.recharge-bundle.json",
    "body": {
      "type": "TEXT",
      "value": "REDACTED"
    }
  }
]
}

With request headers:
- X-Shopify-Shop: naturemade1-dev.myshopify.com
- User-Agent: Shopify CLI; v=3.71.1
- Keep-Alive: timeout=30
- Sec-CH-UA-PLATFORM: linux
- Content-Type: application/json

to https://theme-kit-access.shopifyapps.com/cli/admin/api/2024-10/graphql.json
2024-12-04T18:17:34.167Z: Request to https://theme-kit-access.shopifyapps.com/cli/admin/api/2024-10/graphql.json completed in 12629 ms
With response headers:
- cache-control: no-cache
- content-type: text/html
- server-timing: processing;dur=10189, socket_queue;dur=4.193, cfRequestDuration;dur=12312.999964
- x-request-id: 3037df53-9e06-488e-a483-15ddef4a350a-1733336241


╭─ error ──────────────────────────────────────────────────────────────────────╮
│                                                                              │
│                                                                              │
│  The Admin GraphQL API responded unsuccessfully with the HTTP status 502     │
│  and errors:                                                                 │
│                                                                              │
│  {}                                                                          │
│                                                                              │
│  Request ID: 3037df53-9e06-488e-a483-15ddef4a350a-1733336241                 │
│                                                                              │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

2024-12-04T18:17:34.196Z:
Running system process:
· Command: npm prefix
· Working directory: /home/patrick/themes/naturemade20241203

╭─ error ──────────────────────────────────────────────────────────────────────╮
│                                                                              │
│                                                                              │
│  The Admin GraphQL API responded unsuccessfully with the HTTP status 502     │
│  and errors:                                                                 │
│                                                                              │
│  {}                                                                          │
│                                                                              │
│  Request ID: 3037df53-9e06-488e-a483-15ddef4a350a-1733336241                 │
│                                                                              │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

Reproduction steps

Reference: Shopify documentation for CI/CD

  1. Add a very large file to the assets folder for the theme (4MB, for example)
  2. shopify auth logout
  3. export SHOPIFY_CLI_THEME_TOKEN="<THEME ACCESS TOKEN>"
  4. export SHOPIFY_FLAG_STORE="<STORE>"
  5. export SHOPIFY_FLAG_FORCE="1"
  6. shopify theme push --theme="cli-testing-ubuntu8-CI" --unpublished --verbose

Operating System

Ubuntu 22.04.5 LTS

Shopify CLI version (shopify --version)

3.71.1

Shell

bash

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

v20.12.0 (locally) and v23.3.0 (GitHub actions)

What language and version are you using in your application?

Liquid, JS, YML, etc.

@phv-ppuente phv-ppuente added the Type: Bug Something isn't working label Dec 4, 2024
@phv-ppuente
Copy link
Author

I'm quite sure this related to having relatively large files in the theme. We have assets in the JS folder up to ~160KB. When I remove them, the issue disappears.

@phv-ppuente
Copy link
Author

phv-ppuente commented Dec 4, 2024

Correction: This is caused by having large theme files. This particular theme has a ~4MB file that is the culprit. When I remove it, the issue disappears. I will work on the theme to address that file. I'll also leave this issue open for Shopify to determine if it is something that changed or needs to be resolved since it coincided with the 3.71.1 release.

It's also curious that when I encountered the issue, I was unable to reproduce it when using the CLI after logging in interactively. I only saw this while using the env vars for CI/CD.

@phv-ppuente
Copy link
Author

Correction to the correction: This is still happening today in new branches even after removing all files > 250KB from the theme. Only after removing all files in assets > 100KB was the issue resolved.

Curiously, the themes are actually being created in the store, but the CLI reports a 502 response and errors out.

@YourWishes
Copy link

YourWishes commented Dec 5, 2024

Also noticing this, fairly new behavior within the past week or two.

Request ID to review;

74fb721f-753c-4735-b4b3-99a9dae51073-1733431393

@graygilmore graygilmore added the Area: @shopify/theme @shopify/theme package issues label Dec 5, 2024
@graygilmore
Copy link
Contributor

Thank you both for the report. Can you confirm that you're both using the --password flag when you encounter the error?

We'll be looking at working on a fix for this shortly but in the mean time you can pin to 3.70.0 to get things back to working.

@graygilmore graygilmore added the Severity: 2 High Severity label Dec 5, 2024
@phv-ppuente
Copy link
Author

@graygilmore thank you for the follow up. I am not using the --password option inline. Rather, I set the corresponding env var (step 3 in steps to reproduce).

@briannanda
Copy link

I have same issue

@jmdrawneek
Copy link

We're also encountering this issue. Request IDs:
26ce2602-cf2d-4f92-9a7f-f6c143ca15e7-1734024093
48a508d6-91ef-4075-80ca-7926b7649698-173402410

@Waynenabors
Copy link

same, request ID: c016f226-b71c-4f46-993e-d9a06530eba9-1734106493

@Waynenabors
Copy link

I had to go back to 3.69.4 which could mean this is related to downloading theme files in batches

c0dd49b#diff-3fd7a9e29cd4a60ea93e98a1479c9766e74847f8170c7850792d59ba95522f14

@graygilmore
Copy link
Contributor

Hey all! Thanks for some additional request IDs. We're aware of the issue and will be looking at getting a fix out next week. Appreciate everyone's patience ❤

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 Severity: 2 High Severity Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants