cloudflare / cloudflare/developer-platform

D1 database is visible in dashboard and d1 list but Wrangler returns errors 7404 and 10181

Đang mở
#69 2 bình luận 2 reaction 0 người được giao Xem trên GitHub
product:d1
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
1
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### What versions & operating system are you using?

Reported by: Jim Acquaviva

Operating system: Windows 11
Node.js: v24.19.0
npm: 11.17.0
Wrangler tested: 4.121.0 and 4.120.1

The same problem occurs with both Wrangler versions.

### Please provide a link to a minimal reproduction

https://github.com/cloudflare/workers-sdk/issues/10897

### Describe the Bug

I have an existing Cloudflare D1 database named bcb-inventory. It is visible in the Cloudflare dashboard, appears when I run `npx wrangler d1 list`, and works correctly through the D1 dashboard Console.

The database is also successfully bound to my currently active Worker as `DB`, and the live Worker continues to operate.

However, Wrangler cannot access this same database for migrations or validate it during a new deployment.

Running:

`npx wrangler d1 migrations list bcb-inventory --remote`

returns error 7404 stating that the database cannot be found.

Running:

`npm run deploy`

uploads the Worker assets successfully but fails while creating the new Worker version. It returns error 10181 stating that the D1 database UUID could not be found.

I confirmed all of the following:

* Wrangler is logged into the correct Cloudflare account.
* The OAuth login was completely refreshed with `wrangler logout` and `wrangler login`.
* The database UUID in `wrangler.jsonc` matches the UUID returned by `wrangler d1 list`.
* The binding name is `DB`.
* The database has no special jurisdiction; JSON output reports `"jurisdiction": null`.
* The problem occurs with Wrangler 4.121.0 and 4.120.1.
* The database remains accessible through the Cloudflare dashboard Console.
* The existing production Worker already has a functioning `DB → bcb-inventory` binding.
* The failed deployment does not create or activate a new Worker version.

This appears to be an inconsistency between the D1 dashboard/control plane and the API used by Wrangler.

### Please provide any relevant error logs

_No response_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với bản tái hiện tối thiểu được liên kết trong issue 10897 và kiểm tra các lệnh Wrangler `d1 migrations list --remote` và `npm run deploy`. Kiểm tra cách UUID của cơ sở dữ liệu từ `wrangler.jsonc` được truyền trong quá trình tra cứu migration và tạo phiên bản Worker. Hoàn thành khi cơ sở dữ liệu `bcb-inventory` hiện có được tìm thấy một cách nhất quán và quá trình triển khai không còn trả về các lỗi 7404 hoặc 10181.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
node.js
Lĩnh vực
cloud, databases, devops
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
42/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.