aws / aws/bedrock-agentcore-sdk-python
Browser profile restores cookie but not localStorage across sessions in two regions
- Lingua principale
- Python
- Stelle
- 761
- Fork
- 147
- Merge medio
- 1g 23h
- PR unite (30g)
- 7
Descrizione
**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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Non è stato identificato alcun file del repository né alcun test. Inizia esaminando la documentazione sul salvataggio/caricamento di Browser Profile e il flusso di SaveBrowserSessionProfile e GetBrowserProfile, quindi esegui nuovamente la sequenza minima di Playwright in eu-central-1 e us-west-2. Il lavoro è completato quando viene conferato il supporto per il ripristino di localStorage, viene identificato un eventuale passaggio di lifecycle necessario oppure viene documentata la limitazione o il difetto del servizio.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- aws, playwright, python
- Ambito
- backend-api-design, cloud
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Attiva
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 30/100