Closed Bug 955755 Opened 10 years ago Closed 10 years ago

[ZTE Open] Marketplace Update Fails

Categories

(Marketplace Graveyard :: General, defect, P2)

Avenir
ARM
Gonk (Firefox OS)
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 962524
2014-06-24

People

(Reporter: feer56, Unassigned)

References

Details

(Whiteboard: [SUMO-b2g])

Attachments

(5 files)

Update on ZTE Open for Marketplace fails
Software: OPEN_FFOS_V1.1.0B04_MOVISTAR
OS: 1.1.0.0
Platform Version: 1.81
Build ID: 20131029202142

Update appears and appears even after downloading the update. adb logcat is attached as well as adb logcat -v time. 

Needinfo - Naoki and CC'ing Michelle and Patrick 
Support forum thread available: https://support.mozilla.org/en-US/questions/981820
Flags: needinfo?(nhirata.bugzilla)
From the logs it looks like that it's going to the zte server for updates on the force.  Not sure if the Marketplace app should be getting the update from there or separate?  If not this might be a Vendcom bug.

I/Gecko   (  112): UpdatePrompt: Forcing update check
I/Gecko   (  112): *** AUS:SVC Checker: checkForUpdates, force: true
I/Gecko   (  112): UpdatePrompt: onUpdateCheckStart (false)
I/Gecko   (  112): *** AUS:SVC Checker:getUpdateURL - update URL: http://firefox.ztems.com/prerelease/roamer2/18.0/20131029202142/update.xml?force=1
I/Gecko   (  112): *** AUS:SVC Checker:checkForUpdates - sending request to: http://firefox.ztems.com/prerelease/roamer2/18.0/20131029202142/update.xml?force=1
I/GeckoDump(  112): XXX FIXME : Got a mozContentEvent: force-update-check
I/Gecko   (  112): *** AUS:SVC Checker:onProgress - 1049/1049
I/Gecko   (  112): *** AUS:SVC Checker:onLoad - request completed downloading document
I/Gecko   (  112): *** AUS:SVC Checker:updates get - unexpected node name!
I/Gecko   (  112): *** AUS:SVC Checker:onLoad - there was a problem checking for updates. Exception: Error: Unexpected node name, expected: updates, got: parsererror
I/Gecko   (  112): *** AUS:SVC Checker:onLoad - request.status: 404
I/Gecko   (  112): *** AUS:SVC getStatusTextFromCode - transfer error: Update XML file not found (404), code: 404
I/Gecko   (  112): UpdatePrompt: Setting gecko.updateStatus: check-error-http-404
I/Gecko   (  112): *** AUS:SVC UpdateService:onError - error during background update. error code: 1404, status text: Update XML file not found (404)
I/Gecko   (  112): UpdatePrompt: Update error, state: , errorCode: 110
I/Gecko   (  112): UpdatePrompt: Warning: no patches available in update
I/Gecko   (  112): UpdatePrompt: Setting gecko.updateStatus: Update XML file not found (404)
Flags: needinfo?(krupa.mozbugs)
Attached file 20131231-logcat.log
[logcat -v long] of check now update, error 1, update marketplace to error 2
I'm the origin bug reporter, see: https://support.mozilla.org/en-US/questions/981820
There are two errors causing concern:

1. Check now update error on ZTE Open
2. Later on Marketplace update fails too

My hardware: ZTE Open (UK Ebay Version)
My software: OPEN_EU_DEV_FFOS_V1.1.0B01
OS: 1.1.0.0
Platform Version: 1.81
Build ID: 20131204162035
The logcat indicates the following:

[ 12-31 16:59:16.779   112:0x70 E/GeckoConsole ]
Content JS INFO at app://system.gaiamobile.org/js/updatable.js:103 in anonymous: downloadError event, error code is INVALID_ORIGIN_CHANGE

That implies that marketplace is trying to change it's app origin on an app update, which is not allowed.
Component: Gaia → General
Product: Firefox OS → Marketplace
Version: unspecified → Avenir
The origin in marketplace's updated packaged app is:

    "origin": "app://marketplace.firefox.com",

Which is specified in the zip archive.

The origin in marketplace's old packaged app is:

    "origin": "app://marketplace.firefox.com",

Which is specified in the metadata.json.

Apparently we can't update apps that had their origin declared in metadata.json first, then later specified in the packaged app zip archive itself. That means there's two things to do here:

1. [Marketplace] Revert the addition of the origin property in marketplace's zip archive. This will remove the error seen in this bug.

2. [DOM: Apps] Implement an update path from where an origin was specified in the metadata.json to a packaged app with the origin specified in the zip archive.

Let's focus this bug on problem [1].
The same bug is related to Geeksphone Peak and Firefox OS Nightly images.
It is regression bug. The bug noticed the last few weeks, before was working fine.
Flags: needinfo?(nhirata.bugzilla)
I don't know enough about our origin troubles as of late to say whether we can do what jason wants in comment 6.  Assigning to cvan because I think he knows the most about this, but CCing dbuc and jonas also.
Assignee: nobody → cvan
Priority: -- → P2
Can someone attach the /data/local/webapps/webapps.json file from a 1.1 build (and /system/b2g/webapps/webapps.json too) ?
Here's the data/local/webapps/webapps.json off a 1.3 build, since apparently this reproduces on 1.3 as well.

  "marketplace.firefox.com": {

    "origin": "app://marketplace.firefox.com",

    "installOrigin": "https://marketplace.firefox.com",

    "receipt": null,

    "installTime": 132333986000,

    "manifestURL": "https://marketplace.firefox.com/packaged.webapp",

    "removable": false,

    "localId": 1024,

    "etag": "\"0a7beeb3352234f0fbcc777fa8c39de0e5565647d26c782c8c91c77934a7ba3f\"",

    "packageEtag": "\"2d584c085915ce94541c426e3ffbf001d460c6e6100788eb7f627a13677751e1\"",

    "appStatus": 2,

    "basePath": "/data/local/webapps",

    "id": "marketplace.firefox.com",

    "installState": "installed",

    "cachePath": "/system/b2g/webapps",

    "storeId": "#unknownID#https://marketplace.firefox.com",

    "name": "Marketplace",

    "csp": "",

    "role": "",

    "redirects": null,

    "lastCheckedUpdate": 1389398357880,

    "downloadAvailable": true,

    "downloadSize": 157203,

    "updateManifest": {

      "name": "Marketplace",

      "icons": {

        "60": "/60.png",

        "90": "/90.png",

        "120": "/120.png",

        "128": "/128.png",

        "256": "/256.png"

      },

      "version": "20140106151928",

      "package_path": "https://marketplace.firefox.com/downloads/file/238822/marketplace-20140106151928.zip",

      "size": 157203,

      "release_notes": "",

      "locales": {

        "el": {},

        "fr": {},

        "bg": {},

        "hr": {},

        "zh-TW": {},

        "ca": {},

        "de": {},

        "tr": {},

        "it": {},

        "ga-IE": {},

        "hu": {},

        "cs": {},

        "es": {},

        "eu": {},

        "en-US": {},

        "pl": {}

      },

      "developer": {

        "url": "http://mozilla.org",

        "name": "Mozilla"

      }

    },

    "retryingDownload": false,

    "downloading": false,

    "progress": 157203,

    "staged": {

      "manifestHash": "3c58bb76b0b377b81fc00926ac985246",

      "etag": "\"73cfddc20dfe9f35438322c6673712310225e5cc4f1505080235731120a247db\""

    },

    "installerAppId": 0,

    "installerIsBrowser": false,

    "storeVersion": 0,

    "readyToApplyDownload": false

  }
Here's the system webapps.json:

  "marketplace.firefox.com": {

    "origin": "app://marketplace.firefox.com",

    "installOrigin": "https://marketplace.firefox.com",

    "receipt": null,

    "installTime": 132333986000,

    "manifestURL": "https://marketplace.firefox.com/packaged.webapp",

    "removable": false,

    "localId": 24,

    "etag": "\"0a7beeb3352234f0fbcc777fa8c39de0e5565647d26c782c8c91c77934a7ba3f\"",

    "packageEtag": "\"2d584c085915ce94541c426e3ffbf001d460c6e6100788eb7f627a13677751e1\"",

    "appStatus": 2

  }
Snippet from my ZTE Open's FFOS1.1.0 data/local/webapps/webapps.json:
  "marketplace": {
    "origin": "app://marketplace",
    "installOrigin": "https://marketplace.firefox.com",
    "receipt": null,
    "installTime": 132333986000,
    "manifestURL": "https://marketplace.firefox.com/packaged.webapp",
    "removable": false,
    "localId": 1020,
    "etag": "\"e6be97b7af43ae144d7ae68bfef612449d988630305e22233dfe827a5966190c\"",
    "packageEtag": "\"6b9462882a32034ee6043eeecce0db3d3fc5bded4c50f653bf7a3370824a71dc\"",
    "appStatus": 2,
    "basePath": "/data/local/webapps",
    "id": "marketplace",
    "installState": "installed",
    "cachePath": "/system/b2g/webapps",
    "storeId": "#unknownID#https://marketplace.firefox.com",
    "name": "Marketplace",
    "csp": "",
    "lastCheckedUpdate": 1389526875328,
    "downloadAvailable": false,
    "downloadSize": 157203,
    "retryingDownload": false,
    "downloading": false,
    "progress": 157203,
    "installerAppId": 0,
    "installerIsBrowser": false,
    "storeVersion": 0,
    "readyToApplyDownload": false,
    "redirects": null
  },
Snippet from my ZTE Open's FFOS1.1.0 system/bg2/webapps/webapps.json:
  "marketplace": {
    "origin": "app://marketplace",
    "installOrigin": "https://marketplace.firefox.com",
    "receipt": null,
    "installTime": 132333986000,
    "manifestURL": "https://marketplace.firefox.com/packaged.webapp",
    "removable": false,
    "localId": 20,
    "etag": "\"e6be97b7af43ae144d7ae68bfef612449d988630305e22233dfe827a5966190c\"",
    "packageEtag": "\"6b9462882a32034ee6043eeecce0db3d3fc5bded4c50f653bf7a3370824a71dc\"",
    "appStatus": 1
  },
Broken also on Nightly build.
Is this still happening?
Flags: needinfo?(feer56)
(In reply to Christopher Van Wiemeersch [:cvan] from comment #18)
> Is this still happening?

yes on ZTE Open with FxOS 1.1
(In reply to Kai Engert (:kaie) from comment #19)
> (In reply to Christopher Van Wiemeersch [:cvan] from comment #18)
> > Is this still happening?
> 
> yes on ZTE Open with FxOS 1.1

In fact, it's probably one of the top support complaints on SUMO right now for Firefox OS on 1.1. You can see this by analyzing the most recent report from the SUMO team.
(In reply to Christopher Van Wiemeersch [:cvan] from comment #18)
> Is this still happening?

Just checked and yes it is.
Flags: needinfo?(feer56)
Target Milestone: --- → 2014-06-24
If we reverted the `app://marketplace.firefox.com` origin to `app://marketplace`, then we fix 1.0/1.1 but then we regress all newer devices with 1.2+ (since that's when the Marketplace origin changed)? This is exactly what jsmith describes in comment 6 as Problem 1.

Why is an origin change disallowed by the device in the first place?
Flags: needinfo?(krupa.mozbugs)
I think I'm going to have to serve a separate package (that contains the `app://marketplace` origin) if the `User-Agent` contains "ZTEOPEN" which is unfortunate but I think that will fix this issue just fine.

(Also see bug 962524.)
See Also: → 962524
(In reply to Christopher Van Wiemeersch [:cvan] from comment #23)
> I think I'm going to have to serve a separate package (that contains the
> `app://marketplace` origin) if the `User-Agent` contains "ZTEOPEN" which is
> unfortunate but I think that will fix this issue just fine.
> 
> (Also see bug 962524.)

Or is there a Mobile Gecko version I should sniff for instead?
(In reply to Christopher Van Wiemeersch [:cvan] from comment #24)
> (In reply to Christopher Van Wiemeersch [:cvan] from comment #23)
> > I think I'm going to have to serve a separate package (that contains the
> > `app://marketplace` origin) if the `User-Agent` contains "ZTEOPEN" which is
> > unfortunate but I think that will fix this issue just fine.
> > 
> > (Also see bug 962524.)
> 
> Or is there a Mobile Gecko version I should sniff for instead?

I'd search for 18.0 & 18.1, since we need this to work across devices for FxOS 1.0 & 1.1.
Is the ZTE phone going to be updated to FxOS 1.3?  It sounds like that would solve this problem properly rather than hacking around it on the Marketplace side.  If not, I'd like to get a timeline for when we can remove this hack from the Marketplace (that is, how long are we supporting updates on 1.1?)
Assignee: cvan → nobody
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: