gatsby: [gatsby-source-shopify] Build fails on Bulk operation in Shopify store with metafields
Preliminary Checks
- This issue is not a duplicate. Before opening a new issue, please search existing issues: https://github.com/gatsbyjs/gatsby/issues
- This issue is not a question, feature request, RFC, or anything other than a bug report directly related to Gatsby. Please post those things in GitHub Discussions: https://github.com/gatsbyjs/gatsby/discussions
Description
Last week we were using “gatsby-source-shopify”: “rc”,
We had some bulk operation failures on wednesday and on thursday we updated to gatsby-source-shopify 5.2.1. Which worked until monday.
On Monday we started getting a failure around the product_variant step of the process.
We’ve also tried gatsby-source-shopify 5.3.0.
We don’t have that many products 1000 or so with Metafields.
We’re noticing metafields in shopify have changed (definitions?) and we’re able to get the source plugin to work in another environment without metafields, same product count and configuration.
Reproduction Link
https://github.com/hudsonandtask/gatsbybulkerrorMetafields
Steps to Reproduce
- Run Gatsby Build or Gatsby Develop
- Build will error sourcing products
…
Expected Result
Build to complete sourcing all products with metafields
Actual Result
Build fails with the following errors:
gatsby build success open and validate gatsby-configs, load plugins - 1.239s success onPreInit - 0.039s info One or more of your plugins have changed since the last time you ran Gatsby. As a precaution, we’re deleting your site’s cache to ensure there’s no stale data. success initialize cache - 0.047s success copy gatsby files - 0.124s success Compiling Gatsby Functions - 0.340s success onPreBootstrap - 0.359s success createSchemaCustomization - 0.011s info Cache is cold, running a clean build success Waiting for operation gid://shopify/BulkOperation/474194149544 : FAILED - 0.002s info Initiating bulk operation query PRODUCTS success Waiting for bulk operation to complete - 131.175s - Polling bulk operation: gid://shopify/BulkOperation/474208895144 Status: FAILED Object count: 1353
ERROR #gatsby-source-shopify_111001
Operation PRODUCTS failed after 1353 objects
-
With status: FAILED - error code: INTERNAL_SERVER_ERROR
Error: Operation gid://shopify/BulkOperation/474208895144 failed with INTERNAL_SERVER_ERROR
-
operations.ts:190 completedOperation [rccommence-store]/[gatsby-source-shopify]/src/operations.ts:190:15
-
runMicrotasks
-
task_queues.js:93 processTicksAndRejections internal/process/task_queues.js:93:5
-
make-source-from-operation.ts:63 sourceFromOperation [rccommence-store]/[gatsby-source-shopify]/src/make-source-from-operation.ts:63:20
-
gatsby-node.ts:88 sourceAllNodes [rccommence-store]/[gatsby-source-shopify]/src/gatsby-node.ts:88:5
-
gatsby-node.ts:210 Object.sourceNodes [rccommence-store]/[gatsby-source-shopify]/src/gatsby-node.ts:210:5
-
api-runner-node.js:432 runAPI [rccommence-store]/[gatsby]/src/utils/api-runner-node.js:432:16
-
not finished source and transform nodes - 132.682s not finished Source from bulk operation PRODUCTS - 132.617s
Environment
System:
OS: macOS 11.4
CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 14.16.1 - /usr/local/bin/node
npm: 6.14.13 - /usr/local/bin/npm
Languages:
Python: 2.7.16 - /usr/bin/python
Browsers:
Chrome: 92.0.4515.131
Edge: 92.0.902.67
Firefox: 82.0.3
Safari: 14.1.2
npmPackages:
gatsby: ^3.10.2 => 3.10.2
gatsby-plugin-gatsby-cloud: ^2.4.1 => 2.5.0
gatsby-plugin-image: ^1.4.0 => 1.5.0
gatsby-plugin-react-helmet: ^4.4.0 => 4.5.0
gatsby-plugin-sharp: ^3.4.1 => 3.5.0
gatsby-plugin-sitemap: ^4.0.0 => 4.1.0
gatsby-source-filesystem: ^3.4.0 => 3.5.0
gatsby-source-shopify: ^5.2.1 => 5.3.0
gatsby-transformer-sharp: ^3.4.0 => 3.5.0
npmGlobalPackages:
gatsby-cli: 3.3.0
Config Flags
flags: { FAST_DEV: true, DEV_SSR: false },
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (5 by maintainers)
It works!!!
@hudsonandtask @sonomesbah here’s a canary version I released that updates the API version and hopefully fixes the issues. Try it out here and let me know if it works
gatsby-source-shopify@5.4.0-alpha-gatsby-source-shopify.9
@DanielSLew Ok thats super helpful thanks, we’re looking into valueType now.
It looks like Shopify has deprecated the
valueType
field in exchange for a more robusttype
field in the latest API. It seems like it may be an error on their side with accidentally deprecating it in older versions of the API as well, so we might have to get rid of thevalueType
field. I’m guessing they’ve added the more robust type definitions on your store if it’s newer, whereas the shopify plugin uses a version that does not account for the new fieldtype
.Let me know if you’re able to fix the
valueType
thing on your end, if not, chances are this is going to be a problem for other stores as well.