aws / aws/bedrock-agentcore-sdk-python
Browser profile restores cookie but not localStorage across sessions in two regions
- Ngôn ngữ chính
- Python
- Star
- 761
- Fork
- 147
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 7
Mô tả
**Describe the behavior**
A Browser Profile created for the AWS-managed `aws.browser.v1` Browser restores a persistent cookie into a new profiled session, but does not restore a localStorage item from the same exact HTTPS origin. The result reproduced in both `eu-central-1` and `us-west-2` using identical client bytes.
I am trying to determine whether an additional documented lifecycle step is required, whether this is a known limitation, or whether it is unexpected service behavior.
**Minimal synthetic sequence**
1. Create one Browser Profile.
2. Start one unprofiled `aws.browser.v1` source session.
3. Navigate to exact `https://example.com`.
4. Set one persistent cookie and one localStorage item with synthetic values.
5. Reload the page and verify both values from the exact same origin.
6. Wait 500 ms, verify the origin again, then disconnect the local Playwright CDP client while leaving the AgentCore session active.
7. Call `SaveBrowserSessionProfile` exactly once.
8. Verify the Save response binds the exact profile, Browser, and source session. Poll `GetBrowserProfile` until `READY` with `lastSavedBrowserId` and `lastSavedBrowserSessionId` matching that source.
9. Stop the source session.
10. Start a new `aws.browser.v1` session with the exact saved profile and verify the profile configuration through session readback.
11. Navigate once to exact `https://example.com` and read the same page at cumulative 0, 5, 15, 30, and 60 seconds without renavigation.
At every restore checkpoint the final origin remained exact. The cookie was present at 0 seconds. The localStorage item was absent at every checkpoint through 60 seconds.
The same result occurred in Frankfurt and Oregon. The test used no custom Browser, enterprise policy, proxy, extension, model, or retailer content.
Both sessions were stopped after each run. All test-created stack, profile, and IAM resources were absent, and no reserved READY sessions remained, across ten repeated post-run checks in each region.
**Expected behavior**
The current Browser Profile documentation says that profile save/load captures and restores cookies and local storage. I expected the localStorage item from the verified source origin to be available in the new profiled session, as the cookie was.
Could you confirm:
- whether localStorage persistence is supported for `aws.browser.v1` in both regions;
- whether any additional flush, disconnect, Save, readiness, or restore sequence is required; and
- whether this is a known issue or limitation?
**Environment**
- `bedrock-agentcore` 1.21.0
- `boto3` 1.43.35
- `botocore` 1.43.35
- Playwright 1.62.0
- Python 3.12.3
- Linux x86_64
No account IDs, resource identifiers, request IDs, session IDs, credentials, signed URLs, or raw payloads are included here. I can provide private identifiers and UTC windows through an appropriate private AWS channel if needed.
Hướng dẫn đóng góp
Hướng nghiên cứu
Chưa xác định được tệp nào trong repository hoặc bài kiểm thử nào. Bắt đầu bằng cách xem lại tài liệu về việc lưu/tải Browser Profile và flow của SaveBrowserSessionProfile và GetBrowserProfile, sau đó chạy lại chuỗi Playwright tối thiểu ở eu-central-1 và us-west-2. Được xem là hoàn tất khi xác nhận hỗ trợ khôi phục localStorage, xác định bất kỳ bước lifecycle bắt buộc nào, hoặc ghi lại giới hạn hay lỗi của service.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- aws, playwright, python
- Lĩnh vực
- backend-api-design, cloud
- 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
- Cần làm rõ
- Mức phù hợp với người mới
- 30/100