Cannot enable add-ons installed from WebIDE

RESOLVED FIXED

Status

Firefox OS
Runtime
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: daleharvey, Assigned: fabrice)

Tracking

({regression, verifyme})

unspecified
ARM
Gonk (Firefox OS)
regression, verifyme

Firefox Tracking Flags

(firefox45 fixed, b2g-master affected)

Details

Attachments

(4 attachments)

(Reporter)

Description

3 years ago
Created attachment 8682002 [details]
helloworld.zip

Been seeing different issues with addons, with latest nightly I am seeing them completely broken.

I have made a hello world add on, it is working fine on desktop and has worked on previous version of firefox os

I need to install the addon twice via webide for it to show up in the list of addons, I then click 'enable' and nothing happens (it is a content script so I would expect apps to reload). When I go back to the addon listing it is listed as disabled
(Reporter)

Updated

3 years ago
Blocks: 1216301
Note that the add-on note showing up in Settings right away is bug 1220195.
Flags: needinfo?(dale)
Summary: Addons are broken → Cannot enable add-ons installed from WebIDE
ni? on dale was meant to ask for logcat.

Dale, anything interesting in logcat?
(Reporter)

Comment 3

3 years ago
There was nothing in logcat, it seemed like it literally did nothing, however it doesnt block silent updates any more since I got install via marketplace working
No longer blocks: 1216301
Flags: needinfo?(dale)
(Reporter)

Updated

3 years ago
Blocks: 1221556
(Reporter)

Updated

3 years ago
No longer blocks: 1221556
Do we know if multiple people are experiencing this issue?
Flags: needinfo?(dale)
(Reporter)

Comment 5

3 years ago
Nope I have no idea, another datapoint is that when I install it it says 'no apps affected', it has a content script with <all_urls>, when I install it via the marketplace it shows the correct affected apps
Flags: needinfo?(dale)
(Assignee)

Comment 6

3 years ago
The last point may be because the marketplace copies the content_scripts property from manifest.json to the update manifest.
Yeah, facing same issue. Add-on from marketplace seems fine but not while using latest webide.
(In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #4)
> Do we know if multiple people are experiencing this issue?

I have the same issue too. I'm pretty sure this issue effects everyone. I have been using old builds to properly develop add-ons.
(Assignee)

Comment 9

3 years ago
Can someone bisect?
Flags: needinfo?(wchen)
Flags: needinfo?(mlien)
The add-on install path WebIDE uses is somewhat low-level and duplicates some things from the regular path, so it could that something has changed that needs to be added to WebIDE's path as well.
Now able to inject addon in sms too. Got it working. :)
But this issue(what's there in description) is still there.
Thanks
But after restarting the device, it shows addon is enable, but still it is not injected. I have to disable and enable it again, to make it work.

Anyway i got it working somehow. now can continue my work on addon

Thanks

Build: Today's nightly-latest update. git commit info: f39a7a82, build identifier : 20151106030214

Updated

3 years ago
Flags: needinfo?(mlien)
Keywords: regression, regressionwindow-wanted
When I tried to add the helloworld as a packaged app it shows an error on WebIDE: "Packaged apps require a manifest file that can only be named 'manifest.webapp' at project root folder"

Please address this before we can attempt to find a regression window.
Flags: needinfo?(mlien)
Flags: needinfo?(dale)
Just as a note, I believe we should be searching for a regression on the device side, not on desktop Firefox, however it's possible on either end.  I am suspecting the device side first because there have not been many changes to WebIDE recently.

That may already be what other assumed as well, just wanted to say it explicitly.

Comment 15

3 years ago
I guess what the problem Pi Wei encountered is due to WebIDE from beta/release Firefox
Since the add-on's manifest is not manifest.webapp but manifest.json, please use the WebIDE from nightly Fireforx to install add-on

Pi Wei, could you help to confirm this again with WebIDE from nightly firefox?
Flags: needinfo?(mlien) → needinfo?(pcheng)
Created attachment 8686199 [details]
logcat half reproducing the issue on Aries

I installed firefox browser nightly version 45.0a1 (2015-11-11) and I was able to install the helloworld addon on first try. It pops up a banner at the bottom saying Helloworld installed or something along that line. The addon itself, however, could NOT be enabled in Settings > Add-ons. Every time I go in there to enable it, it shows it's disabled when I back out to add-ons main menu. I don't know if it's a problem with this addon or something else.

Short answer: I can reproduce only part of the bug where addon shows disabled after I enable it. I cannot reproduce the part where addon can't get added on first try.

I have uploaded my logcat on this issue.

This is observed on both Aries and Flame:
Device: Aries 2.6
BuildID: 20151111130110
Gaia: 22f8023b112dfae83531b0a075ab9eb9a5444dfa
Gecko: 84a7cf29f4f14c9b359db2f7f19c0abd6a8e178e
Gonk: a19052e4389c3ae2d8fc3e7a74a475401baacc56
Version: 45.0a1 (2.6) 
Firmware Version: D5803_23.1.A.1.28_NCB.ftf
User Agent: Mozilla/5.0 (Mobile; rv:45.0) Gecko/45.0 Firefox/45.0

Device: Flame 2.6
BuildID: 20151111030246
Gaia: c0482775b1526add626b170dd53a72d10bcaf07c
Gecko: cc473fe5dc512c450634506f68cbacfb40a06a23
Gonk: 205ac4204bbbb2098a8046444acba551ba5dc75a
Version: 45.0a1 (2.6) 
Firmware Version: v18D
User Agent: Mozilla/5.0 (Mobile; rv:45.0) Gecko/45.0 Firefox/45.0

Note:
QA will need reporter to test this on latest and see if they're still seeing the 'unable to install on first try' issue. We need to confirm bug behavior before we can attempt regression window.
Flags: needinfo?(pcheng)
(Reporter)

Comment 17

3 years ago
Micheal posted to the addon not showing up immediately and the enabling issue has been reproduced so clearing needinfo
Flags: needinfo?(dale)
I was NOT reproducing the addon not showing up immediately issue, and that's the problem.
(Reporter)

Comment 19

3 years ago
https://bugzilla.mozilla.org/show_bug.cgi?id=1220195 is the bug that was failed for the addon not showing up immediately and is apparently resolved. You said you reproduced not being able to enable the addon which is this bug
Now that is a lot clearer on bug behavior. QAwanted to branch check first before attempting window.
Keywords: qawanted
Created attachment 8687339 [details]
logcat on Aries 2.5, enabling addon crashes settings

On Flame 2.5, there is no 'add-on' option in Settings. It could be due to it's an OTA build? Not sure why.

Device: Flame 2.5
BuildID: 20151113083704
Gaia: 142a25e39196f036978e0dd6c94640bd8d4d692a
Gecko: 2ed226048f70df93060f5cbb26dba6d6b09538fb
Gonk: 205ac4204bbbb2098a8046444acba551ba5dc75a
Version: 44.0a2 (2.5) 
Firmware Version: v18Dv4
User Agent: Mozilla/5.0 (Mobile; rv:44.0) Gecko/44.0 Firefox/44.0

------

On Aries 2.5, 'add-ons' option exists in Settings. I observed bug 1220195. Working around that, I was able to enable the helloworld addon. But Settings crashed without crash report as soon as I hit the enable button. I don't know if I would call that as 'working', because getting one app crashed in order for something to work is not considered 'working' for me. Attaching locat for this.

I could still try to find the window, treating Settings crashing behavior as last working, but I'll need confirmation from someone. NI the person who tagged regression window wanted.

Addon can be enabled, but Settings crashes every time it is enabled on:
Device: Aries 2.5
BuildID: 20151113084848
Gaia: 142a25e39196f036978e0dd6c94640bd8d4d692a
Gecko: 2ed226048f70df93060f5cbb26dba6d6b09538fb
Gonk: a19052e4389c3ae2d8fc3e7a74a475401baacc56
Version: 44.0a2 (2.5) 
Firmware Version: D5803_23.1.A.1.28_NCB.ftf
User Agent: Mozilla/5.0 (Mobile; rv:44.0) Gecko/44.0 Firefox/44.0
Flags: needinfo?(mlien)
Flags: needinfo?(jmercado)
Keywords: qawanted
Flags: needinfo?(jmercado)

Comment 22

3 years ago
I use the Aries' latest build on master and never encountered crash problem. Could we try to get the window first, even needing a workaround/alternative way to do so.

Build Information:
Build ID               20151115183309
Gaia Revision          e8c15ae4e5324a210000ee0a869a962aa542009f
Gaia Date              2015-11-13 00:10:48
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/7cd2d806bd069c0260ff73f023ac85f892b863bf
Gecko Version          45.0a1
Device Name            aries
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.worker.20151115.174008
Firmware Date          Sun Nov 15 17:40:16 UTC 2015
Bootloader             s1
Flags: needinfo?(wchen)
Flags: needinfo?(mlien)
The crash occurs in 2.5, not master. The problem is there is likely not a window to get for this bug as the behavior in master is likely to go from crash to this bug.
Flags: needinfo?(mlien)
Note:
I was able to work around that crashing issue by NOT using the helloworld addon. Instead I used other addons which come pre-installed on engineering builds for finding the window.

b2g-inbound regression window:

Last Working
Device: Flame 2.5
BuildID: 20151029130732
Gaia: 91cac94948094cfdcd00cba5c6483e27e80cb3b0
Gecko: 364e247ed7d1c12a295334b9355cb53db58d860f
Version: 44.0a1 (2.5) 
Firmware Version: v18D
User Agent: Mozilla/5.0 (Mobile; rv:44.0) Gecko/44.0 Firefox/44.0

First Broken
Device: Flame 2.5
BuildID: 20151029135231
Gaia: 91cac94948094cfdcd00cba5c6483e27e80cb3b0
Gecko: 7dfbcf02d4cc0677e4231b887cb869465f9b2715
Version: 44.0a1 (2.5) 
Firmware Version: v18D
User Agent: Mozilla/5.0 (Mobile; rv:44.0) Gecko/44.0 Firefox/44.0

Gaia is the same so it's a Gecko issue.

Gecko pushlog:
http://hg.mozilla.org/integration/b2g-inbound/pushloghtml?fromchange=364e247ed7d1c12a295334b9355cb53db58d860f&tochange=7dfbcf02d4cc0677e4231b887cb869465f9b2715

Caused by changes made in Bug 1208242.
Blocks: 1208242
QA Whiteboard: [QAnalyst-Triage?]
status-b2g-master: --- → affected
Flags: needinfo?(mlien) → needinfo?(jmercado)
Keywords: regressionwindow-wanted
Fabrice this issue seems to have been caused by the changes for bug 1208242.  Can you please take a look?
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(jmercado) → needinfo?(fabrice)
(Assignee)

Comment 26

3 years ago
Created attachment 8688263 [details] [diff] [review]
addon-enabled.patch

My bad, I forgot to initialize blockedStatus for sideloaded apps. The ext-runtime.js fix is a b2g-only issue that showed up while fixing this bug. I you prefere I can move it to its own bug...
Assignee: nobody → fabrice
Flags: needinfo?(fabrice)
Attachment #8688263 - Flags: review?(poirot.alex)
Attachment #8688263 - Flags: review?(poirot.alex) → review+

Comment 28

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/a3cd8d9dcb03
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox45: --- → fixed
Resolution: --- → FIXED
Does this need an uplift to 2.5?
Flags: needinfo?(fabrice)
(Assignee)

Comment 30

3 years ago
I don't feel it's critical, but it's also very low risk so let's uplift.
Flags: needinfo?(fabrice)
(Assignee)

Comment 31

3 years ago
Comment on attachment 8688263 [details] [diff] [review]
addon-enabled.patch

[Triage Comment]
Attachment #8688263 - Flags: approval‑mozilla‑b2g44+

Updated

3 years ago
Keywords: verifyme
Duplicate of this bug: 1177521
this has problems uplifting:

grafting 315345:a3cd8d9dcb03 "Bug 1220700 - Cannot enable add-ons installed from WebIDE r=ochameau"
merging devtools/server/actors/webapps.js
merging toolkit/components/extensions/ext-runtime.js
warning: conflicts during merge.
merging toolkit/components/extensions/ext-runtime.js incomplete! (edit conflicts, then use 'hg resolve --mark')

could you take a look? Thanks!
Flags: needinfo?(fabrice)
(Assignee)

Comment 34

3 years ago
(In reply to Carsten Book [:Tomcat] from comment #33)
> this has problems uplifting:
> 
> grafting 315345:a3cd8d9dcb03 "Bug 1220700 - Cannot enable add-ons installed
> from WebIDE r=ochameau"
> merging devtools/server/actors/webapps.js
> merging toolkit/components/extensions/ext-runtime.js
> warning: conflicts during merge.
> merging toolkit/components/extensions/ext-runtime.js incomplete! (edit
> conflicts, then use 'hg resolve --mark')
> 
> could you take a look? Thanks!

We can just ignore the ext-runtime.js change on 2.5
Flags: needinfo?(fabrice)
(In reply to [:fabrice] Fabrice Desré from comment #34)
> (In reply to Carsten Book [:Tomcat] from comment #33)
> > this has problems uplifting:
> > 
> > grafting 315345:a3cd8d9dcb03 "Bug 1220700 - Cannot enable add-ons installed
> > from WebIDE r=ochameau"
> > merging devtools/server/actors/webapps.js
> > merging toolkit/components/extensions/ext-runtime.js
> > warning: conflicts during merge.
> > merging toolkit/components/extensions/ext-runtime.js incomplete! (edit
> > conflicts, then use 'hg resolve --mark')
> > 
> > could you take a look? Thanks!
> 
> We can just ignore the ext-runtime.js change on 2.5

so we can ignore this bug ? or do we need a new patch for 2.5 ?
(Assignee)

Comment 36

2 years ago
We just need this part of the patch:

# HG changeset patch
# User Fabrice Desré <fabrice@mozilla.com>
# Parent  13f2bffbc198a2a47649a2d9ca4e5008301e702b
Bug 1220700 - Cannot enable add-ons installed from WebIDE r=ochameau

diff --git a/devtools/server/actors/webapps.js b/devtools/server/actors/webapps.js
--- a/devtools/server/actors/webapps.js
+++ b/devtools/server/actors/webapps.js
@@ -270,16 +270,17 @@ WebappsActor.prototype = {
     aApp.installTime = Date.now();
     aApp.installState = "installed";
     aApp.removable = true;
     aApp.id = aId;
     aApp.basePath = reg.getWebAppsBasePath();
     aApp.localId = (aId in reg.webapps) ? reg.webapps[aId].localId
                                         : reg._nextLocalId();
     aApp.sideloaded = true;
+    aApp.blockedStatus = Ci.nsIBlocklistService.STATE_NOT_BLOCKED;
 
     reg.webapps[aId] = aApp;
     reg.updatePermissionsForApp(aId);
 
     reg._readManifests([{ id: aId }]).then((aResult) => {
       let manifest = aResult[0].manifest;
       aApp.name = manifest.name;
       aApp.csp = manifest.csp || "";
You need to log in before you can comment on or make changes to this bug.