[Marketplace] Sometimes possible to install preinstall app twice

RESOLVED FIXED in 2013-03-21


Consumer Pages
5 years ago
5 years ago


(Reporter: djst, Assigned: robhudson)


Gonk (Firefox OS)




5 years ago
It seems the Marketplace doesn't always know which apps are already installed on the device. For example, it allowed me to install Nokia HERE Maps a second time. http://farm9.staticflickr.com/8392/8539481614_43e5cee501.jpg

This app was then broken and when launching I saw the contents of a directory. See screenshot: http://farm9.staticflickr.com/8111/8538372311_4495165b0a.jpg

Tested on Unagi running B2G, build id 20130306070201, update channel beta.
I do confirm the fact we can allow a preinstalled marketplace app and installed from marketplace app to be duplicated. Fabrice - Any thoughts?

I didn't get the FTP directory with either app when I launched, although I've seen random instances that this has happened (I get a reproduction of this with a custom DOGFOOD and PRODUCTION build when I do a make reset-gaia with the stub). It's happened enough that makes me think we do have a bug here. I'll open a separate bug for that issue and leave this bug to be the "allows a preinstalled app and installed from marketplace app to be duplicated."
Component: General → DOM: Apps
Flags: needinfo?(fabrice)
Product: Boot2Gecko → Core
Version: unspecified → Trunk


5 years ago
Blocks: 802574
Maybe it's enough (for now) to set the origin for the preinstalled app ? Since we disallow 2 installs from same origin.


5 years ago
See Also: → bug 835545
(In reply to Julien Wajsberg [:julienw] from comment #2)
> Maybe it's enough (for now) to set the origin for the preinstalled app ?
> Since we disallow 2 installs from same origin.

For packaged apps we don't use the origin to prevent reinstalls since it's generated with a UUID, but we check the manifestURL. In the maps case, this fails because the marketplace has a manifest url which is :
while the one specified in gaia/external-apps/m.here.com/metadata.json is :

Talking with cvan on irc, he agreed to remove the /telefonica/ portion of the url on the marketplace side.
Flags: needinfo?(fabrice)
Sending this over to marketplace based on comment 3.
Component: DOM: Apps → Consumer Pages
Product: Core → Marketplace
Version: Trunk → 1.0


5 years ago
Blocks: 777048
No longer blocks: 802574


5 years ago
OS: Mac OS X → Gonk (Firefox OS)
Hardware: x86 → ARM
Rob, can we remove the CARRIER from the URL in the minifest?
Priority: -- → P3
(In reply to Chris Van Wiemeersch [:cvan] from comment #5)
> Rob, can we remove the CARRIER from the URL in the minifest?

Rob is ooto today, but will be back in tomorrow.  Please add a comment in the code when you do this so we don't wonder later.

Comment 7

5 years ago
(In reply to Chris Van Wiemeersch [:cvan] from comment #5)
> Rob, can we remove the CARRIER from the URL in the minifest?

I'm not sure where this extra /telefonica part of the URL is coming from? If I navigate to the app from Marketplace home page, I get to this page:

Looking at the install button source I see the manifest points to the URL without the "/telefonica" in it, which is what we want.

We do, however, have middleware that allows any URL with "/telefonica" to be treated like a URL without it. But if I remove that I don't know what else is going to break -- that's there for a reason, right? That code is here:

Comment 8

5 years ago
Ah, it looks like Marketplace itself is rooted at /telefonica in gaia, so all apps installed from Marketplace launched from gaia will have /telefonica in them. See:

I don't know the history of this carrier string in the URL. One fix would be to point the external-apps/m.here.com to the /telefonica URL so both are pointing to the same place. Or remove the carrier string from the marketplace app. I don't think the fix is on zamboni side.
Fabrice, which change do you think is prefered ?
Flags: needinfo?(fabrice)
I think the fix is to have the apps installed from the Marketplace in gaia to *not* have /telefonica/ in the URL.  It's there to differentiate the carrier marketplace, not to differentiate the apps installed from that marketplace.

I think this fix is on the marketplace side.
I also think apps manifest urls should be partner-agnostic. Let's fix the marketplace url in gaia in another bug if it needs to be changed.
Flags: needinfo?(fabrice)
Assignee: nobody → robhudson.mozbugs
Priority: P3 → P2
Target Milestone: --- → 2013-03-21

Comment 12

5 years ago
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.