Closed
Bug 1481471
Opened 6 years ago
Closed 6 years ago
Unable to update tab URL in geckoview
Categories
(GeckoView :: General, defect, P2)
GeckoView
General
Tracking
(firefox-esr52 wontfix, firefox-esr60 wontfix, firefox61 wontfix, firefox62 wontfix, firefox63 fixed)
RESOLVED
FIXED
mozilla63
People
(Reporter: rwood, Assigned: mbrubeck)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
I am attempting to get Raptor (performance automation tool) running in GeckoView (using the GeckoView Example app) to run the speedometer benchmark. Raptor is a web extension [1] and uses the tab API to navigate to the benchmark pages.
I am unable to change the URL in the geckoview example app by using 'browser.tabs.update'. If I don't provide a tabID (so by default it should use the current tab) I get this error:
E GeckoConsole: [JavaScript Error: "nativeTab is null" {file: "chrome://geckoview/content/ext-tabs.js" line: 311}]
I have also tried providing a tabID of 0 and 1 but if I do that I get an 'invalid TabID' error.
Is the tabs API not supported in geckoview? Are there plans to support this? If not, how can I set the URL from within a web extension, is that possible? Thanks!
[1] https://searchfox.org/mozilla-central/source/testing/raptor/webext/raptor
Reporter | ||
Comment 1•6 years ago
|
||
If I could send the URL in to navigate to the benchmark URL upon app startup that would be good however I still need the ability to refresh the page / reload the same URL as we do multiple cycles of each benchmark without restarting the browser in between.
Reporter | ||
Comment 2•6 years ago
|
||
browser.tabs.reload() results in the same error:
E GeckoConsole: [JavaScript Error: "nativeTab is null" {file: "chrome://geckoview/content/ext-tabs.js" line: 342}]
Reporter | ||
Comment 3•6 years ago
|
||
Hi Jim, do you know if the tabs api will be supported in geckoView? Or is there is another way to change the URL and refresh/reload, from within a webext? Thanks!
If this is not going to be supported we will need to come up with a new solution for running speedometer on geckoview/android.
Flags: needinfo?(nchen)
We should be able to make browser.tabs work in GeckoView, though it's probably only going to return a single tab.
Comment 5•6 years ago
|
||
one tab should be good, but what is the timeline to make this work?
Updated•6 years ago
|
status-firefox61:
--- → wontfix
status-firefox62:
--- → wontfix
status-firefox63:
--- → affected
status-firefox-esr52:
--- → wontfix
status-firefox-esr60:
--- → wontfix
Comment 6•6 years ago
|
||
I can take a look. :esawin did some work already to make `browser.tabs` work, so I don't think there should be too much more work to get `reload` working.
Assignee: nobody → nchen
Status: NEW → ASSIGNED
Flags: needinfo?(nchen)
Updated•6 years ago
|
Priority: -- → P2
Reporter | ||
Comment 7•6 years ago
|
||
(In reply to Jim Chen [:jchen] [:darchons] from comment #6)
> I can take a look. :esawin did some work already to make `browser.tabs`
> work, so I don't think there should be too much more work to get `reload`
> working.
Is there a different bug for the browser.tabs work you mentioned? I just tried a geckoview_example app from the latest inbound and still seeing the same browser.tabs errors.
Flags: needinfo?(nchen)
Comment 8•6 years ago
|
||
I think bug 1329154 made parts of the `browser.tabs` API work.
Flags: needinfo?(nchen)
Reporter | ||
Comment 9•6 years ago
|
||
Thanks - I was seeing old adb logcat entries that are dumped each time it starts. With the latest geckoview example app it looks like the raptor webext isn't loading now, so I can't get far enough to try out tabs yet.
Comment 10•6 years ago
|
||
Hey Matt, do you have some time to help Rob with this? You'll probably want to look at "ext-tabs.js" and "GeckoViewTab.jsm" to make "browser.tabs.reload" work.
Flags: needinfo?(mbrubeck)
Reporter | ||
Comment 11•6 years ago
|
||
With an Anroid 4.0 geckoview_example from today's inbound, on google pixel 2, confirmed that browser.tabs.update is still giving this error:
08-10 15:13:02.517 8586 8603 E GeckoConsole: [JavaScript Error: "nativeTab is null" {file: "chrome://geckoview/content/ext-tabs.js" line: 316}]
Assignee | ||
Comment 12•6 years ago
|
||
> Hey Matt, do you have some time to help Rob with this?
Sure.
Assignee: nchen → mbrubeck
Flags: needinfo?(mbrubeck)
Assignee | ||
Comment 13•6 years ago
|
||
`windowTracker.topWindow` is returning null here:
https://searchfox.org/mozilla-central/rev/ca869724246f4230b272ed1c8b9944596e80d920/mobile/android/components/extensions/ext-utils.js#439
`topWindow` calls the window-mediator service:
get topWindow() {
return Services.wm.getMostRecentWindow("navigator:browser");
}
Assignee | ||
Comment 14•6 years ago
|
||
For this to work with GeckoView, it would need to use "navigator:geckoview" instead.
Assignee | ||
Comment 15•6 years ago
|
||
Assignee | ||
Comment 16•6 years ago
|
||
Depends on D3353
Assignee | ||
Comment 17•6 years ago
|
||
Depends on D3354
Comment on attachment 9000015 [details]
Bug 1481471 - Implement browser.tab.getActive() in GeckoView. r=snorp
James Willcox (:snorp) (jwillcox@mozilla.com) has approved the revision.
Attachment #9000015 -
Flags: review+
Comment on attachment 9000014 [details]
Bug 1481471 - Allow browser.tabs extension APIs to find GeckoView windows. r=snorp
James Willcox (:snorp) (jwillcox@mozilla.com) has approved the revision.
Attachment #9000014 -
Flags: review+
Comment on attachment 9000013 [details]
Bug 1481471 - Remove some cruft left behind by Bug 1481471. r=snorp
James Willcox (:snorp) (jwillcox@mozilla.com) has approved the revision.
Attachment #9000013 -
Flags: review+
Reporter | ||
Comment 21•6 years ago
|
||
Verified (with a build on try from :jmaher with your patches applied) that the fix works great - browser.tabs.update now works from within the raptor web extension on the geckoview example app. Thanks!
Assignee | ||
Comment 22•6 years ago
|
||
Comment 23•6 years ago
|
||
Pushed by mbrubeck@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9288bcd578ed
Remove some cruft left behind by Bug 1481471. r=snorp
https://hg.mozilla.org/integration/mozilla-inbound/rev/0f4415f29a66
Allow browser.tabs extension APIs to find GeckoView windows. r=snorp
https://hg.mozilla.org/integration/mozilla-inbound/rev/7d9cc6236b1f
Implement browser.tab.getActive() in GeckoView. r=snorp
Comment 24•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9288bcd578ed
https://hg.mozilla.org/mozilla-central/rev/0f4415f29a66
https://hg.mozilla.org/mozilla-central/rev/7d9cc6236b1f
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Assignee | ||
Updated•6 years ago
|
Blocks: webext-geckoview
Updated•6 years ago
|
Product: Firefox for Android → GeckoView
Updated•6 years ago
|
Target Milestone: Firefox 63 → mozilla63
You need to log in
before you can comment on or make changes to this bug.
Description
•