-
Notifications
You must be signed in to change notification settings - Fork 130
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]: shopify app deploy fails on token validation (non-interactive environment) (Simplified deployments) #2810
Comments
I believe the issue here was that the token expires after 6 months and this coincidentally happened the same day I switched to simplified deployments. |
Hi! I know that this is closed, but wanted to voice that this issue got us today. I totally understand that it's our responsibility to manage rotating this key (we're going to improve our process around this!), but if y'all have the opportunity to add key expiration info to the error message I think that will help other folks who've blundered there way into this problem |
hi folks, I bumped into the same error today while running
The suggestion mentioned above looks outdated. When I created a new token, it didn't ask me for any list of scopes (UI Extensions, Functions, etc) I would like the token to have. Instead, it directly created the token & gave it "Apps" access only. I cannot see any such UI which is shown here, I have owner access to partners dashboard. Stack Trace
> shopify app deploy --config staging -f --source-control-url https://github.com/razorpay/shopify-wallet/commit/30fd97bed93be93c7882d22370f10058ad09fffc
╭─ warning ────────────────────────────────────────────────────────────────────╮
│ │
│ The flag `api-key` has been deprecated in favor of `client-id` │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ error ──────────────────────────────────────────────────────────────────────╮
│ │
│ │
│ To investigate the issue, examine this stack trace: │
│ at tokenRequestErrorHandler │
│ (@shopify/cli-kit/src/private/node/session/exchange.ts:174) │
│ return new InvalidRequestError() │
│ at mapError (@shopify/cli-kit/src/public/node/result.ts:142) │
│ return err(mapper(this.error)) │
│ at requestAppToken │
│ (@shopify/cli-kit/src/private/node/session/exchange.ts:153) │
│ const value = │
│ tokenResult.mapError(tokenRequestErrorHandler).valueOrBug() │
│ at processTicksAndRejections (node:internal/process/task_queues:95) │
│ at async exchangeCustomPartnerToken │
│ (@shopify/cli-kit/src/private/node/session/exchange.ts:92) │
│ const newToken = await requestAppToken('partners', token, │
│ ['https://api.shopify.com/auth/partners.app.cli.access']) │
│ at async ensureAuthenticatedPartners │
│ (@shopify/cli-kit/src/public/node/session.ts:41) │
│ return (await exchangeCustomPartnerToken(envToken)).accessToken │
│ at async fetchPartnersSession │
│ (@shopify/app/src/cli/services/context/partner-account-info.ts:39) │
│ const token = await ensureAuthenticatedPartners() │
│ at async ensureDeployContext │
│ (@shopify/app/src/cli/services/context.ts:[37](https://github.com/razorpay/shopify-wallet/actions/runs/8477754319/job/23229073506#step:6:38)0) │
│ const partnersSession = await fetchPartnersSession() │
│ at async deploy (@shopify/app/src/cli/services/deploy.ts:49) │
│ let {app, identifiers, partnersApp, token, release} = await │
│ ensureDeployContext(options) │
│ at run (@shopify/app/src/cli/commands/app/deploy.ts:102) │
│ await deploy({ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
Error: Process completed with exit code 1. |
Please confirm that you have:
In which of these areas are you experiencing a problem?
App, Extension
Expected behavior
When running
shopify app deploy -f --no-release
in my github action it should create a new versionActual behavior
An error is thrown on token validation
Reproduction steps
yarn deploy-force --no-release
as a step in a jobOperating System
WSL 2 (Ubuntu 18)
Shopify CLI version (check your project's
package.json
if you're not sure)3.49.2
Shell
wsl
Node version (run
node -v
if you're not sure)18.16.1 (github action)
What language and version are you using in your application?
Node
The text was updated successfully, but these errors were encountered: