cloudflare / wrangler-action

🧙‍♀️ easily deploy cloudflare workers applications using wrangler and github actions
Apache License 2.0
1.26k stars 159 forks source link

Fails to Deploy using Account API Tokens #296

Closed shawncarr closed 5 days ago

shawncarr commented 1 month ago

As a call out I tried to use Account API Tokens, which I know are in beta, for my apiToken property. It would successfully deploy but then it would return an error trying to do something with the routes endpoint.

 ⛅️ wrangler 3.78.11 (update available 3.78.12)
  -----------------------------------------------

  Total Upload: 33.26 KiB / gzip: 12.32 KiB
  Worker Startup Time: 12 ms
  Uploaded workers (2.55 sec)

  ✘ [ERROR] A request to the Cloudflare API (/accounts/***/workers/scripts/workers/routes) failed.

    An unknown error has occured. If this error persists, please file a report in the workers-sdk GitHub repository (https://github.com/cloudflare/workers-sdk/issues) or reach out to your account team. [code: 10002]

I switched to the documented User Api Token and the problem went away.

shahsimpson commented 1 week ago

Does this problem persist if you update to the latest wrangler?

shawncarr commented 1 week ago

Yes it does seem to be working now.