Closed
Bug 828280
Opened 12 years ago
Closed 12 years ago
(packaged) App won't install without `developer` field in its manifest.
Categories
(Firefox OS Graveyard :: General, defect)
Firefox OS Graveyard
General
Tracking
(blocking-basecamp:-, firefox20 wontfix, firefox21 fixed, b2g18+ fixed)
People
(Reporter: ochameau, Assigned: ochameau)
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
2.21 KB,
patch
|
fabrice
:
review+
|
Details | Diff | Splinter Review |
We are seeing a installation succeed alert but can see a package installation failure in black bottom overlay. In logcat we can see INVALID_MANIFEST error being fired. We additional debug I found that AppsUtils.compareManifest is broken:
http://mxr.mozilla.org/mozilla-central/source/dom/apps/src/AppsUtils.jsm#332
Following code will throw exception `dev1 is undefined` if we don't specify any `developer` field in the webapp manifest.
Assignee | ||
Comment 1•12 years ago
|
||
Assignee | ||
Comment 2•12 years ago
|
||
Comment on attachment 699726 [details] [diff] [review]
Bug 828280 - (packaged) App won't install without `developer` field in its manifest.
I've also adding a reportError() instead of debug() in order to figure out issues without having to patch gecko.
Attachment #699726 -
Flags: review?(fabrice)
Comment 3•12 years ago
|
||
Comment on attachment 699726 [details] [diff] [review]
Bug 828280 - (packaged) App won't install without `developer` field in its manifest.
Review of attachment 699726 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/apps/src/AppsUtils.jsm
@@ +373,5 @@
> return this._localeProp("launch_path");
> },
>
> get developer() {
> + return this._localeProp("developer") || { name:"", url: "" };
I think you should do instead:
return this._localeProp("developer") || {};
Updated•12 years ago
|
blocking-basecamp: --- → ?
Assignee | ||
Comment 4•12 years ago
|
||
Julien, have you seen gaia bug 815501?
I've set empty strings in order to soften such potential bug in gaia.
blocking-basecamp: ? → ---
Updated•12 years ago
|
blocking-basecamp: --- → ?
Comment 5•12 years ago
|
||
I think this might be a regression from the MANIFEST_MISMATCH patch that was implemented.
Keywords: regression
Comment 6•12 years ago
|
||
Alexandre: if the dev didn't put anything we should not see anything (and not undefined, clearly). if he puts "" that means something else.
But I won't fight for that :)
Comment 7•12 years ago
|
||
Will not block on this patch, but will consider a safe patch for uplift.
blocking-basecamp: ? → -
Comment 8•12 years ago
|
||
(In reply to Doug Turner (:dougt) from comment #7)
> Will not block on this patch, but will consider a safe patch for uplift.
Disagree - this is too common of a case to not block.
blocking-basecamp: - → ?
Comment 9•12 years ago
|
||
(In reply to Jason Smith [:jsmith] from comment #8)
> (In reply to Doug Turner (:dougt) from comment #7)
> > Will not block on this patch, but will consider a safe patch for uplift.
>
> Disagree - this is too common of a case to not block.
And we don't have anything enforced on marketplace for this, nor do I think I'll be able to convince the marketplace team on this one (I guarantee I'll get a wont fix and say client has to fix it for v1).
Comment 10•12 years ago
|
||
Not blocking per triage, but we will consider a safe patch for uplift.
Assignee: nobody → poirot.alex
blocking-basecamp: ? → -
Comment 11•12 years ago
|
||
(In reply to Doug Turner (:dougt) from comment #10)
> Not blocking per triage, but we will consider a safe patch for uplift.
Still don't agree. I want a rationale why.
It's too basic not to block.
blocking-basecamp: - → ?
Comment 12•12 years ago
|
||
Yup, I was right. Marketplace doesn't enforce this property. So the argument to not block is wrong.
Comment 13•12 years ago
|
||
This is basically "let's not block for something that's been working for months" that is probably a small patch to fix. The functionality loss is significant too - the app doesn't install.
I really don't see any argument how this could not block.
Comment 14•12 years ago
|
||
Please, we lose so much energy doing this back and forth, just request an approval, land this, and let's move forward.
Comment 15•12 years ago
|
||
Comment on attachment 699726 [details] [diff] [review]
Bug 828280 - (packaged) App won't install without `developer` field in its manifest.
Review of attachment 699726 [details] [diff] [review]:
-----------------------------------------------------------------
r? pending clarification about my question. Also, please make sure that doesn't break tests.
::: dom/apps/src/AppsUtils.jsm
@@ +373,5 @@
> return this._localeProp("launch_path");
> },
>
> get developer() {
> + return this._localeProp("developer") || { name:"", url: "" };
If this is undefined/null, why return something else? Isn't it the case you take care of in AppsUtils.jsm?
Attachment #699726 -
Flags: review?(fabrice)
Comment 16•12 years ago
|
||
If data is needed from marketplace for the developer property usage, I can get it.
Comment 17•12 years ago
|
||
I'll show up to triage tomorrow to talk about this.
Comment 18•12 years ago
|
||
The developer field is, per the manifest spec on MDN, optional. If the spec is changed to require the field, I'll update the validator to account for the new requirement. Bear in mind, you'll also nominate more than a few dozen apps for rereview and tick off the editors.
Comment 19•12 years ago
|
||
I actually dug into this. Looks like we don't crash, but we throw:
01-09 17:39:55.984: E/GeckoConsole(815): Content JS INFO at app://system.gaiamobile.org/js/app_install_manager.js:187 in ai_handleDownloadError: downloadError event, error code is INVALID_PACKAGE
Updated•12 years ago
|
blocking-basecamp: ? → -
tracking-b2g18:
--- → +
Comment on attachment 699726 [details] [diff] [review]
Bug 828280 - (packaged) App won't install without `developer` field in its manifest.
Review of attachment 699726 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/apps/src/AppsUtils.jsm
@@ +307,5 @@
> return false;
> }
>
> + return (!dev1 && !dev2) ||
> + (dev1.name === dev2.name && dev1.url === dev2.url);
This doesn't cover the case when the dev property is available but is empty. Maybe something like:
return ((dev1 && dev1.name) === (dev2 && dev2.name)) &&
((dev1 && dev1.url) === (dev2 && dev2.url));
This relies on the lovely feature that in JS |undefined && X| returns undefined.
Comment 21•12 years ago
|
||
Comment on attachment 699726 [details] [diff] [review]
Bug 828280 - (packaged) App won't install without `developer` field in its manifest.
Review of attachment 699726 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/apps/src/AppsUtils.jsm
@@ +307,5 @@
> return false;
> }
>
> + return (!dev1 && !dev2) ||
> + (dev1.name === dev2.name && dev1.url === dev2.url);
Are you sure ?
If |dev| is available but empty, then |dev.name| will be undefined, right ? And therefore it will work.
IMHO we cover all the cases : dev1 is undefined but not dev2, dev2 is undefined but not dev1, dev1 and dev2 are both undefined, and dev1 and dev2 are both available.
Assignee | ||
Comment 22•12 years ago
|
||
Assignee | ||
Comment 23•12 years ago
|
||
Comment on attachment 701075 [details] [diff] [review]
Bug 828280 - (packaged) App won't install without `developer` field in its manifest.
fabrice, I've added a comment about your last review question.
I'm defaulting `developer` to `{}` in parallel of compareManifest fix in order to prevent same kind of exception somewhere else.
Feel free to r- this patch if you consider that it is important to stay in sync with original manifest and avoid any normalization.
Attachment #701075 -
Flags: review?(fabrice)
Assignee | ||
Comment 24•12 years ago
|
||
TEST_PATH=dom/tests/mochitest/webapps/ make mochitest-chrome -- PASS!
Assignee | ||
Updated•12 years ago
|
Attachment #699726 -
Attachment is obsolete: true
Updated•12 years ago
|
Attachment #701075 -
Flags: review?(fabrice) → review+
Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 26•12 years ago
|
||
That can still land on inbound
Comment 27•12 years ago
|
||
(In reply to Fabrice Desré [:fabrice] from comment #26)
> That can still land on inbound
Yeah that's true. But we should ask for approval on this one.
Keywords: checkin-needed
Assignee | ||
Comment 28•12 years ago
|
||
Comment on attachment 701075 [details] [diff] [review]
Bug 828280 - (packaged) App won't install without `developer` field in its manifest.
[Approval Request Comment]
Bug caused by (feature/regressing bug #):
User impact if declined: developers will have hard time figuring out why their app won't install if they omit developer field
Testing completed: app install/update on device and desktop webapps unit tests
Risk to taking this patch (and alternatives if risky):
String or UUID changes made by this patch:
Attachment #701075 -
Flags: approval-mozilla-b2g18?
Comment 29•12 years ago
|
||
Landing
https://hg.mozilla.org/integration/mozilla-inbound/rev/ea7baeb8f451
https://hg.mozilla.org/releases/mozilla-b2g18/rev/dc4f5e104c4e
(fabrice said to land it)
marking fixed as per the new jst rules
Updated•12 years ago
|
Attachment #701075 -
Flags: approval-mozilla-b2g18?
Comment 30•12 years ago
|
||
Updated•12 years ago
|
status-b2g18:
--- → fixed
status-firefox20:
--- → wontfix
status-firefox21:
--- → fixed
Target Milestone: --- → B2G C4 (2jan on)
You need to log in
before you can comment on or make changes to this bug.
Description
•