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

πŸ› BUG: ✘ [ERROR] A request to the Cloudflare API ... failed. #179

Closed
mmhdi opened this issue Oct 3, 2023 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@mmhdi
Copy link

mmhdi commented Oct 3, 2023

Which Cloudflare product(s) does this pertain to?

Workers for Platforms, Workers Runtime, Wrangler core

What version(s) of the tool(s) are you using?

Wrangler 3.10.1, Wrangler Action 3.2

What version of Node are you using?

20.8.0

What operating system are you using?

Linux Ubuntu 22.04.3

Describe the Bug

Hi,
Wrangler Action was working 2 days ago, but now it shows error [ERROR] ParseError: A request to the Cloudflare API (/accounts/iiiiiiiiiiiiiiiiiiiidddddddddddd/workers/services/wordpress-plugins) failed., how can I fix it?

Please provide a link to a minimal reproduction

repository private

Please provide any relevant error logs

πŸš€ Running Wrangler Commands
  πŸš€ Executing command: npx wrangler deploy
   ⛅️ wrangler 3.10.1
  -------------------
  Total Upload: 0.23 KiB / gzip: 0.18 KiB
  
  ✘ [ERROR] A request to the Cloudflare API (/accounts/iiiiiiiiiiiiiiiiiiiidddddddddddd/workers/scripts/wordpress-plugins) failed.
  
    Authentication error [code: 10000]
    
    If you think this is a bug, please open an issue at: https://github.com/cloudflare/workers-sdk/issues/new/choose
  
  
  
  Error: ✘ [ERROR] ParseError: A request to the Cloudflare API (/accounts/iiiiiiiiiiiiiiiiiiiidddddddddddd/workers/services/wordpress-plugins) failed.
  
        at throwFetchError (/home/runner/work/wordpress-plugins/wordpress-plugins/node_modules/wrangler/wrangler-dist/cli.js:121072:17)
        at fetchResult (/home/runner/work/wordpress-plugins/wordpress-plugins/node_modules/wrangler/wrangler-dist/cli.js:121024:5)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
        at async deploy (/home/runner/work/wordpress-plugins/wordpress-plugins/node_modules/wrangler/wrangler-dist/cli.js:149579:31)
        at async Object.deployHandler [as handler] (/home/runner/work/wordpress-plugins/wordpress-plugins/node_modules/wrangler/wrangler-dist/cli.js:138908:3) {
      text: 'A request to the Cloudflare API (/accounts/iiiiiiiiiiiiiiiiiiiidddddddddddd/workers/services/wordpress-plugins) failed.',
      notes: [ { text: 'Authentication error [code: 10000]' } ],
      location: undefined,
      kind: 'error',
      code: 10000
    }
  
  
  
Error: `npx wrangler deploy` returned non-zero exit code.
Error: 🚨 Action failed
------------------------------------------------------------------------------------------
wrangler-action.yml
-------------------------------
name: Wrangler Action

on:
  push:
    branches:
      - main

jobs:
  deploy:
    runs-on: ubuntu-latest
    name: Deploy
    steps:
      - uses: actions/checkout@v4

      - name: Set up Node.js
        uses: actions/setup-node@v3
        with:
          node-version: 20

      - name: Deploy
        uses: cloudflare/wrangler-action@v3
        with:
          apiToken: "aaaaaaaaaapppppppppiiiiiiiii"
          accountId: "iiiiiiiiiiiiiiiiiiiidddddddddddd"
          wranglerVersion: "3.10.1"
          packageManager: "npm"
@mmhdi mmhdi added the bug Something isn't working label Oct 3, 2023
@admah
Copy link

admah commented Oct 4, 2023

Hello πŸ‘‹ This looks like an authentication error with the wrangler GitHub action. Did you set everything up per the instructions at https://github.com/cloudflare/wrangler-action?

@mmhdi
Copy link
Author

mmhdi commented Oct 4, 2023

Yes, it was working previously, now with version 3.2 it does not work, even when I go back to the old versions

@admah
Copy link

admah commented Oct 4, 2023

@mmhdi I think it's an auth error, not a Wrangler/Action issue. Can you try setting a new API token per the instructions here: https://github.com/cloudflare/wrangler-action#authentication ?

@admah admah transferred this issue from cloudflare/workers-sdk Oct 4, 2023
@1000hz
Copy link
Contributor

1000hz commented Oct 30, 2023

Closing this issue as it sounds like the problem is an API Token that expired. Please reopen if this turns out not to be the cause.

@1000hz 1000hz closed this as completed Oct 30, 2023
@github-project-automation github-project-automation bot moved this from Untriaged to Done in workers-sdk Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants