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

(enhancement): Surface inner exception when uploading secrets fails #226

Closed
AdiRishi opened this issue Jan 3, 2024 · 3 comments · Fixed by #227
Closed

(enhancement): Surface inner exception when uploading secrets fails #226

AdiRishi opened this issue Jan 3, 2024 · 3 comments · Fixed by #227

Comments

@AdiRishi
Copy link
Contributor

AdiRishi commented Jan 3, 2024

There has been some scattered discussion on this in other issues but I'm making a seperate issue here as I plan on making a PR for this.

Currently, whenever there is an error uploading secrets, the wrangler-action shows Failed to upload secrets. but provides no additional context.
Screenshot 2024-01-02 at 2 56 08 pm

This makes it very very difficult to debug and have any idea on why the secret upload failed.

@vladinator1000
Copy link

@AdiRishi Did you get this working? I'm still seeing an opaque error on my end #162 (comment)

@AdiRishi
Copy link
Contributor Author

AdiRishi commented Mar 4, 2024

@vladinator1000 yes I solved my issue. The PR I made that was merged will show additional information when you run the action in debug mode on GitHub. You can enable debug mode when trying to re-run a failed job.
Screenshot 2024-03-05 at 9 38 41 am

In my case, I was passing an invalid wranglerVersion, and the debug log showed the following

🔑 Uploading secrets...
  Error: Invalid Version: latest
  ##[debug]TypeError: Invalid Version: latest
  ##[debug]    at new SemVer (file:///home/runner/work/_actions/cloudflare/wrangler-action/v3/dist/index.mjs:3094:13)
  ##[debug]    at compare (file:///home/runner/work/_actions/cloudflare/wrangler-action/v3/dist/index.mjs:3368:32)
  ##[debug]    at gt (file:///home/runner/work/_actions/cloudflare/wrangler-action/v3/dist/index.mjs:3379:29)
  ##[debug]    at semverCompare (file:///home/runner/work/_actions/cloudflare/wrangler-action/v3/dist/index.mjs:28453:24)
  ##[debug]    at uploadSecrets (file:///home/runner/work/_actions/cloudflare/wrangler-action/v3/dist/index.mjs:28653:13)
  ##[debug]    at main (file:///home/runner/work/_actions/cloudflare/wrangler-action/v3/dist/index.mjs:28561:15)
  ::endgroup::
Error: Failed to upload secrets.
Error: 🚨 Action failed

@vladinator1000
Copy link

Gotcha @AdiRishi, I tried running it in debug mode, but didn't see any extra information. It seems like a separate problem so I created a new issue #240

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants