aws / aws/bedrock-agentcore-sdk-python
Browser profile restores cookie but not localStorage across sessions in two regions
- Vorherrschende Sprache
- Python
- Sterne
- 761
- Forks
- 147
- Ø Merge
- 1 T. 23 Std.
- Gemergte PRs (30 T.)
- 7
Beschreibung
**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.
Beitragsleitfaden
Rechercherichtung
Keine Repository-Datei oder kein Test ist identifiziert. Beginnen Sie mit der Prüfung der Dokumentation zum Speichern/Laden von Browser Profile sowie des Ablaufs von SaveBrowserSessionProfile und GetBrowserProfile und führen Sie anschließend die minimale Playwright-Sequenz in eu-central-1 und us-west-2 erneut aus. Als erledigt gilt die Bestätigung der Unterstützung für die Wiederherstellung von localStorage, die Identifizierung eines erforderlichen Lifecycle-Schritts oder die Dokumentation der Einschränkung bzw. des Servicefehlers.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- aws, playwright, python
- Bereich
- backend-api-design, cloud
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 30/100