anthropics / anthropics/claude-code

Artifact db capability: reads/writes silently fail (no data persists) across networks, browsers, devices

Đang mở
#93,261 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:claude-code-web bug platform:web
Ngôn ngữ chính
Python
Star
145k
Fork
23.1k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

### Preflight Checklist

- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code

### What's Wrong?

When using a Claude Artifact with the `db` capability declared, data does not persist and reads always return empty — even though the artifact tool's own read_db/write_db confirm the documents exist server-side.

Symptoms:
- Adding an item via the app's own UI appears to save (optimistic UI update), but disappears after a page refresh.
- All read queries return empty results, with no error banner shown.
- Reproduced on a brand-new artifact with default (no custom) db capability settings — not specific to one artifact.
- Reproduced on: normal Chrome tab, Incognito mode, home WiFi, and mobile data (cellular) — ruling out network/extension causes.
- Browser console shows this error on every page load:
Unsafe attempt to load URL http://160.79.104.10:6080/php/urlblock.php?args=... from frame with URL https://claude.ai/code/artifact/... . Domains, protocols and ports must match.

This looks like a platform-side issue establishing the db capability's backend connection for my account, not an artifact code bug.

Affected artifact: https://claude.ai/code/artifact/8daf8fda-ea31-4372-ad40-e5985d9eab4c

### What Should Happen?

Data entered or read through an Artifact's `db` capability should persist to the server and be readable again after a page refresh, on any network/browser/device — matching what the artifact tool's own read_db/write_db actions show is actually stored.

### Error Messages/Logs

```shell

```

### Steps to Reproduce

1. Publish a Claude Artifact with capabilities: {db: {}} declared.
2. Open the published artifact URL in a normal Chrome tab (also reproduced in Incognito mode, on home WiFi, and on mobile cellular data).
3. Use the artifact's own UI to add/save an item (it appears immediately via optimistic UI update).
4. Refresh the page.
5. The item is gone, and any db read (e.g. window.claude.use('db').then(db => db.collection(...).get())) returns 0 documents — even though the artifact tool's own read_db/write_db actions (used from the Claude session that built the artifact) confirm the documents exist server-side.
6. Reproduced this on a brand-new, separate artifact with no custom db rules — not specific to one artifact.
7. Browser console shows this error on every load: "Unsafe attempt to load URL http://160.79.104.10:6080/php/urlblock.php?args=... from frame with URL https://claude.ai/code/artifact/... . Domains, protocols and ports must match."

### Claude Model

None

### Is this a regression?

No, this never worked

### Last Working Version

_No response_

### Claude Code Version

2.1.260 (Claude Code)

### Platform

Anthropic API

### Operating System

Windows

### Terminal/Shell

Terminal.app (macOS)

### Additional Information

_No response_

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

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

No repository file or test entry point is named in the report. Start by reproducing the published artifact's db-capability steps at the linked artifact URL, then inspect the browser console and compare the artifact UI's reads and writes with the tool-confirmed server data. Done means persisted data is readable after refresh across the reported browsers, networks, and devices.

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

Đánh giá

Lĩnh vực
api, backend, databases
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/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.