carstenlebek/shopify-non-embedded-app-template

$appUrl

valentinetech opened this issue · 2 comments

Error: Variable $appUrl of type Url! was provided invalid value:

Impossible to run on it's own, both of your "templates" doesn't work.

Heres the full error:

                                                                            Error: Variable $appUrl of type Url! was provided invalid value: {"response":{"errors":[{"message":"Variable $appUrl of type Url! was provided invalid value","locations":[{"line":2,"column":40}],"extensions":{"value":null,"problems":[{"path":[],"explanation":"Expected value to not be null"}]}},{"message":"Variable $redir of type [Url]! was provided invalid value","locations":[{"line":2,"column":55}],"extensions":{"value":null,"problems":[{"path":[],"explanation":"Expected value to not be null"}]}}],"status":200,"headers":{}},"request":{"query":"\n  mutation appUpdate($apiKey: String!, $appUrl: Url!, $redir: [Url]!) {\n    appUpdate(input: {apiKey: $apiKey, applicationUrl: $appUrl, redirectUrlWhitelist: $redir}) {\n      userErrors {\n        message\n        field\n      }\n    }\n  }\n","variables":{"apiKey":"1e12f945680d9c145c6fb04e2g35035a8","applicationUrl":"https://7571-2405-201-9008-ecda-d7e7-f7f9-b73b-faf2.ngrok.io/app","redirectUrlWhitelist":["https://7571-2405-201-9008-ecda-d7e7-f7f9-b73b-faf2.ngrok.io/api/auth","https://7571-2405-201-9008-ecda-d7e7-f7f9-b73b-faf2.ngrok.io/api/auth/callback","https://7571-2405-201-9008-ecda-d7e7-f7f9-b73b-faf2.ngrok.io/api/auth/offline","https://7571-2405-201-9008-ecda-d7e7-f7f9-b73b-faf2.ngrok.io/api/auth/offline-callback"]}}}       at file:///home/ren/coding/shopify-non-embedded-app-template/node_modules/node_modules/graphql-request/dist/index.js:359:31
    at step (/home/ren/coding/shopify-non-embedded-app-template/node_modules/next/dist/compiled/@peculiar/webcrypto/webcrypto.js:31:3473)
    at Object.next (/home/ren/coding/shopify-non-embedded-app-template/node_modules/next/dist/compiled/@peculiar/webcrypto/webcrypto.js:31:2758)            at fulfilled (/home/ren/coding/shopify-non-embedded-app-template/node_modules/next/dist/compiled/@peculiar/webcrypto/webcrypto.js:31:2285)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {   statusCode: 200                                                           }

@valentineprojects @renhiyama looks like a couple variables are misnamed in the project -- to fix, in shopifyCli.mjs, change applicationUrl on line 79 to appUrl and redirectUrlWhitelist on line 80 to redir