Packaged app on android shows origin

RESOLVED WONTFIX

Status

()

Firefox for Android
Web Apps
RESOLVED WONTFIX
3 years ago
2 years ago

People

(Reporter: robhudson, Unassigned)

Tracking

Trunk
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [WebRuntime])

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
Created attachment 8504831 [details]
Screenshot_2014-10-14-09-27-45.png

I installed the packaged app on Android and see this bar at the top that shows the origin. I don't think we want that for all users.

Comment 1

3 years ago
Is this something the marketplace is doing wrong, or is this a platform thing and by design?
Flags: needinfo?(bwalker)
I doubt Marketplace is doing anything wrong. I believe the warning when you navigate off your origin was decision we took on Android runtime that was not echoed by the other runtimes. IMHO we should remove it now.

see https://bugzilla.mozilla.org/show_bug.cgi?id=773413
see https://bugzilla.mozilla.org/show_bug.cgi?id=907931
see https://bugzilla.mozilla.org/show_bug.cgi?id=792261

see https://bugzilla.mozilla.org/show_bug.cgi?id=1033011
Flags: needinfo?(bwalker)
(In reply to Bill Walker [:bwalker] [@wfwalker] from comment #2)
> I doubt Marketplace is doing anything wrong. I believe the warning when you
> navigate off your origin was decision we took on Android runtime that was
> not echoed by the other runtimes. IMHO we should remove it now.

We do this on desktop too, unsure about FxOS.  But it isn't actually the problem here, as the app in question is still presumably at its own origin (app://marketplace.firefox.com).

Rob: what's the URL of the page from which you installed the package?  I think this is an Android runtime bug, but I would need to see the package to know for sure.
Flags: needinfo?(robhudson.mozbugs)
(Reporter)

Comment 4

3 years ago
(In reply to Myk Melez [:myk] [@mykmelez] from comment #3)
> Rob: what's the URL of the page from which you installed the package?  I
> think this is an Android runtime bug, but I would need to see the package to
> know for sure.

https://marketplace.firefox.com/app/marketplace
Flags: needinfo?(robhudson.mozbugs)
This is an Android runtime bug.

WebappImpl.onCreate gets an origin like app://{6fdd02f1-7ba6-40e6-b8a3-784e061b98f8} from the allocator and then passes it to launchWebapp, which calls setOrigin, which doesn't set mOrigin.

Later, WebappImpl.onTabChanged tries to create a new URI instance from the tab URL, which is app://marketplace.firefox.com/index.html; and appears to expect app: URLs to raise a URISyntaxException.

But the tab URL apparently doesn't do that, so it checks to see whether or not mOrigin is null and if its host matches the tab URL's host.  Since mOrigin is null, it makes the titlebar visible.

There are a few things we should do here:

1. The allocator should store the origin specified by the manifest: app://marketplace.firefox.com.

2. WebappImpl.setOrigin should set mOrigin to the origin specified by the manifest (this will presumably happen automagically once the allocator stores it).

3. WebappImpl.onTabChanged should hide the titlebar when the tab URL is app://marketplace.firefox.com/index.html (which will also presumably happen automagically once the allocator stores the correct origin, although it wouldn't hurt to correct the method's assumption that creating a new URI from an app: URL will raise an exception.
Component: Consumer Pages → Web Apps
Product: Marketplace → Firefox for Android
QA Contact: aaron.train
Whiteboard: [WebRuntime]
Version: Avenir → Trunk
Per bug 1235869, we're going to disable the Android web runtime, so we won't fix this bug in it.

(This is part of a bulk resolution of bugs in the Firefox for Android::Web Apps component, from which I attempted to exclude bugs that are not specific to the runtime, but it's possible that I included one accidentally.  If so, I'm sorry, and please reopen the bug!)
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.