D1 Access Error

Can you try logging out then back in?
14 Replies
u0
u0β€’2y ago
alexander@Alexanders-MacBook-Air u0-workers % npx wrangler login
⛅️ wrangler 2.2.1
-------------------
Attempting to login via OAuth...
Opening a link in your default browser: https://dash.cloudflare.com/oauth2/auth...

Successfully logged in.
alexander@Alexanders-MacBook-Air u0-workers % npx wrangler
alexander@Alexanders-MacBook-Air u0-workers % npx wrangler d1 create DurableObjectsHelper
🚧 'wrangler d1 <command>' is a beta command. Please report any issues to https://github.com/cloudflare/wrangler2/issues/new/choose

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

The given account is not valid or is not authorized to access this service [code: 7403]

If you think this is a bug, please open an issue at:
https://github.com/cloudflare/wrangler2/issues/new/choose
alexander@Alexanders-MacBook-Air u0-workers % npx wrangler login
⛅️ wrangler 2.2.1
-------------------
Attempting to login via OAuth...
Opening a link in your default browser: https://dash.cloudflare.com/oauth2/auth...

Successfully logged in.
alexander@Alexanders-MacBook-Air u0-workers % npx wrangler
alexander@Alexanders-MacBook-Air u0-workers % npx wrangler d1 create DurableObjectsHelper
🚧 'wrangler d1 <command>' is a beta command. Please report any issues to https://github.com/cloudflare/wrangler2/issues/new/choose

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

The given account is not valid or is not authorized to access this service [code: 7403]

If you think this is a bug, please open an issue at:
https://github.com/cloudflare/wrangler2/issues/new/choose
I am pretty sure the problem is the access was given to alex@udia.ca but my workers are all under alexanderwwong@gmail.com.
Cyb3r-Jak3
Cyb3r-Jak3β€’2y ago
What account do you get if you run wrangler whoami?
u0
u0β€’2y ago
alexander@Alexanders-MacBook-Air u0-workers % npx wrangler whoami
⛅️ wrangler 2.2.1
-------------------
Getting User settings...
πŸ‘‹ You are logged in with an OAuth Token, associated with the email 'alexanderwwong@gmail.com'!
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Account Name β”‚ Account ID β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Alexanderwwong@gmail.com's Account β”‚ d10b3c92205db41a51548f5ad4e33ffe β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
πŸ”“ Token Permissions: If scopes are missing, you may need to logout and re-login.
Scope (Access)
- account (read)
- user (read)
- workers (write)
- workers_kv (write)
- workers_routes (write)
- workers_scripts (write)
- workers_tail (read)
- d1 (write)
- pages (write)
- zone (read)
- offline_access
alexander@Alexanders-MacBook-Air u0-workers % npx wrangler whoami
⛅️ wrangler 2.2.1
-------------------
Getting User settings...
πŸ‘‹ You are logged in with an OAuth Token, associated with the email 'alexanderwwong@gmail.com'!
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Account Name β”‚ Account ID β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Alexanderwwong@gmail.com's Account β”‚ d10b3c92205db41a51548f5ad4e33ffe β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
πŸ”“ Token Permissions: If scopes are missing, you may need to logout and re-login.
Scope (Access)
- account (read)
- user (read)
- workers (write)
- workers_kv (write)
- workers_routes (write)
- workers_scripts (write)
- workers_tail (read)
- d1 (write)
- pages (write)
- zone (read)
- offline_access
Cyb3r-Jak3
Cyb3r-Jak3β€’2y ago
And you only have the one account correct? Not like the invite went to a different account? Also can you check under workers in the dashboard to see if D1 shows there
u0
u0β€’2y ago
No, I have another account but the workers are not underneath that one
Cyb3r-Jak3
Cyb3r-Jak3β€’2y ago
Under the workers drop down on the left do you see D1 for either account?
u0
u0β€’2y ago
I only see it under cdd8ae54e6524a20df9abd9f0d405c42 I don't see it under d10b3c92205db41a51548f5ad4e33ffe
Cyb3r-Jak3
Cyb3r-Jak3β€’2y ago
Ah it might have been enabled for the wrong account then
u0
u0β€’2y ago
Hi @Cyb3r-Jok3 , I trust you're having a good weekend! I wasn't sure if you had permissions to activate D1 on the other account or not, but do you know what the status of this is?
Cyb3r-Jak3
Cyb3r-Jak3β€’2y ago
I don’t have permissions to activate it on the other account. I can reach out to someone on Monday and see what they can do. And keeping the record clear, the only members who have orange roles are Cloudflare employees. Green and blue are volunteers
u0
u0β€’2y ago
Thanks for clarifying! Also for the record, you are an excellent community ambassador I'll wait until Monday then
Cyb3r-Jak3
Cyb3r-Jak3β€’2y ago
!remindme 1d poke someone about this
Flare
Flareβ€’2y ago
zepcheck I will remind you in 1 day at Nov 14, 2022 at 19:05 UTC Reminder for @Cyb3r-Jok3: poke someone about this Set <t:1668366340:R>
Cyb3r-Jak3
Cyb3r-Jak3β€’2y ago
I have reached out to someone. People are busy with Developer week stuff so hopefully Wednesday / Thursday @u000 now that D1 is in open alpha you should be all set