u1 account crashes and gets removed when installing app

Bug #1389028 reported by Mathijs Veen
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ubuntu-system-settings-online-accounts (Ubuntu)
Incomplete
Undecided
Unassigned
ubuntuone-credentials (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

platform: Ubuntu touch
image: rtm #6
device: Mako

after updating to rtm #6 today, I tried installing an app from the store. The app in question is the new Grooveshark app by Grooveshark (NOT the one by Adnane Belmadiaf)

When I hit the install button, I get an error:

Login Error
Please log in to your Ubuntu One account

Sure enough, my U1 is gone fron the registered online accounts.

I can re-add my U1 account and try again to add the app but the same thing happens every time. Even after a device reboot.

Note that it has something to do with this app. Other apps install normally.
(Needless to say i have not tried every app or scope in the store so there might be others that trigger this as well.)

Cheers,

Mat

Revision history for this message
Alberto Mardegan (mardy) wrote :

Hi Mat, and thanks for reporting this bug. I'm going to ask a few questions to help me understand the issue.

Do you mean that everytime you add an U1 account and then reboot, you can no longer find the account in the Accounts panel in System Settings? If so, can you please try adding more accounts (like google, facebook and twitter) and see if they persist after a reboot?

Changed in ubuntu-system-settings-online-accounts (Ubuntu):
status: New → Incomplete
Revision history for this message
Mathijs Veen (matv1) wrote :

Hi Alberto, Very sorry for my delayed response after this morning on irc. I was at work. Usually I can do this stuff on the side but I got totally swamped today :O

So I think you wanted me to tap into UOA service logging, right? Can you give me once more the commands to generate the output that you need?

Thanks for the help,

Mat

Revision history for this message
Alberto Mardegan (mardy) wrote :

Sure, here they are:

   export UOA_LOGGING_LEVEL=2
   export UOA_DAEMON_TIMEOUT=9999
   online-accounts-service

the last command won't return; it will print its output on the console (or you can capture it into a file if you append a " > file.log" to the last command), and you can kill it with Ctrl+C after you are done creating the U1 account.

Revision history for this message
Mathijs Veen (matv1) wrote :

nothing gets logged. running

online-accounts-service

itself seems to crash because after 2 seconds i get handed back to the shell prompt (don't think thats supposed to happen).
it makes no difference if i direct output to screen or to file. if i do direct output to file, the file gets created but stays empty.

fwiw I am running the commands on the phisical device. not over adb shell

what am i missing?

Revision history for this message
Alberto Mardegan (mardy) wrote :

That would be the normal behaviour if
   export UOA_DAEMON_TIMEOUT=9999
were not specified. Are you sure you typed it correctly?

Revision history for this message
Mathijs Veen (matv1) wrote : Re: [Bug 1389028] Re: u1 account crashes and gets removed when installing app

I just had a careful look at my command recall on the terminal and I am
absolutely sure.

On Thu, Nov 6, 2014 at 3:32 PM, Alberto Mardegan <<email address hidden>
> wrote:

> That would be the normal behaviour if
> export UOA_DAEMON_TIMEOUT=9999
> were not specified. Are you sure you typed it correctly?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1389028
>
> Title:
> u1 account crashes and gets removed when installing app
>
> Status in “ubuntu-system-settings-online-accounts” package in Ubuntu:
> Incomplete
>
> Bug description:
> platform: Ubuntu touch
> image: rtm #6
> device: Mako
>
> after updating to rtm #6 today, I tried installing an app from the
> store. The app in question is the new Grooveshark app by Grooveshark
> (NOT the one by Adnane Belmadiaf)
>
> When I hit the install button, I get an error:
>
> Login Error
> Please log in to your Ubuntu One account
>
> Sure enough, my U1 is gone fron the registered online accounts.
>
> I can re-add my U1 account and try again to add the app but the same
> thing happens every time. Even after a device reboot.
>
> Note that it has something to do with this app. Other apps install
> normally.
> (Needless to say i have not tried every app or scope in the store so
> there might be others that trigger this as well.)
>
> Cheers,
>
> Mat
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/ubuntu-system-settings-online-accounts/+bug/1389028/+subscriptions
>

Revision history for this message
Alberto Mardegan (mardy) wrote :

Then there was probably another online-accounts-service process running. Try running

    pkill online-accounts-service

before running the "online-accounts-service" command.

Revision history for this message
Mathijs Veen (matv1) wrote :

I am completely stumped by this. for sure I am missing something absolutely obvious, I just cant think what.

pkilling the process and then starting it again does not help.

online-accounts-service

still seems to timeout(or crash) after a couple of seconds. It will simply not output to screen nor log to file.
here are my futile attemps to get some clearity:
So I suddenly noticed that the underscores were missing in the export commands in the terminal app, even though I was typing them. Discussed that bug with swordfish90 and he assumed that that was caused by a font problem. Shouldnt impact on the actual commands pushed. So i did file a bug for that.
Getting back to this problem, I wanted to be sure that the terminal bug wasnt causing the log commands to fail. So I adb shelled into my device and even ssh-ed into it to run the commands but always with the same result.
I considered that maybe this was a authorization problem. Although I was always in developer mode.

So I also remembered your initial thought that maybe some files or the filesystem got corrupted. In light of a couple of bugs of that nature recently, I needed to rule that out. So i reflashed my device using the --wipe options. But still I could trigger the bug and consistenly so. In the meantime rtm had got some new images promoted but on all those still the bug remains. I finally did another --wipe install but changed to rtm-proposed channel. Still the bug is there.

The weirdest thing is that I am apparently the only one that is hit by this bug. If that is so, then it almost seems to me that my U1 account is corrupted(is that even possible?).
I dont'really know what I can do now as I can't seem to generate logfiles for this one.
Any ideas :) ?

Revision history for this message
Alberto Mardegan (mardy) wrote :

Hi Mathijs, I'm terribly sorry, but I realize that I messed up the variables' names. They should be:

   export OAU_LOGGING_LEVEL=2
   export OAU_DAEMON_TIMEOUT=9999

I always get confused between Ubuntu Online Accounts and Online Accounts UI :-)

Revision history for this message
Mathijs Veen (matv1) wrote :

haha I thought I was going mad! No worries though.

So here is what was logged when my U1 account gets added to online accounts:

http://pastebin.ubuntu.com/9134361/

So I can't tell if there is anything worrysome in there. from the outside it always looks like my account gets created ok.
But when after that, I go and install Grooveshark, My U1 account gets removed from online accounts like I described in the original report.

Actually, I don't even care about the grooveshark app. But when -at least in some cases- an app is able to take down online accounts, that would seem less then desirable.

Hopefully the log tells you something. When you need more from me, let me know.

cheers

Revision history for this message
Mathijs Veen (matv1) wrote :

Hang on, I kept the log running and it logged some more after the crash caused by Grooveshark. Here is the whole thing (so the first part is the same):

http://pastebin.ubuntu.com/9134841/

Hope this helps.

Revision history for this message
Alberto Mardegan (mardy) wrote :

Thanks Mathijs, the logs don't seem suspicious. After you have created the account from the System Settings, does the view goes back to the accounts list (and if so, can you see the U1 account there?), or is it still on the providers list?

Revision history for this message
dobey (dobey) wrote :

You're certain this only happens when trying to install Grooveshark? It doesn't happen when installing other apps or scopes?

Revision history for this message
Mathijs Veen (matv1) wrote :

@dobey correct. Again: I haven't tried every app in the store. not by a stretch but I try and install what looks decent on and off. I accidentally hit this bug.

@mardy: it stays on the providers list. I then go manually back to the installed accounts list. And the U1 account is there.

I videod the whole thing so you have a better understanding of what happens and maybe spot something odd. However be aware that the quality is somewhat less then stellar :)
It starts with me adding the U1 account, then go to grooveshark to install. you will see that the U1 account gets bumped instantly.

the vid is here:

http://37.251.54.131/owncloud/public.php?service=files&t=3d71b366b075aa485eec034c85323e5f

Revision history for this message
Mathijs Veen (matv1) wrote :

Resolved

This was indeed caused by a corrupt U1 account. The device account was registered twice where this ought to be unique per device/server-side token.

http://37.251.54.131/owncloud/public.php?service=files&t=e8f7ba13530bbbc20be0b322270aefff

After deleting both instances on the server as well as the one on my phone (and re-register) the bug was gone.

( a relative loose end of this issue seems to me how only that one specific app could trigger this behaviour )
Bug resolved

Changed in ubuntu-system-settings-online-accounts (Ubuntu):
status: Incomplete → Fix Released
Mathijs Veen (matv1)
Changed in ubuntu-system-settings-online-accounts (Ubuntu):
status: Fix Released → New
Mathijs Veen (matv1)
Changed in ubuntu-system-settings-online-accounts (Ubuntu):
status: New → In Progress
Revision history for this message
Mathijs Veen (matv1) wrote :

Spoken too soon. I am again hit by this bug. This time it is triggered by the 'Marktplaats WebApp' clickstore app. Again consistently so. But the first app that triggered it is also doing it (again). So now I have 2 html5 apps that are doing this.

Of course I checked for duplicate registration of my U1 account for ubuntu one @ ubuntu phablet. But that is not the case this time. I also deleted the one registration that was there, logged off from ubuntu one web-login, registered my U1 account on the device, but the same thing keeps happening.

We previously assumed that the corrupt U1 account caused this, but now i am thinking the reverse: for some reason, getting these apps from the clickstore causes U1 to get corrupted.

Revision history for this message
Alberto Mardegan (mardy) wrote :

I looked at the video posted in comment 14 more attentively. There one can see that after the U1 account plugin quits, the view returns back to the provider list (the page which has the "Add account" title), and this only happens when the account plugin returns an error.
Yet, the U1 account appears to have been created, and is visible in the accounts list. But when the store is opened, it shows the "Go to accounts" button (which means that the store did not find the U1 account) and indeed we don't see the U1 account in the System Settings anymore.
My guess is that the U1 account creation failed, but the account gets deleted later, by a background process, and this might happen before (as we see in the video) or after visiting the application store. Maybe when a certain timeout is hit.

I'm assigning this to the ubuntuone-credentials projects, to investigate why the U1 account plugin returns an error but still creates the plugin (and then find out who deletes it).

Changed in ubuntu-system-settings-online-accounts (Ubuntu):
status: In Progress → Incomplete
Revision history for this message
dobey (dobey) wrote :

I'm setting this back to Fix Released. As stated by the original reporter in comment #15, this was due to a corrupted account on the server, which had two different tokens somehow registered for the device. This would cause the account to be created successfully when logging in via Online Accounts, but when the account would be used by the scope, it would see from the server that the credentials were invalid (because the server was expecting a different token), and the scope would delete the local account and require the user to log in again (because it appeared to have invalid credentials on the device). By deleting both tokens on the server, via the web site, and then logging in again, the issue was resolved for Mathijs.

Changed in ubuntuone-credentials (Ubuntu):
status: New → Fix Released
Revision history for this message
Mathijs Veen (matv1) wrote :

Sorry but I can not agree with the analyses. As I said (#16), the issue remains after the duplicate token was resolved. Also Alberto's take just does not fly (the assumption that the U1 account never was properly created), because how else could I install every other app from the store?
I do not like to waste anyone’s time and I can see that when no one else is reporting this, It seems kind of flaky. Yet I can still reproduce this issue consistently to this day: My U1 account works fine and I can do anything one should expect it to do. Except that installing a couple of very specific apps cause U1 to crash(or at least for all intents and purposes, be deleted from the phone). The consistency just does not add up to some fluke occurrence.
I am replying especially again because -if this is indeed an issue with merrit- the implications may just be big. (U1 accounts in relation to the clickstore in certain cases can not guarantee cardinality)
I will continue to provide whatever is needed if some one asks, but will not pursue it any more myself.

argon (argon)
description: updated
dobey (dobey)
description: updated
Revision history for this message
adam plaice (adam.plaice) wrote :

Sorry for spamming this and sorry that my contribution won't be too helpful (though I think that on net, considering how annoying, but elusive, a bug it appears to be, it's better if I do record this than if I don't).

ota7
ubuntu aquaris e5 hd (vegetahd)

I had a very similar experience as the original submitter about two weeks ago. I tried installing dekko from the store and when I hit the install button I had the same error as in the original description:

Login Error
Please log in to your Ubuntu One account

and my account disappeared from the list. Whenever I re-added my U1 account and tried to install the app again, the same thing happened. In contrast to the original bug description, the error and removal of my U1 account from the list also occurred for all other apps that I tried to install (I think I tried installing the document viewer and the calendar, but I'm not sure.) Registering with a different U1 account (created for this purpose) made no difference — the error and removal of the account still occurred. Rebooting the system also had no effect.

The error permanently disappeared (for all apps — i.e. I could install any app, including dekko, without errors) after I added another online (google) account (in addition to re-registering my U1 account again), in order to check if it would also vanish at the same time as the U1 account. Removing the additional account did not cause the error to revert. The entire episode (from first occurrence of the bug to its disappearance) lasted several hours.

I had not previously added any online accounts other than the U1 account. I had previously installed several apps successfully before the bug appeared and had not done anything (almost literally) with my device between the previous successful install and the first appearance of the bug.

My musings:
I'm not sure whether the bug was "solved" by the addition of the extra online account or by the passage of time. I also don't know whether it was client- or server-side, though both registering via my device and managing the U1 account via the web interface (https://login.ubuntu.com/) worked fine, suggesting that it probably wasn't a matter of the server simply being down.

Note:
I'm not expecting anyone to produce a patch to fix this based on my description, but hope that it will be of some help to anyone who arrives here via an online search.

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.