Closed
Bug 1211370
Opened 10 years ago
Closed 10 years ago
Get "task.target is undefined" error when deleting a history record from Places DataStore.
Categories
(Firefox OS Graveyard :: Gaia::Browser, defect, P1)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1216394
FxOS-S11 (13Nov)
People
(Reporter: selee, Assigned: selee)
References
Details
(Whiteboard: [systemsfe])
When the places record is removed from Places DataStore, the following error will popup:
JavaScript error: app://search.gaiamobile.org/shared/js/sync_datastore.js, line 89: TypeError: task.target is undefined
https://github.com/mozilla-b2g/gaia/blob/master/shared/js/sync_datastore.js#L89
after checking MDN DataStoreTask object, there is no 'target' property.
https://developer.mozilla.org/en-US/docs/Web/API/DataStoreTask
could someone give me a hint or direction how to fix it?
Assignee | ||
Comment 1•10 years ago
|
||
Hi Dale, Ben,
Per the bug description, it will fail to remove a place record.
Could you help to see this bug? This bug will affect the history synchronization feature.
Thank you. :)
Flags: needinfo?(dale)
Flags: needinfo?(bfrancis)
Assignee | ||
Updated•10 years ago
|
Updated•10 years ago
|
Whiteboard: [systemsfe]
Updated•10 years ago
|
Target Milestone: --- → FxOS-S9 (16Oct)
Comment 2•10 years ago
|
||
Sean, hey yup this is just using an old version of the datastore api and as it is a currently unused code path it never got updated, if you just change it to:
case 'remove':
var id = task.id;
SDS.persistStore.remove(id, SDS.store.revisionId);
Then it should be fine, thanks
Flags: needinfo?(dale)
Flags: needinfo?(bfrancis)
Assignee | ||
Comment 3•10 years ago
|
||
After apply Dale's suggestion, another error happens at [1]:
JavaScript error: app://search.gaiamobile.org/js/places_idb.js, line 88: TypeError: txn.objectStore(...).remove is not a function
[1] https://github.com/mozilla-b2g/gaia/blob/master/apps/search/js/places_idb.js#L88
Assignee | ||
Updated•10 years ago
|
Target Milestone: FxOS-S9 (16Oct) → FxOS-S11 (13Nov)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → selee
Updated•10 years ago
|
Priority: -- → P1
Assignee | ||
Comment 4•10 years ago
|
||
After verifying the patch at bug 1216394, it does fix the issue.
You need to log in
before you can comment on or make changes to this bug.
Description
•