E2E smoke: Cannot read properties of undefined (reading 'bulkAdd') on first cold load #159
Labels
No labels
blocked:depends-p1
blocked:gate-research
blocked:lint-failed
blocked:needs-decision
blocked:needs-human
blocked:verify-failed
bug
data-loss
documentation
enhancement
feature-request
in-progress
needs-decompose
needs-triage
pwa
quickfix
security
security/high
security/medium
test
test-coverage
triage-approved
vault
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/kimi_agent_kin_app_sync#159
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found by: Playwright smoke test (e2e/01-smoke-routes.spec.ts) on 2026-08-13.
Repro: Load any route in a fresh browser context (no prior app data).
Where: First page error captured from
src/lib/store.ts(orsrc/lib/db.ts). Likely path:seedData()callsdb.something.bulkAdd(...)on a table that hasn't been declared yet, or a Dexie transaction table reference is captured before the schema upgrade finishes.Frequency: Always on cold load with no prior IndexedDB schema.
Workaround: Pre-seed via a previous visit that creates the schema, then reload.
Impact: Production users on a fresh install hit a blank dashboard with the seed failing silently. The unit tests pass because they reset mocks per-test and never exercise the real Dexie schema init path.
Suggested fix:
loadAll()/seedData()order of operations - make suredb.<table>.bulkAdd()is only called after Dexie reports the DB as open.e2e/that assertspageErrorevents are empty on first cold load.seedDatainto adb.open().then(...)so we know the schema is committed before reading/writing.Filed via Playwright smoke harness during e2e/CI setup work.
Closed — unable to reproduce on live device after Dexie fix.
Verified on 2026-09-09 via Android shakedown on a fresh
app-debug.apkbuilt frommain(commit9472f685), installed on KindleG001KT05122500T3(Android 9,targetSdk=36):adb shell pm clear com.kin.prmto wipe IndexedDBam force-stop+am startCannot read properties of undefined (reading 'bulkAdd')error in logcat.The fix in
7cd6ee7 fix(#159): use Dexie instance for table access in seedDatais effective on the live PWA-on-Capacitor build. Original repro path (cold-load IndexedDB schema race insrc/lib/store.ts/db.ts) no longer triggers.Sibling shakedown findings captured separately in #165.
— Closing as resolved. Reopen with a fresh repro if the bulkAdd crash returns on any platform.