Closed Bug 1156130 Opened 9 years ago Closed 7 years ago

Content scripts loaded using the sdk/tabs attach() method do not run on Firefox Android

Categories

(Add-on SDK Graveyard :: General, defect)

ARM
Android
defect
Not set
major

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: simon_clubley, Unassigned)

Details

Attachments

(5 files)

User Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Firefox/24.0
Build ID: 20140903144620
Firefox for Android

Steps to reproduce:

Updated Firefox Android 32.0.3 to the latest Firefox Android Beta (38.0). The Beta version was chosen instead of the current Release version in order to work around another SDK bug on Android.


Actual results:

Content scripts loaded using the sdk/tabs attach() method no longer run on Firefox Android.


Expected results:

The addons I am developing should have continued working as they were on Firefox 32.0.3.
For both this and the ff32.txt log, I have included the full log in order to avoid the risk of removing any clues.

In both this and the ff32.txt log, the cfx command used is on the first line of the log.
This cut down test case adds an entry to the Firefox context menu and was developed using the cfx run command shown in the attached cfx logs.

Watch the cfx output in both cases to see how the content script runs ok on Firefox Android 32.0.3 but not on Firefox Android 38.0.
Severity: normal → major
OS: Linux → Android
Hardware: x86 → ARM
I can confirm the bug. My add-on works well on fennec Nightly (40) and Aurora(39), but Beta (38) and Release (37) give nothing (console also keeps silence):

var mytab;
var panel;
function tabReady(tab) {
    mytab = tab;
    panel = tab.attach({
        contentScriptFile: ["myscript.js"]
    });
    ...
    ...
};
tabs.on("ready", tabReady);
tabs.open("panel.html");

Page loads well, tabReady works as well ("..."-commands), but not myscript.js.
This bug still presents to date in Fennec 42.0.2 stable.

ContentScript also doesn't work.

As said in #5, there no any error or warn messages in the console (I looked in Main Process's console in WebIDE).

Simon, you should change product field to "Firefox for Android".

And is there anything I can do to help fix this? (Despite the fact that I haven't contributed to Mozilla codebase yet.)
(In reply to Serge Lebedev from comment #6)
> This bug still presents to date in Fennec 42.0.2 stable.
> 
> ContentScript also doesn't work.
> 
> As said in #5, there no any error or warn messages in the console (I looked
> in Main Process's console in WebIDE).
> 
> Simon, you should change product field to "Firefox for Android".
> 
> And is there anything I can do to help fix this? (Despite the fact that I
> haven't contributed to Mozilla codebase yet.)

Please, check it once again. I've just tried my add-on on Fennec 42.0.2 Release - everything works fine there (contentScript, contentScriptFile).
(In reply to Alexander from comment #7)
> Please, check it once again. I've just tried my add-on on Fennec 42.0.2
> Release - everything works fine there (contentScript, contentScriptFile).

I checked once again and got pretty unexpected results. Maybe I found another bug, so some investigating should be done first. Will post the details later.
Component: Untriaged → General
Product: Firefox → Add-on SDK
Version: 38 Branch → unspecified
https://bugzilla.mozilla.org/show_bug.cgi?id=1399562
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: