Gwibber fails to add Facebook account with Login Approvals/Notifications enabled

Bug #964837 reported by William Hetherington
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gwibber (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Running Gwibber 3.3.93 on 12.04.

When attempting to add a Facebook account to Gwibber - it will fail with the following in stdout, when Login Notification & Login Approvals are enabled:

Traceback (most recent call last):
  File "/usr/share/gwibber/plugins/facebook/gtk/facebook/__init__.py", line 147, in on_facebook_auth_title_change
    data = json.loads(urllib.urlopen("https://graph.facebook.com/me?access_token=" + self.account["access_token"]).read())
  File "/usr/lib/python2.7/urllib.py", line 86, in urlopen
    return opener.open(url)
  File "/usr/lib/python2.7/urllib.py", line 207, in open
    return getattr(self, name)(url)
  File "/usr/lib/python2.7/urllib.py", line 436, in open_https
    h.endheaders(data)
  File "/usr/lib/python2.7/httplib.py", line 954, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 814, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 776, in send
    self.connect()
  File "/usr/lib/python2.7/httplib.py", line 1161, in connect
    self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file)
  File "/usr/lib/python2.7/ssl.py", line 381, in wrap_socket
    ciphers=ciphers)
  File "/usr/lib/python2.7/ssl.py", line 143, in __init__
    self.do_handshake()
  File "/usr/lib/python2.7/ssl.py", line 305, in do_handshake
    self._sslobj.do_handshake()
IOError: [Errno socket error] [Errno 104] Connection reset by peer

After disabling both of these features - account adds without issue.

Revision history for this message
Bilal Shahid (s9iper1) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please answer these questions:

* Is this reproducible now ?
* If so, what specific steps should we take to recreate this bug?

This will help us to find and resolve the problem.

Changed in gwibber (Ubuntu):
status: New → Incomplete
Revision history for this message
Ricardo Filipe Moreira (ricardofavmoreira) wrote :

If you enable Facebook Login Approvals (in facebook.com > Account Settings > Security > Login Approvals > [X] Require me to enter a security code each time an unrecognized computer or device tries to access my account) then Facebook sends a SMS to your phone with a code you must enter in the login page after you login with a browser/app you've never used before. This happens when logging in to Gwibber. In Gwibber you get to enter the code from the SMS, assign a device name so the "browser" is recognized, and asks to allow the app to connect & post. After the setup is complete the window closes and you go back to the accounts manager in Gwibber and the Facebook account is there but the Approve button still appears and when you click it the whole process starts over again, sending a new SMS and asking for a new device name to assign to Gwibber.

In the browser Facebook sets "recognized" computers as cookies, and for some apps (mobile phones, webmessengers) it sends a code to use as a password instead of the real one.
My guess is Gwibber doesn't store cookies and doesn't use app-passwords, so it is never seen by Facebook as a recognized device.

If you disable Login Approvals in Facebook Gwibber works fine.

Changed in gwibber (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Ricardo Filipe Moreira (ricardofavmoreira) wrote :

Ok the SMS part is if you enable Login Approvals and the "enter device name" is if Login Notifications (SMS or E-Mail telling you that you accessed from that device and when you did). Either way having either one or both options enabled makes the App not work, because Gwibber never stores the "recognized device" status (my guess is the cookie with the device id given by Facebook).

Revision history for this message
Marius B. Kotsbak (mariusko) wrote :

This seems to be resolved in the version in Ubuntu 12.10.

Changed in gwibber (Ubuntu):
status: Confirmed → Won't Fix
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.