unable to update apps (HttpError:401 - UNAUTHORIZED)

Bug #1620828 reported by taiebot65
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Confirmed
Critical
Bill Filler
ubuntu-system-settings (Ubuntu)
Confirmed
High
Jonas G. Drange

Bug Description

Mako
channel r395 (rc-proposed/bq-aquaris.en)

I have two updates pending but i am unable to update them.

Every time i check there is the sign in to ubuntu one I put my log-in details.

It looks for updates and gives me back the sign.
If i go to accounts, There is no accounts for ubuntu one

I can re-enter my login details and when i go back my account is rightly in place.
I turn close the app > re start it and i see two updates are available
(riddling and balls)

Balls as the error Update failed HttpError:401 -UNAUTHORIZED

Revision history for this message
taiebot65 (dedreuil) wrote :

Btw i can install app with no probem

Revision history for this message
Jonas G. Drange (jonas-drange) wrote :

@dedreuil, thanks for reporting this!

We shouldn't really invalidate credentials unconditionally on 40[1,2,3] (?), but if we do we also need to remove any tokens in the database.

Changed in ubuntu-system-settings (Ubuntu):
importance: Undecided → High
assignee: nobody → Jonas G. Drange (jonas-drange)
Changed in ubuntu-system-settings (Ubuntu):
status: New → Confirmed
Changed in canonical-devices-system-image:
status: New → Confirmed
Revision history for this message
taiebot65 (dedreuil) wrote :

Is there any work around i could do at the moment?

Revision history for this message
Jonas G. Drange (jonas-drange) wrote : Re: [Bug 1620828] Re: unable to update apps (HttpError:401 - UNAUTHORIZED)

On 7 September 2016 at 21:32, taiebot65 <email address hidden> wrote:

> Is there any work around i could do at the moment?

​You could try deleting

     .local/share/ubuntu-system-settings/updatestore.db

Also, could you attach ​the file

    .cache/upstart/application-legacy-ubuntu-system-settings-.log

​Thank you​

Revision history for this message
taiebot65 (dedreuil) wrote :

i attached the file. I also keep getting logged out of my ubuntu one account when i update.

Revision history for this message
taiebot65 (dedreuil) wrote :

I found a way to update is via the website of ubuntu one and delete my account from there. But again i am still getting logged out quite often.

Revision history for this message
Jonas G. Drange (jonas-drange) wrote :

Are you able to produce a procedure I can follow to reproduce this? I am unable using the description as it stands now.

Thank you.

Revision history for this message
taiebot65 (dedreuil) wrote :

it must be due to the riddling app. I cannot find it on my phone. While the Ubuntu store scope shows it is installed and the software updater wants to update

Revision history for this message
taiebot65 (dedreuil) wrote :

after deleting the riddling app from the Ubuntu store everything is fine now.
it makes sense problem started appearing on my phone when i was notified of an update for the riddling app 04/09/2016.

Revision history for this message
Jonas G. Drange (jonas-drange) wrote :

On 8 September 2016 at 00:45, taiebot65 <email address hidden> wrote:

> after deleting the riddling app from the Ubuntu store everything is fine
> now.
> it makes sense problem started appearing on my phone when i was notified
> of an update for the riddling app 04/09/2016.

​That's a clue, though. Isn't the riddling an app you have to buy? Do you
have other apps installed that you bought?

I'll try to reproduce using an app I have to buy.

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

Riddling is also an app that was originally free then converted to a paid app, in case it matters.

Revision history for this message
taiebot65 (dedreuil) wrote :

OK certainly a duplicate of 1516917 riddling was free a long time ago. So I installed it. When it got updated it must have faulted. However the problem is the Ubuntu one account it gets removed so all apps cannot be updated

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

I recently experienced this, my account was not invalidated yet certain updates that had previously failed would not retry, and failed with unauthorized. I modified the updatestore.db to remove the rows for the failed entries, and the updates worked.

So effectively somehow a failed update logged to the db will lock the user from ever getting the app update. I can assume we are using some cached but bad data from the db to retry, whereas we should start over.

Changed in canonical-devices-system-image:
assignee: nobody → Bill Filler (bfiller)
importance: Undecided → Critical
milestone: none → backlog
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

The db that caused the retry failures

tags: added: regression-release
Changed in canonical-devices-system-image:
milestone: backlog → 14
Revision history for this message
dinamic (dinamic6661) wrote :

same here arale/rc-proposed (failed to update music app) yesterday

Revision history for this message
dobey (dobey) wrote :

@Pat the only reason it would matter if the app is paid now, is if the account being used on the phone has changed to one that didn't install it when it was free. If the app was installed by the account when it was free, it's still "purchased" as far as the server is concerned, and should be installable. Or, if the app was installed originally by side-loading, rather than via the store; then the store would have no record of it.

Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

@rodney the apps in question were uNav, SensorStatus and Recorder for example. None are paid, so I am agreeing it does not have to do with paid vs free. Hence I de-duped it.

Changed in canonical-devices-system-image:
milestone: 14 → x1
Revision history for this message
Jonas G. Drange (jonas-drange) wrote :

The cause of this bug is that we don't really acknowledge that tokens expire. So it's a bug in the plugin, not the server. A proposed fix is to keep tokens and their associated expiry date so that the plugin can know what tokens has expired and recreate them if necessary.

We could then reduce the complexity of the token retrieval code, since we could just produce 5 minute tokens locally, and not do the token-dance with the server.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.