Closed Bug 1113355 Opened 6 years ago Closed 6 years ago

[Datastore] ConstraintError when upgrading the phone


(Core :: DOM: Core & HTML, defect)

Gonk (Firefox OS)
Not set



blocking-b2g 2.2+


(Reporter: julienw, Assigned: daleharvey)



(1 file)

After upgrading my phone, I got this error:

12-18 22:59:55.249   490   490 W Smart Collections: [JavaScript Error: "ConstraintError" {file: "jar:file:///system/b2g/omni.ja!/components/DataStoreImpl.js" line: 233}]

I saved the IDB I have on the phone but I don't really know which DB you'd like to see, especially with the weird file names. Please tell me what you need and I can attach to this bug.

Flags: needinfo?(bent.mozilla)
Attached file
Here are the DB for the datastores with issues.
You need to set PR_LOG_MODULES=IndexedDB:5 and that should tell you which db is being accessed.
Flags: needinfo?(bent.mozilla)
The issue is with the bookmarks_store. Deleting this one only made the phone boot again.
This looks like some kind of bug in DataStore
> 12-18 22:59:55.249   490   490 W Smart Collections: [JavaScript Error:
> "ConstraintError" {file:
> "jar:file:///system/b2g/omni.ja!/components/DataStoreImpl.js" line: 233}]

let request = aStore.add(aObj, aId);

This is what we do at that line. Can you tell me when this code is called?
Flags: needinfo?(felash)
I don't know about this at all.

Ben, Dale, you probably know when we add something in the bookmarks_store ?
Flags: needinfo?(felash)
Flags: needinfo?(dale)
Flags: needinfo?(bfrancis)
triage: removing the nomination for now.
Hi Julien,
Do you think there's a more general STR which end user may encounter?
If so, please go ahead and renominate.
blocking-b2g: 2.2? → ---
Flags: needinfo?(felash)
This is an upgrade bug, this is happening with my data, so this _will_ happen with other data as well.

The STR should be simple: flash the datastore in the attached file with a newer build.
blocking-b2g: --- → 2.2?
Flags: needinfo?(felash)
blocking-b2g: 2.2? → 2.2+
Julien, are you still able to reproduce this issue?
Flags: needinfo?(felash)
Sorry, been trying to clear out a long list of issues, finally on to take a look at this one now, ill check if it still reproduces
Assignee: nobody → dale
Flags: needinfo?(felash)
Flags: needinfo?(dale)
I tried to push these 2 db on a phone running central and I don't have the issue anymore.

So either it was fixed elsewhere or these files do not make a good testcase :/

We should try with a build from around when the bug was filed to see if the issue reproduces.
I tried flashing several base builds and havent been able to reproduce this, closing out unless someone else can manage
Closed: 6 years ago
Flags: needinfo?(bfrancis)
Resolution: --- → WORKSFORME
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.