[Shopify API updated error?] since September 15, 2022- shopifyQuery error: ClientError: undefined.

Solved

[Shopify API updated error?] since September 15, 2022- shopifyQuery error: ClientError: undefined.

FelixLe
Tourist
4 1 0

Hi, support teams,

 

Please help me to resolve this problem when building the production version.

 

Before September 15, 2022, I built the website normally. After that, I could not build even though I did not change anything (built from some old branch worked) and the error is below:

(I used heroku to deploy the project)

 

remote:        success Fetched Strapi Data - 7.669s
remote:        shopifyQuery error:  ClientError: undefined: {"response":{"errors":"Not Found","status":404,"headers":{}},"request":{"query":"\n    mutation {\n      bulkOperationRunQuery(\n       query: \"\"\"\n        {\n    collections(query: \"updated_at:>'2020-04-04 00:00:00'\") {\n      edges {\n        node {\n          id\n          handle\n          title\n          description\n          descriptionHtml\n          publishedOnCurrentPublication\n          image {\n            id\n            altText\n            src\n          }\n          products(first: 100) {\n            edges {\n              node {\n                id\n              }\n            }\n          }\n          metafields(first: 100) {\n            edges {\n              node {\n                id\n                namespace\n                key\n                value\n                valueType\n                description\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n        \"\"\"\n      ) {\n        bulkOperation {\n          id\n          status\n        }\n        userErrors {\n          field\n          message\n        }\n      }\n    }\n  "}}
remote:            at /tmp/build_bb13604c/node_modules/graphql-request/src/index.ts:410:11
remote:            at step (/tmp/build_bb13604c/node_modules/graphql-request/dist/index.js:63:23)
remote:            at Object.next (/tmp/build_bb13604c/node_modules/graphql-request/dist/index.js:44:53)
remote:            at fulfilled (/tmp/build_bb13604c/node_modules/graphql-request/dist/index.js:35:58)
remote:            at runMicrotasks (<anonymous>)
remote:            at processTicksAndRejections (internal/process/task_queues.js:93:5) {
remote:          response: {
remote:            errors: 'Not Found',
remote:            status: 404,
remote:            headers: Headers { [Symbol(map)]: [Object: null prototype] }
remote:          },
remote:          request: {
remote:            query: '\n' +
remote:              '    mutation {\n' +
remote:              '      bulkOperationRunQuery(\n' +
remote: error UNHANDLED REJECTION Cannot read property 'data' of undefined
remote:              '       query: """\n' +
remote:              '        {\n' +
remote:              `    collections(query: "updated_at:>'2020-04-04 00:00:00'") {\n` +
remote:              '      edges {\n' +
remote:              '        node {\n' +
remote:              '          id\n' +
remote:              '          handle\n' +
remote:              '          title\n' +
remote:              '          description\n' +
remote:              '          descriptionHtml\n' +
remote:              '          publishedOnCurrentPublication\n' +
remote:              '          image {\n' +
remote:              '            id\n' +
remote:              '            altText\n' +
remote:              '            src\n' +
remote:              '          }\n' +
remote:              '          products(first: 100) {\n' +
remote:              '            edges {\n' +
remote:              '              node {\n' +
remote:              '                id\n' +
remote:              '              }\n' +
remote:              '            }\n' +
remote:              '          }\n' +
remote:              '          metafields(first: 100) {\n' +
remote:              '            edges {\n' +
remote:              '              node {\n' +
remote:              '                id\n' +
remote:              '                namespace\n' +
remote:              '                key\n' +
remote:              '                value\n' +
remote:              '                valueType\n' +
remote:              '                description\n' +
remote:              '              }\n' +
remote:              '            }\n' +
remote:              '          }\n' +
remote:              '        }\n' +
remote:              '      }\n' +
remote:              '    }\n' +
remote:              '  }\n' +
remote:              '        """\n' +
remote:              '      ) {\n' +
remote:              '        bulkOperation {\n' +
remote:              '          id\n' +
remote:              '          status\n' +
remote:              '        }\n' +
remote:              '        userErrors {\n' +
remote:              '          field\n' +
remote:              '          message\n' +
remote:              '        }\n' +
remote:              '      }\n' +
remote:              '    }\n' +
remote:              '  ',
remote:            variables: undefined
remote:          }
remote:        }
remote:        
remote:        
remote:          TypeError: Cannot read property 'data' of undefined
remote:          
remote:          - bulkCreationQuery.js:17 
remote:            [build_bb13604c]/[gatsby-source-shopify-admin]/queries/bulkCreationQuery.js:    17:17
remote:          
remote:          - runMicrotasks
remote:          
remote:          - task_queues.js:93 processTicksAndRejections
remote:            internal/process/task_queues.js:93:5
remote:          
remote:        
remote:        not finished source and transform nodes - 8.681s

 

 

 

My dependences:

 

My dependencies:

 

 

"dependencies": {
    "@babel/polyfill": "^7.11.5",
    "@material-ui/core": "^4.11.0",
    "@material-ui/icons": "^4.9.1",
    "@react-google-maps/api": "^2.10.2",
    "@sendgrid/mail": "^7.4.5",
    "animejs": "^3.2.0",
    "axios": "^0.21.1",
    "framer-motion": "^2.5.5",
    "gatsby": "^4.14.0",
    "gatsby-background-image": "^1.1.1",
    "gatsby-image": "^2.4.9",
    "gatsby-plugin-google-fonts": "^1.0.1",
    "gatsby-plugin-image": "^2.16.1",
    "gatsby-plugin-mailchimp": "^5.2.2",
    "gatsby-plugin-manifest": "^4.14.0",
    "gatsby-plugin-offline": "^3.2.13",
    "gatsby-plugin-postcss": "^5.14.0",
    "gatsby-plugin-purgecss": "^5.0.0",
    "gatsby-plugin-react-helmet": "^5.14.0",
    "gatsby-plugin-sass": "^2.3.12",
    "gatsby-plugin-sharp": "^4.14.1",
    "gatsby-plugin-sitemap": "^5.14.0",
    "gatsby-source-filesystem": "^4.14.0",
    "gatsby-source-shopify-admin": "^1.0.0",
    "gatsby-source-strapi": "0.0.12",
    "gatsby-transformer-sharp": "^4.14.0",
    "netlify-lambda": "^2.0.8",
    "node-sass": "^4.14.1",
    "path": "^0.12.7",
    "process": "^0.11.10",
    "prop-types": "^15.7.2",
    "react": "^17.0.1",
    "react-dom": "^17.0.1",
    "react-google-maps": "^9.4.5",
    "react-helmet": "^6.1.0",
    "react-intersection-observer": "^8.27.0",
    "react-markdown": "^4.3.1",
    "react-material-ui-form-validator": "^2.1.1",
    "react-mt-svg-lines": "^0.9.1",
    "react-slick": "^0.27.7",
    "sass": "^1.51.0",
    "slick-carousel": "^1.8.1",
    "styled-components": "^5.1.1",
    "tabler-icons-react": "^1.20.0"
  },

 

 

My gatsby config.js

 

 

{
      resolve: "gatsby-source-shopify-admin",
      options: {
        storeName: process.env.SHOPIFY_STORE_NAME,
        apiKey: process.env.SHOPIFY_ADMIN_API, // admin api key
        storefrontApiKey: process.env.SHOPIFY_STORE_FRONT,
        onlyPublished: false, // only show products that are currently published on the 'publication' aka the private app
        pollInterval: 1000 * 10,
        imagesMetafields: {
          product: null,
          collection: null,
        },
        relatedCollectionMetafields: null,
        verbose: false,
        restrictQueries: false, // Adds "(first: 1)" to collections query (then ONLY creates nodes for that collections product). Probably avoid using 'onlyPublished' at the same time, incase the 'first' collection returned isn't published on your sales channel (private app). This setting aims to help when builds are slow due to lots of images but you are happy to development with limited data; be warned this may create issues with data parity to Shopify (i.e. relatedCollectionMetafields would not have data if the selected collection isn't the 1 collection we have queried)
      },

 

 

my OS: macOS Monterey (ver 12.4)

Node version: v14.15.0

npm 6.14.8

 

Please help me, 

Thank you so much

Accepted Solution (1)
FelixLe
Tourist
4 1 0

This is an accepted solution.

I found the solution.

Please let me close this topic. Thanks

View solution in original post

Replies 3 (3)

FelixLe
Tourist
4 1 0

Before September 15, 2022, I could build the product version then upload it to netlify.com

However, the time, I could not do it the same way again. it can't deploy and no issue messenger.

 

2. then I tried to build and deploy the product version to heroku. It showed these error above.

 

Please help me.

 

Thank you so much

FelixLe
Tourist
4 1 0

3. the production version can be deployed normally when I disconnected my web with shopify API. 

So, Please check.

Thanks

FelixLe
Tourist
4 1 0

This is an accepted solution.

I found the solution.

Please let me close this topic. Thanks