Closed
Bug 1223054
Opened 9 years ago
Closed 9 years ago
Addon Injection issue in apps other than system app.
Categories
(Firefox OS Graveyard :: Runtime, defect)
Tracking
(firefox45 fixed, b2g-v2.5 fixed)
RESOLVED
FIXED
People
(Reporter: rishav_, Assigned: fabrice)
References
Details
Attachments
(1 file)
1.27 KB,
patch
|
ferjm
:
review+
fabrice
:
approval‑mozilla‑b2g44+
|
Details | Diff | Splinter Review |
I am trying to inject an addon in SMS app, but i have to inject it (enable the addon switch) everytime before i launch the app. After killing the app and restarting again, addon doesn't exist anymore. I have to enable it again (i.e enable -> disable-> enable), then only addon get injected for that session. Here is the addon worked on: https://github.com/kumarrishav/sms-setting/blob/master/index.js Everything works as expected in case of add-on injected in system app.
Reporter | ||
Comment 2•9 years ago
|
||
Nope, It's not related i guess. Bug 1220700 is fixed now. Thanks for this. But this big is still there. You can test this addon as STR. Thanks
Assignee | ||
Comment 3•9 years ago
|
||
In https://github.com/kumarrishav/sms-setting/blob/master/manifest.json manifest_version needs to be "2" Also, you are matching app://sms.gaiamobile.org/index.html but I think the sms app uses hashes when navigating that may prevent your script from being injected. Can you try with app://sms.gaiamobile.org/index.html* instead?
Reporter | ||
Comment 4•9 years ago
|
||
I think this should be an issue. Anyway i changed it as you said, but still same issue { "manifest_version": 2, "name": "SMS Setting Access", "description": "Access Messages Settings from conversation thread. Message App > Thread > Conversation > option menu", "version": "1.0", "author": "Kumar Rishav", "package_path": "package.zip", "content_scripts": [{ "matches": [ "app://sms.gaiamobile.org/index.html*" ], "css": [], "js": ["index.js"] }], "icons": { "128": "icons/messages_settings.png" } }
Reporter | ||
Comment 5•9 years ago
|
||
*should not be an issue
Assignee | ||
Comment 6•9 years ago
|
||
This patch add the add-on to the OOP whitelist before calling extension.startup() to let the extension code correctly load the manifest in child process. This is a fallout of the changes from bug 1214133 where we modified the child process initialization for extensions.
Attachment #8690295 -
Flags: review?(ferjmoreno)
Updated•9 years ago
|
Attachment #8690295 -
Flags: review?(ferjmoreno) → review+
Comment 8•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7f501ebf62ef
Assignee | ||
Comment 9•9 years ago
|
||
Comment on attachment 8690295 [details] [diff] [review] addon-registration.patch [Triage Comment]
Attachment #8690295 -
Flags: approval‑mozilla‑b2g44+
Reporter | ||
Comment 10•9 years ago
|
||
Sorry Fabrice, I am still facing the same issue. I am on today's build.
Assignee: nobody → fabrice
Flags: needinfo?(fabrice)
Assignee | ||
Comment 11•9 years ago
|
||
(In reply to kumar rishav (:rishav_) from comment #10) > Sorry Fabrice, I am still facing the same issue. I am on today's build. On the 2.6 (master) branch, not 2.5 right?
Flags: needinfo?(fabrice)
Reporter | ||
Comment 12•9 years ago
|
||
yeah, on nightly-latest (2.6 pre release) Build Identifier: 20151128150206 git commit info: 2015-11-27 (ee6d8625)
Assignee | ||
Comment 13•9 years ago
|
||
I have several add-ons installed on my build and can't reproduce that anymore. We need better steps to reproduce and a logcat output.
Reporter | ||
Comment 14•9 years ago
|
||
STR: Install this add-on: https://github.com/kumarrishav/sms-setting 1) Enable the add-on 2) go to message app, tap on any thread 3) tap on more option button (three dots), you will see third option as 'Settings' Now close(kill) the message app, and open again and repeat above step. Sometimes(1 out of 10 times) it may work as expected, so repeat 2-3 times to reproduce it. Also check out this STR Video (Video quality is not good but you will get the STR). https://www.youtube.com/watch?v=ErFXIrY-DSg Thanks
Reporter | ||
Comment 15•9 years ago
|
||
Hey Fabrice, Did this help in reproducing the bug? Thanks
Flags: needinfo?(fabrice)
Comment 16•9 years ago
|
||
on 2.5 http://hg.mozilla.org/releases/mozilla-b2g44_v2_5/rev/5aeee433ed04
status-b2g-v2.5:
--- → fixed
Assignee | ||
Comment 17•9 years ago
|
||
Kumar, I tested again, and added a few console.log() in your extension to figure out what's going on. It appears to me that: - we always inject index.js properly (add a top level console.log() to see that). - your event handler is properly attached, and renderItems() is called as expected. - sometimes, the new "Settings" button doesn't appear. So it's either a bug in your extension, maybe caused by a race between your event listener and the default one?
Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(fabrice)
You need to log in
before you can comment on or make changes to this bug.
Description
•