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 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโค
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
fordb-dev-dynam
instead of the correct ID********-****-****-****-aea160885d60
found in the list. The difference is only the last zero.Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response