Closed Bug 997461 Opened 7 years ago Closed 7 years ago

Can't open bookmarks installed with v1.3 in v1.4


(Firefox OS Graveyard :: Gaia::System, defect)

Gonk (Firefox OS)
Not set


(blocking-b2g:1.4+, b2g-v1.4 fixed, b2g-v2.0 fixed)

1.4 S6 (25apr)
blocking-b2g 1.4+
Tracking Status
b2g-v1.4 --- fixed
b2g-v2.0 --- fixed


(Reporter: julienw, Assigned: crdlc)


(Keywords: dataloss, regression)


(3 files)

Attached image 2014-04-17-00-30-53.png
* use a version v1.3
* launch browser
* install bookmarks on the homescreen
* upgrade to v1.4
* try to launch the bookmark

* we can open the bookmark

* this doesn't work, I have an error "unable to connect", "Firefox doesn't know how to open this address, because one of the following protocols (bookmark) isn't associated with any program or is not allowed in this context."

IMO this is a 1.4 blocker, this is a migration issue.

There is a minor bug involved: when changing the language, the title "unable to connect" is not translated to the new language while the body "Firefox doesn't know..." is correctly translated.
Note that it's easy to do upgrades using geeksphone phones and builds (that's what I did).

Otherwise depending where the faulty code is it's enough to just upgrade gecko and gaia, but without erasing the user data obviously.
blocking-b2g: 1.4? → 1.4+
Looks like this error message is defined as "unknownProtocolFound" in file. 

Gregor, since it's categorized as Gaia::System, would you mind finding someone to check this bug? Thank you very much!
Flags: needinfo?(anygregor)
Cristian might be a good candidate but Kyle might help out until he is back.
Flags: needinfo?(anygregor) → needinfo?(kyle)
Repro'd on desktop. Working on diagnosis now.
Assignee: nobody → kyle
Flags: needinfo?(kyle)
As of bug 964337 landing, the _INDEX_PREFIX variable in apps/homescreen/js/bookmarks.js got changed from "bookmark:" to "bookmark/". When we build the bookmark URL to send to the browser app, this is supposed to get stripped, using substr(_INDEX_PREFIX). However, if we upgrade the homescreen idb from 1.3 to 1.4, we have no special steps for the IDB upgrade, so we still have a bunch of bookmarks that start with "bookmark:", meaning that the string doesn't match and we don't strip anything, hence having "bookmark" as the protocol in the error message.

I'm not sure why this was changed in the first place, so ni'ing crdlc since he's supposed to be back from PTO soon anyways. My guess is that easiest fix would be just making _INDEX_PREFIX "bookmark/" again, but this may have impacts I'm not aware of.
Flags: needinfo?(crdlc)
Note that if we need to do a fix in IDB we'll need a specific new step instead of reusing the previous upgrade.
(and not only for me and my bookmark for 2048 ;) )
Stealing and fixing today
Assignee: kyle → crdlc
Flags: needinfo?(crdlc)
Attached file Patch v1 for MASTER
Kyle was right in his explanation. I changed this in order not to assume wrongly that the prefix was some kind of protocol but I didn't realize what I was adding an regression :(. My apologizes for my mistake mates
Attachment #8409573 - Flags: review?(kyle)
Attached file Patch v1 for v1.4!!!
Basically the base code is the same but both patches touch different test files so I decided to make two separate PR. Thanks a lot
Attachment #8409574 - Flags: review?(kyle)
Target Milestone: --- → 1.4 S6 (25apr)
Attachment #8409574 - Flags: review?(kyle) → review+
Attachment #8409573 - Flags: review?(kyle) → review+
Merged in master:
Closed: 7 years ago
Resolution: --- → FIXED
Verified on 1.4 that my old bookmarks can be opened now :) Thanks !
The old bookmarks never die XD, thanks for your excellent catch Julien
You need to log in before you can comment on or make changes to this bug.