gwibber authentication fail

Bug #1190359 reported by cat
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
gwibber (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

while trying to authenticate twitter in gwibber in Ubuntu 12.04.2 I get the following error
Traceback (most recent call last):
  File "/usr/share/gwibber/plugins/twitter/gtk/twitter/__init__.py", line 148, in on_twitter_auth_title_change
    account_data = json.loads(urllib2.urlopen(apireq.to_url()).read())
  File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 406, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 519, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 444, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 527, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 410: Gone

P.S. No proxy this time.
Description: Ubuntu 12.04.2 LTS
Release: 12.04
gwibber version: 3.4.2-0ubuntu2.2

Tags: 12.04.2
Revision history for this message
cat (netcat-z) wrote :
affects: python-launchpadlib (Ubuntu) → gwibber (Ubuntu)
tags: added: 12.04.2
description: updated
cat (netcat-z)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gwibber (Ubuntu):
status: New → Confirmed
Revision history for this message
Omar (firestarter) wrote :

It affects me too, Gwibber (Unity Launcher) wasnt showing new twits anymore, so I deleted my account for later creating it again, but now it fails to authenticate, but also Hotot isnt working, can this be a problem with Twitter service itself?
This is shown in log:
2013-06-11 19:54:38,740 - Network Thread-22 : ERROR - HTTP Error for https://api.twitter.com/1/statuses/user_timeline.json - error code: 410

cat (netcat-z)
description: updated
Revision history for this message
Tom Brossman (tom.brossman) wrote :

This is probably a duplicate of #1190479 "Twitter auth does not work. API Change."

https://bugs.launchpad.net/ubuntu/+source/gwibber/+bug/1190479

Should one or the other be closed / marked as duplicates?

Revision history for this message
cat (netcat-z) wrote :

I wonder if gwibber is supported at all, because latest version is rewritten and called Friends. My company uses LTS version and gwibber so I need to know if it will be fixed or should I search for a working solution.

Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

Workaround:

On Quantal (Gwibber 3.6):

Open "/usr/share/gwibber/plugins/twitter/gtk/twitter/__init__.py" in gedit as root & change
`API_PREFIX = "https://api.twitter.com/1"` to
`API_PREFIX = "https://api.twitter.com/1.1"`

On Precise (Gwibber 3.4.2):

Same changes will work.

But time to time it tends to throw "sorry that page is not found". However I couldn't able to reproduce it.Unfortunately I am no expert in python, hence I have a hard time to figure out what API change on twitter part causing this.

Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

Sorry , you should open "/usr/share/gwibber/plugins/twitter/__init__.py" as root in gedit.

Revision history for this message
cat (netcat-z) wrote :

Unfortunately it doesn't work:

root@precise:/usr/share/gwibber/plugins/twitter# cat __init__.py | grep API
API_PREFIX = "https://api.twitter.com/1.1"
    url = "/".join((API_PREFIX, path))
............................................
Loading plugin for twitter
Traceback (most recent call last):
  File "/usr/share/gwibber/plugins/twitter/gtk/twitter/__init__.py", line 148, in on_twitter_auth_title_change
    account_data = json.loads(urllib2.urlopen(apireq.to_url()).read())
  File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 406, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 519, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 444, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 527, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 410: Gone

Revision history for this message
cat (netcat-z) wrote :

btw I tried restarting gwibber and even reboot.

Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

@cat On Quantal or Precise? From the log it seems it still tries to authenticate with v1 url instead of v1.1 hence getting http 410 error.

Try removing twitter-account both from gwibber & twitter. Remove gwibber & gwibber-service , reboot, re-install it, change AP_Prefix, re-authorize twitter & finally run "gwibber-service -d" to check if its still getting any error. Meanwhile I try dig deep into the code to see whats really going on.

Revision history for this message
cat (netcat-z) wrote :

It's 12.04. I'll try what you say later today. And if you discover anything interesting please keep us informed. I cannot work without gwibber.(now using birdie)..

Revision history for this message
cat (netcat-z) wrote :

btw I removed the gwibber account and now when I try to create one and enter the passwd for twitter I get exactly the same error so account cannot be created.

Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

@cat After removing Gwibber also remove "/usr/share/pyshared/gwibber" & "/usr/lib/python2.7/dist-packages/gwibber" directories( if they are not already removed automatically). If you are using python3.2 change the path accordingly.

Revision history for this message
cat (netcat-z) wrote :

I tried everything you wrote with no luck. Unfortunately it doesn't work. "gwibber-service -d" gives no output and the account cannot be created.

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.