Getting Authentication error [code: 10000] on deploy from wrangler

Hi, since yesterday I am getting a very annoying error. I have a opennextjs worker and I deploy pretty frequently to test, since I don't use the local development and preview. On running yarn wrangler deploy the second step in the script (opennextjs-cloudflare deploy) fails:
Successfully populated cache with 10 assets

Creating D1 table if necessary...
error Command failed.
Exit code: 1
Command: wrangler
Arguments: d1 execute NEXT_TAG_CACHE_D1 --command CREATE TABLE IF NOT EXISTS revalidations (tag TEXT NOT NULL, revalidatedAt INTEGER NOT NULL, UNIQUE(tag) ON CONFLICT REPLACE); --remote
Directory: /home/user/....
Output:

ERROR Wrangler command failed
error Command failed with exit code 1.
Successfully populated cache with 10 assets

Creating D1 table if necessary...
error Command failed.
Exit code: 1
Command: wrangler
Arguments: d1 execute NEXT_TAG_CACHE_D1 --command CREATE TABLE IF NOT EXISTS revalidations (tag TEXT NOT NULL, revalidatedAt INTEGER NOT NULL, UNIQUE(tag) ON CONFLICT REPLACE); --remote
Directory: /home/user/....
Output:

ERROR Wrangler command failed
error Command failed with exit code 1.
this had been a problem for a while, but I solved it by running the command that fails and then the deploy again.
yarn wrangler d1 execute NEXT_TAG_CACHE_D1 --command "CREATE TABLE IF NOT EXISTS revalidations (tag TEXT NOT NULL, revalidatedAt INTEGER NOT NULL, UNIQUE(tag) ON CONFLICT REPLACE);" --remote
yarn wrangler d1 execute NEXT_TAG_CACHE_D1 --command "CREATE TABLE IF NOT EXISTS revalidations (tag TEXT NOT NULL, revalidatedAt INTEGER NOT NULL, UNIQUE(tag) ON CONFLICT REPLACE);" --remote
However since yesterday 99% of the time I can't run it because of this:
šŸŒ€ Executing on remote database NEXT_TAG_CACHE_D1 (4b...):
šŸŒ€ To execute on your local development database, remove the --remote flag from your wrangler command.

✘ [ERROR] A request to the Cloudflare API (/accounts/.../d1/database/.../query) failed.

Authentication error [code: 10000]


Getting User settings...
šŸ‘‹ You are logged in with an OAuth Token, associated with the email ...@....com.
šŸŒ€ Executing on remote database NEXT_TAG_CACHE_D1 (4b...):
šŸŒ€ To execute on your local development database, remove the --remote flag from your wrangler command.

✘ [ERROR] A request to the Cloudflare API (/accounts/.../d1/database/.../query) failed.

Authentication error [code: 10000]


Getting User settings...
šŸ‘‹ You are logged in with an OAuth Token, associated with the email ...@....com.
The 0Auth token has d1 (write) permission. I tried wrangler logout/login several times, ran the command several times as well, even restarted the pc. The 1% this d1 command goes through everything is fine with the deployment. Is there a way to fix this, or maybe remove the d1 cahe command temporarily?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?