Closed
Bug 1211709
Opened 10 years ago
Closed 10 years ago
Addon script does not get inserted on app startup
Categories
(Firefox OS Graveyard :: Runtime, defect)
Tracking
(blocking-b2g:2.5+)
RESOLVED
FIXED
blocking-b2g | 2.5+ |
People
(Reporter: eeejay, Assigned: fabrice)
References
Details
Attachments
(1 file)
864 bytes,
application/zip
|
Details |
STR:
1. Load the attached clock addon in WebIDE.
2. Install on device while clock app is running.
3. Enable addon in settings.
4. Observe that in logcat "hello world" is printed - the script runs.
5. Quit the clock app.
6. Launch the clock app again.
Result: The script is not executed on startup.
Expected: The script should execute on startup.
Reporter | ||
Comment 1•10 years ago
|
||
Looks like a regression in the new addon API from bug 1190995.
Flags: needinfo?(fabrice)
Reporter | ||
Comment 2•10 years ago
|
||
Updated•10 years ago
|
blocking-b2g: --- → 2.5+
Assignee | ||
Comment 3•10 years ago
|
||
I'll check that later today but I'm really surprised as one of my test addons is the "snappy twitter" which is injected at startup and worked fine.
Assignee | ||
Comment 4•10 years ago
|
||
Everything works for me with the patch from bug 1212089 applied.
Depends on: 1212089
Flags: needinfo?(fabrice)
Reporter | ||
Comment 5•10 years ago
|
||
I still don't see this working. I applied the patch in bug 1212089, no change.
Assignee | ||
Comment 6•10 years ago
|
||
Can you attach a logcat dump?
Reporter | ||
Comment 7•10 years ago
|
||
So I dived into this a bit yesterday. It looks like initialProcessData is empty in the content process. We rely on that to have the list of active addons after the process is started. But what happens is that we prelaunch the content process (dom.ipc.processPrelaunch.enabled) before initialProcessData is populated :P
Reporter | ||
Comment 8•10 years ago
|
||
Bill,
As the original author of initialProcessData, should it be fixed to work with prelaunched processes? Or should we just never rely on initialProcessData.
I think a natural place for this would be in ContentParent::ForwardKnownInfo() after we transform a preallocation into an app/browser.
Flags: needinfo?(wmccloskey)
I think it does make sense for us to make this work. ContentParent::ForwardKnownInfo() seems like a reasonable place to send the data.
Flags: needinfo?(wmccloskey)
Any chance you can take a look at this Fabrice?
Flags: needinfo?(fabrice)
Assignee | ||
Comment 11•10 years ago
|
||
Yes, I will take a look.
Assignee: nobody → fabrice
Flags: needinfo?(fabrice)
Assignee | ||
Comment 12•10 years ago
|
||
This is actually fixed by the patch in bug 1214133 where we change the way we preload the extension code for perf reasons. One stone, two birds.
Feel free to re-open if you hit that again.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 14•10 years ago
|
||
I was testing the sample add-on https://github.com/mdn/simple-addon .
It was working as expected when injected in system app. But when i injected same in SMS app (replaced 'system' with 'sms'). It didn't work as expected.
Flags: needinfo?(fabrice)
Comment 15•10 years ago
|
||
(In reply to kumar rishav (:rishav_) from comment #14)
> I was testing the sample add-on https://github.com/mdn/simple-addon .
> It was working as expected when injected in system app. But when i injected
> same in SMS app (replaced 'system' with 'sms'). It didn't work as expected.
Kumar, what was your buildID?
Flags: needinfo?(fabrice) → needinfo?(rishav006)
Comment 16•10 years ago
|
||
Version 44.0a1 (2015-10-19)
Source
Built from https://hg.mozilla.org/mozilla-central/rev/1a157155a4fe0074b3d03b54fe9e466472c2cd56
Build platform
target
x86_64-unknown-linux-gnu
Thanks
Flags: needinfo?(rishav006) → needinfo?(fabrice)
Comment 17•10 years ago
|
||
Name Firefox
Version 44.0a1
Build ID 20151019030227
Comment 18•10 years ago
|
||
It looks like the CSS file is not getting loaded properly in the SMS app. I see the JS file running fine though. Let's use bug 1216543 to track it. Thanks for the report Kumar!
Flags: needinfo?(fabrice)
Updated•10 years ago
|
QA Whiteboard: [COM=Add-on]
Comment 19•10 years ago
|
||
Hi Michael,
But sample add-on (MDN sample add-on) doesn't have any css file. Still it's not working in any app other than system. Can you point out to any working add-on (github link) which is injected in app other than system.
Thanks
Flags: needinfo?(mhenretty)
Comment 20•10 years ago
|
||
The sample add-on does indeed have a css [1]. Here's an add-on that is injected into the twitter app [2].
1.) https://github.com/mdn/simple-addon/blob/69c8ee451d91649dcbf9f9d37f48a2bb40a0141b/manifest.json#L9
2.) https://github.com/etiennesegonzac/snappy-twitter
Flags: needinfo?(mhenretty)
Comment 21•10 years ago
|
||
Hi Michael,
Thanks for the links.
Sorry, but i tried without css files, but still result is same.
Here you can find the sample add-on. https://github.com/kumarrishav/sampleAddon
Please help, where i am doing wrong. This addon is not getting injected anywhere other than system.
Flags: needinfo?(mhenretty)
Comment 22•10 years ago
|
||
Ah, you know what, I bet you are running into bug 1220700.
Flags: needinfo?(mhenretty)
Comment 23•10 years ago
|
||
Yeah, i think, you are right. Some issue with new build of FxOS.
Will try with old builds.
Thanks
You need to log in
before you can comment on or make changes to this bug.
Description
•