No way to re-add a computer to your account

Bug #363243 reported by Robbie Williamson
68
This bug affects 12 people
Affects Status Importance Assigned to Milestone
Ubuntu One Client
Fix Released
High
Tim Cole

Bug Description

The applet was simply spinning when trying to connect, so I thought that I should maybe remove my computer from my account and add it back. Turns out, I can't add it back, following the instructions. I suppose I could remove the package and my account, i.e. start all over, but there should probably be an easier way.

dobey (dobey)
Changed in ubuntuone-client:
assignee: nobody → Rodney Dawes (dobey)
importance: Undecided → High
milestone: none → beta1
status: New → Triaged
Revision history for this message
Tim Cole (tcole) wrote :

I believe it is possible to use the command:

 u1sync --authorize

to re-add your machine, though this is not obvious and there should be a more straightforward way to do it.

Changed in ubuntuone-client:
assignee: Rodney Dawes (dobey) → Tim Cole (tcole)
Revision history for this message
Robbie Williamson (robbiew) wrote :

robbiew@laptop:~$ u1sync --authorize
Authentication failed: Authentication Failed
robbiew@laptop:~$

Didn't work. Is there a way to get back to the webpage that allows you to add a client, i.e. the one that you are taken to after installing? I would think that adding that as an option would be the easiest way.

Revision history for this message
Elliot Murphy (statik) wrote :

Hi Robbie, while we will be fixing this properly, as a workaround to get you past this immediately, you can delete the Ubuntu One client OAuth token from your keyring, quit the applet, and restart it.

Look in Applications -> Accessories -> Passwords and Encryption Keys, the Passwords tab, and delete the "UbuntuOne token for https://ubuntuone.com".

Revision history for this message
Tim Cole (tcole) wrote :

Ahh. You do need to delete the key from the keyring before running u1sync --authorize. The error message could stand to be more informative...

Revision history for this message
John O'Brien (jdobrien) wrote : Re: [Bug 363243] Re: No way to re-add a computer to your account

Can't the client do this?

Tim Cole wrote:
> Ahh. You do need to delete the key from the keyring before running
> u1sync --authorize. The error message could stand to be more
> informative...
>

Revision history for this message
dobey (dobey) wrote :

On Mon, 2009-05-04 at 23:20 +0000, John O'Brien wrote:
> Can't the client do this?

The client shouldn't need to delete the token from the keyring. It
should just go through the process again, and replace the existing token
with the new one. If auth fails, it knows the local token may not be
valid, and should try to grab a new one.

We also need some additional information in the client though, to know
why the auth failed, to be able to fix this entirely correctly. We also
should probably fix the server side to not give out OAuth tokens to
"Dead" accounts. If the client coded had been working as it should to
resolve this bug, then I think people probably would have been stuck in
some sort of infinite loop trying to authenticate their machines.

Revision history for this message
Tim Cole (tcole) wrote :

Maybe. It depends on how bad nuking your existing authorization token if it's still valid/if you didn't mean to is. It might make sense to have a separate --reauthorize option if that is your intent.

Revision history for this message
Robbie Williamson (robbiew) wrote :

I deleted the key, quit the applet, and restarted it...still have the same results:
  robbiew@laptop:~$ u1sync --authorize
  Authentication failed: Authentication Failed
  robbiew@laptop:~$

Revision history for this message
Robbie Williamson (robbiew) wrote :

Nevermind. I deleted the info from the "My Personal Keys" tab, but not the "Passwords" tab...doing this worked.

Revision history for this message
Robbie Williamson (robbiew) wrote :

Spoke too soon. While I was able to add my computer to my account, I still cannot connect or sync. If I place my mouse cursor over the applet icon, it says "Ubuntu One: Authentication failed".

.cache/ubuntuone/log/syncdaemon.log file has:
2009-05-04 23:43:31,607 - ubuntuone.SyncDaemon.Main - DEBUG - ---- MARK ----
2009-05-04 23:43:53,244 - ubuntuone.SyncDaemon.EQ - DEBUG - push_event: SYS_CONNECT, args:(<canonical.ubuntuone.storage.protocol.oauth.OAuthToken object at 0x9b5356c>,), kw:{}
2009-05-04 23:43:53,245 - ubuntuone.SyncDaemon.ActionQueue - DEBUG - disconnected
2009-05-04 23:43:53,245 - ubuntuone.SyncDaemon.State - DEBUG - AUTH_FAILED --[SYS_CONNECT]--> AUTH_FAILED
2009-05-04 23:43:53,245 - ubuntuone.SyncDaemon.EQ - DEBUG - push_event: SYS_STATE_CHANGED, args:(), kw:{'state': <AQErrorState AUTH_FAILED>}

.ubuntuone_log/oauth-login.log file has:
2009-05-04 23:43:53,254:254.782915115 UbuntuOne.OAuthDesktop.main maybe_login() D-Bus message received with realm='https://ubuntuone.com', consumer_key='ubuntuone'
2009-05-04 23:43:53,255:255.399942398 UbuntuOne.OAuthDesktop.main Initiating OAuth login in LoginProcessor
2009-05-04 23:43:53,255:255.722999573 UbuntuOne.OAuthDesktop.main Obtaining OAuth urls
2009-05-04 23:43:53,256:256.021022797 UbuntuOne.OAuthDesktop.main Fetching config URLs for realm='https://ubuntuone.com'
2009-05-04 23:43:53,256:256.428956985 UbuntuOne.OAuthDesktop.main Realm 'https://ubuntuone.com' is not in config
2009-05-04 23:43:53,257:257.128000259 UbuntuOne.OAuthDesktop.main OAuth URLs are: request='https://ubuntuone.com/oauth/request/', userauth='https://ubuntuone.com/oauth/authorize/', access='https://ubuntuone.com/oauth/access/', secret='hammertime'
2009-05-04 23:43:53,257:257.567882538 UbuntuOne.OAuthDesktop.auth auth.AuthorisationClient created with parameters realm='https://ubuntuone.com', request_token_url='https://ubuntuone.com/oauth/request/', user_authorisation_url='https://ubuntuone.com/oauth/authorize/',access_token_url='https://ubuntuone.com/oauth/access/', consumer_key='ubuntuone', callback_parent='<bound method LoginProcessor.got_token of <canonical.ubuntuone.oauthdesktop.main.LoginProcessor instance at 0xa7047ec>>'
2009-05-04 23:43:53,257:257.957935333 UbuntuOne.OAuthDesktop.main Calling auth.client.ensure_access_token in thread
2009-05-04 23:43:53,258:258.765935898 UbuntuOne.OAuthDesktop.auth Trying to fetch the token from the keyring
2009-05-04 23:43:53,260:260.874032974 UbuntuOne.OAuthDesktop.auth Access token successfully found in the keyring
2009-05-04 23:43:53,261:261.471033096 UbuntuOne.OAuthDesktop.main Token retrieved: 'oauth_token_secret=cwJfq5BRWsWMk5GBdcbxDN3Zdhn6vzqn5JBQC3S548vCJp7n5VJcVLQFqTpdpQqTKGZX7fSRb46WqZbd&oauth_token=RwjGxDPwVwB0shRrwPwd'
2009-05-04 23:43:53,262:262.044906616 UbuntuOne.OAuthDesktop.main Calling NewCredentials function
2009-05-04 23:43:53,262:262.404918671 UbuntuOne.OAuthDesktop.main Firing the NewCredentials signal

Revision history for this message
Elliot Murphy (statik) wrote :

Hi Robbie, even though you had a subscription, your account was marked as 'dead', which is what was causing the authentication failure. we will investigate why this problem happened, but you should be able to connect now.

Revision history for this message
John O'Brien (jdobrien) wrote :
Revision history for this message
Elliot Murphy (statik) wrote :

The problem with clients not being able to connect has been fixed, so what remains for this bug is a better message abotut what the user should do when we get access denied from the storage API serevr due to a subscription being expired/inactive (in this case it was a bug that the subscription was inactive, but this should be fixed regardless).

Changed in ubuntuone-client:
milestone: beta1 → beta2
Revision history for this message
Tim Cole (tcole) wrote :

Also, I've just submitted a branch which makes u1sync --authorize blow away the old token.

Rick McBride (rmcbride)
visibility: private → public
Changed in ubuntuone-client:
milestone: beta2 → later
Revision history for this message
elgilicious (elginearl-deactivatedaccount) wrote :

Elliot -- your suggestion to remove the Ubuntu One token from Passwords and Encryption Keys did the trick. Thanks.

Revision history for this message
Erigami (erigami) wrote :

I tried running 'u1sync --authorize':

$ u1sync --authorize
Traceback (most recent call last):
  File "/var/lib/python-support/python2.6/dbus/connection.py", line 578, in msg_reply_handler
    reply_handler(*message.get_args_list(**get_args_opts))
  File "/usr/lib/python2.6/dist-packages/ubuntuone/oauthdesktop/auth.py", line 241, in got_state
    self.acquire_access_token(description, store)
  File "/usr/lib/python2.6/dist-packages/ubuntuone/oauthdesktop/auth.py", line 307, in acquire_access_token
    callback=callback_url)
  File "/usr/lib/python2.6/dist-packages/ubuntuone/storageprotocol/oauth.py", line 253, in from_token_and_callback
    parameters['oauth_token'] = token.key
AttributeError: 'NoneType' object has no attribute 'key'

Revision history for this message
Paulo J. S. Silva (pjssilva) wrote :

I am in the same waters as Erigami. I tried to re-add a computer and get exactly the same error.

I have also tried to delete everything related to ubuntuone in my $HOME (Ubuntu\ One folder and .cache/ubuntuone) and then re-add the computer and it didn`t work either.

Revision history for this message
Erigami (erigami) wrote :

I upgraded to the latest from the PPA, and the line numbers have changed slightly:

$ u1sync --authorize
Traceback (most recent call last):
  File "/var/lib/python-support/python2.6/dbus/connection.py", line 578, in msg_reply_handler
    reply_handler(*message.get_args_list(**get_args_opts))
  File "/usr/lib/python2.6/dist-packages/ubuntuone/oauthdesktop/auth.py", line 241, in got_state
    self.acquire_access_token(description, store)
  File "/usr/lib/python2.6/dist-packages/ubuntuone/oauthdesktop/auth.py", line 307, in acquire_access_token
    callback=callback_url)
  File "/usr/lib/python2.6/dist-packages/ubuntuone/storageprotocol/oauth.py", line 286, in from_token_and_callback
    parameters['oauth_token'] = token.key
AttributeError: 'NoneType' object has no attribute 'key'

Revision history for this message
Paulo J. S. Silva (pjssilva) wrote :

I have tried today, once again re-add one computer in my UbuntuOne account, what I did:

1) Checked that the computer is not listed in the web interface
2) Deleted the token from the keyring manager
3) Deleted ~/.cache/ubuntuone
4) Deleted ~/Ubuntu\ One

By looking at the log, it looks like the function make_token_request from /usr/share/pyshare/ubuntuone/oauthdesktop/auth.py is returning None since it got a parsing error when trying to get the token. The relevant Error message in the log is:

2009-08-04 08:01:34,005:5.02490997314 UbuntuOne.OAuthDesktop.auth Making token request
2009-08-04 08:01:34,005:5.14101982117 UbuntuOne.OAuthDesktop.auth Making a token request
2009-08-04 08:01:36,289:289.980888367 UbuntuOne.OAuthDesktop.auth Token was not successfully retrieved: data was 'Expired timestamp: given 1249383694 and now 1249384007 has a greater difference than threshold 300'

Note that the error complains that a timestamp is too old. Is this reflect of some configuration file that I left behind even doing steps 2, 3 and 4 above?

Anyhow, the function then returns None but the calling function, acquire_access_token in the same file, does not treat the error condition. I looks like this function should do something in this case. The function calls then the function from_token_and_callback from storageprotocol/auth.py that tries to access the "key" value of the None object and fails and an exception is raised.

Hope this description helps someone who really knows the code to tell us what to do in our case.

Obs: I attached my full 0auth-login.log to the bug report.

Revision history for this message
Paul Sladen (sladen) wrote :

The local computer's clock is 5:13 minutes out, when only a tolerance of 5:00 minutes is allowed for; in which case this would be a dup of bug #399805 ("Requires correct time and date (timezone) be set on client; should warn if not").

Revision history for this message
Sean Seago (speedkreature) wrote :

My PC crashed (hardware failure) and since I assumed each computer was using a unique key, I cleaned out the computers registered with Ubuntu One on my login. I restored my PC from a backup (/home only) after re-installing and went through the motions of getting Ubuntu One installed and ran into this problem. This solution listed in post #3 by Elliot Murphy did resolve my problem. Just wanted some one to know another person was affected by this.

Revision history for this message
Paulo J. S. Silva (pjssilva) wrote :

Paul:

You are right. Fixing the clock solved the problem. So Erigami should look at his clock too.

Obs: Sorry for taking so long to give feedback.

Revision history for this message
Erigami (erigami) wrote :

Thanks Paulo. Changing my clock does allow me to reauthorize, but my clock tends to drift a bit, so this doesn't seem like a long term solution.

It would be great if the client determined a time offset at the start of the session and used it in subsequent calculations so the user doesn't have to worry about jiggling seemingly unrelated settings.

Revision history for this message
Matt Griffin (mattgriffin) wrote :

I've been able to remove computers from my Ubuntu One account using the web user interface. Then the browser launched so I can re-add my computer. I might have closed my browser or logged out in order to make this happen and get the sync client to realize that my computer was no longer authorized for sync.

So I think we can call this fixed.

Changed in ubuntuone-client:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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