cloudflare / workers-sdk

โ›…๏ธ Home to Wrangler, the CLI for Cloudflare Workersยฎ
https://developers.cloudflare.com/workers/
Apache License 2.0
2.42k stars 594 forks source link

๐Ÿ› BUG: D1 Export Fails Due to Wrangler Missing the Last Character, a Zero, in the DB ID #6019

Open TimPeterNL opened 3 weeks ago

TimPeterNL commented 3 weeks ago

Which Cloudflare product(s) does this pertain to?

D1

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

3.60.2 [Wrangler], latest [D1]

What version of Node are you using?

18.18.2

What operating system and version are you using?

Windows 11

Describe the Bug

D1 Bug Report - Export Fails Due to Wrangler Missing the Last Character (a Zero) in the DB ID For one of our D1 databases, when performing an export, we receive a message indicating that it failed to decode the ID. Upon checking, it appears that the last character of the database UUID is missing. The last character for this specific DB should be a zero. The CLI command: npx wrangler d1 export db-dev-dynam --remote --output=./test.sql returns the error message: The request is malformed: failed to decode ID [code: 7400]

Complete CLI Output Note that it uses the ID ********-****-****-****-aea160885d6 for db-dev-dynam instead of the correct ID ********-****-****-****-aea160885d60 found in the list. The difference is only the last zero.

PS C:\**********> npx wrangler d1 export db-dev-dynam --remote --output=./test.sql 

 โ›…๏ธ wrangler 3.60.2
-------------------

๐ŸŒ€ Executing on remote database db-dev-dynam (********-****-****-****-aea160885d6):
๐ŸŒ€ Creating export...

X [ERROR] A request to the Cloudflare API (/accounts/********************************/d1/database/********-****-****-****-aea160885d6/export) failed.

  The request is malformed: failed to decode ID [code: 7400]

  If you think this is a bug, please open an issue at:
  https://github.com/cloudflare/workers-sdk/issues/new/choose

PS C:\**********> npx wrangler d1 list    

 โ›…๏ธ wrangler 3.60.2
-------------------

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ uuid                                 โ”‚ name          โ”‚ version    โ”‚ created_at               โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ ********-****-****-****-aea160885d60 โ”‚ db-dev-dynam  โ”‚ production โ”‚ 2024-05-10T09:55:51.134Z โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ ********-****-****-****-c9c88e0783be โ”‚ test          โ”‚ production โ”‚ 2024-03-09T11:20:59.537Z โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

No response