Closed Bug 796016 Opened 12 years ago Closed 12 years ago

Upgrade to new update/install API

Categories

(Marketplace Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2012-10-04

People

(Reporter: sicking, Assigned: cvan)

References

Details

The API is described in bug 790558 and is now implemented for both hosted and packaged apps.

In particular, the status properties and events for when an app is installed is completely different and now more explicitly handles phases like "installed but not yet downloaded".

The API is pretty recently landed, so do make sure to file bugs on any weirdness that you see.
Target Milestone: --- → 2012-10-04
https://github.com/mozilla/zamboni/commit/782e1f6

That should be all that needs to be changed. For packaged-app updates I have no idea - if we need more done there, then let's file new bugs. Thanks, Jonas!
Assignee: nobody → cvan
Status: NEW → RESOLVED
Closed: 12 years ago
OS: Mac OS X → All
Hardware: x86 → All
Resolution: --- → FIXED
(In reply to Jonas Sicking (:sicking) from comment #0)
> The API is described in bug 790558 and is now implemented for both hosted
> and packaged apps.
> 
> In particular, the status properties and events for when an app is installed
> is completely different and now more explicitly handles phases like
> "installed but not yet downloaded".
> 
> The API is pretty recently landed, so do make sure to file bugs on any
> weirdness that you see.

Jonas, updating to use `installState` instead of `status` changed absolutely nothing on my end. When I install an app, the `installState` always and *immediately* becomes "installed": https://marketplace-dev.allizom.org/app/airbnb/?mobile=true
That is the expected behavior for a hosted app which doesn't use an appcache property in the webapp manifest. Is that the case here?

Sorry, I don't seem to have access to the marketplace to be able to verify this myself.
(In reply to Jonas Sicking (:sicking) from comment #3)
> That is the expected behavior for a hosted app which doesn't use an appcache
> property in the webapp manifest. Is that the case here?

If the app is still not successfully created by Firefox and copied into my /Applications/ directory, the `installState` should not yet be "installed".

Regardless of appcache or not, this should still be the case. That was the original issue described in bug 777971.

> Sorry, I don't seem to have access to the marketplace to be able to verify
> this myself.

You can use any @mozilla.com email to log in. Let me know if you can't get in!
(In reply to Chris Van Wiemeersch [:cvan] from comment #4)
> (In reply to Jonas Sicking (:sicking) from comment #3)
> > That is the expected behavior for a hosted app which doesn't use an appcache
> > property in the webapp manifest. Is that the case here?
> 
> If the app is still not successfully created by Firefox and copied into my
> /Applications/ directory, the `installState` should not yet be "installed".

Before firing the .onsuccess event on the request returned from the install() function we do add the application to the app registry and do create the appropriate files in /Applications/. But nothing more has been downloaded other than the app manifest (and maybe the icon, not sure).

If the app doesn't have an appcache there is nothing more that needs to be downloaded. Hence the application is ready to be launched and so .installState=="installed" is the appropriate value.

At least that is the intended behavior. Are you seeing something else?
You need to log in before you can comment on or make changes to this bug.