Closed
Bug 1118067
Opened 11 years ago
Closed 11 years ago
Using mozApps.install() to install homescreens: unexpected results.
Categories
(Firefox OS Graveyard :: Gaia::Homescreen, defect)
Firefox OS Graveyard
Gaia::Homescreen
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: madrid.crespo, Unassigned)
Details
Attachments
(1 file)
|
56.87 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0
Build ID: 20150105030202
Steps to reproduce:
1.- Upload your own homescreen app to your hosting.
I noticed that I had a "Invalid level" error because it was a certified app. So I thought, "okay, lets say it is a hosted app".
2.- Remove the type:"certified" from your manifest.webapp,
3.- Then, use navigator.mozApps.install("http://your_url/manifest.webapp"); in any HTML test file. For example:
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
</head>
<body>
<script type="text/javascript">console.log("Start");
navigator.mozApps.install("http://programatel.com/fxos-app-homecake/manifest.webapp");
</script>
</body>
</html>
Actual results:
I installed the homescreen succesfully, check the attachment. That is now my homescreen (really).
Expected results:
+ I didn't expect to install it since it uses the following permissions:
webapps-manage, systemXHR, settings (read-write), open-remote-window and storage.
So, I never expected to install a hosted app using those permissions. It sounds scary.
+ I didn't expect to change my homescreen: In the example, my new homescreen hasn't any settings button so, I was not almost able to restore the homescreen again. Luckily, there is a settings button in the notifications window.
+ It was really easy to install it: as an user, I only had to click "yes" and select the new homescreen in the homescreen settings.
I am wondering If I could to the same with any Keyboard app: keyboards can be enabled when there is a prompt asking for permissions to install it.
+ Again, it was really easy to install it: I guess I could use mozApps.install() for any kind of phising or scam.
Comment 1•11 years ago
|
||
(In reply to CodingFree from comment #0)
> Actual results:
>
> I installed the homescreen succesfully, check the attachment. That is now my
> homescreen (really).
>
> Expected results:
>
> + I didn't expect to install it since it uses the following permissions:
> webapps-manage, systemXHR, settings (read-write), open-remote-window and
> storage.
>
> So, I never expected to install a hosted app using those permissions. It
> sounds scary.
Can your app use these permissions?
> + It was really easy to install it: as an user, I only had to click "yes"
> and select the new homescreen in the homescreen settings.
What else would you expect?
Comment 2•11 years ago
|
||
Which Firefox OS version is? For the screenshot I think is 2.2. The privileged/certified permissions your homescreen requested are executed successfully? Did you see what the logcat on your phone says?
| Reporter | ||
Comment 3•11 years ago
|
||
(In reply to Fabrice Desré [:fabrice] from comment #1
> > + It was really easy to install it: as an user, I only had to click "yes"
> > and select the new homescreen in the homescreen settings.
>
> What else would you expect?
I think that certain roles (such as homescreens or keyboards) should not be installed using mozApps.install(); I mean that they should be at least privileged apps and mozApps.install() should raise an error when trying to install them as hosted apps.
(In reply to Giovanny Andres Gongora Granada from comment #2)
> Which Firefox OS version is? For the screenshot I think is 2.2. The
> privileged/certified permissions your homescreen requested are executed
> successfully? Did you see what the logcat on your phone says?
It is 2.2. The logcat didn't say anything useful once the level error was solved.
I didn't try the permissions at all since I can't update the homescreen (reinstall forbidden), I can't uninstall the new homescreen due to this bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=1115733
And I can't use the Devtools because the device crashes when requesting higher permissions:
https://bugzilla.mozilla.org/show_bug.cgi?id=1117270
| Reporter | ||
Comment 4•11 years ago
|
||
To support what I said to :fabrice, it doesn't make sense that any homescreen could be installed as a hosted app (regardless its permissions) using mozApps.install().
What would happen if the device has not connectivity? Would the homescreen fail graciously?
| Reporter | ||
Comment 5•11 years ago
|
||
Talked with Fabrice Desré about this and he convinced me that it makes sense to install those kind of apps using appcache or the future Web Workers.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•