Closed Bug 1223054 Opened 7 years ago Closed 7 years ago

Addon Injection issue in apps other than system app.


(Firefox OS Graveyard :: Runtime, defect)

Gonk (Firefox OS)
Not set


(firefox45 fixed, b2g-v2.5 fixed)

Tracking Status
firefox45 --- fixed
b2g-v2.5 --- fixed


(Reporter: rishav_, Assigned: fabrice)




(1 file)

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:

Everything works as expected in case of add-on injected in system app.
Might be related to bug 1220700.
See Also: → 1220700
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.

In manifest_version needs to be "2"
Also, you are matching app:// but I think the sms app uses hashes when navigating that may prevent your script from being injected. Can you try with app://* instead?
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": "",
  "content_scripts": [{
    "matches": [
    "css": [],
    "js": ["index.js"]
  "icons": {
    "128": "icons/messages_settings.png"
*should not be an issue
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)
Attachment #8690295 - Flags: review?(ferjmoreno) → review+
Closed: 7 years ago
Resolution: --- → FIXED
Comment on attachment 8690295 [details] [diff] [review]

[Triage Comment]
Attachment #8690295 - Flags: approval‑mozilla‑b2g44+
Sorry Fabrice, I am still facing the same issue. I am on today's build.
Assignee: nobody → fabrice
Flags: needinfo?(fabrice)
(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)
yeah, on nightly-latest (2.6 pre release)
Build Identifier: 20151128150206
git commit info: 2015-11-27 (ee6d8625)
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.
Install this add-on:

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).

Hey Fabrice,
Did this help in reproducing the bug?

Flags: needinfo?(fabrice)

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?
Flags: needinfo?(fabrice)
Duplicate of this bug: 1230819
You need to log in before you can comment on or make changes to this bug.