Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Network error when running onedrive-pref #182

Closed
ghost opened this issue Sep 11, 2015 · 15 comments
Closed

Network error when running onedrive-pref #182

ghost opened this issue Sep 11, 2015 · 15 comments

Comments

@ghost
Copy link

ghost commented Sep 11, 2015

When running onedrive-pref, I paste the callback URL.

https://login.live.com/oauth20_desktop.srf?code=xxxxxxxx-xxxx-...

I'm only getting this

[2015-09-11 14:40:25,896] INFO: MainThread: network connection error.
[2015-09-11 14:40:25,896] INFO: MainThread: put to sleep due to networking error.
[2015-09-11 14:40:26,016] DEBUG: thread_mgr: able to realize "onedrive.com:80".
[2015-09-11 14:40:26,016] INFO: MainThread: waken up by ThreadManager.
[2015-09-11 14:40:26,375] INFO: MainThread: network connection error.
[2015-09-11 14:40:26,375] INFO: MainThread: put to sleep due to networking error.
[2015-09-11 14:40:26,506] DEBUG: thread_mgr: able to realize "onedrive.com:80".
[2015-09-11 14:40:26,507] INFO: MainThread: waken up by ThreadManager.

Using elementary OS 0.3 (Ubuntu 14.04)

@ilMike42
Copy link

Same problem here, Ubuntu 14.04.3 LTS.

@erinzm
Copy link
Contributor

erinzm commented Sep 11, 2015

Same problem as well, Ubuntu 15.04.

@xybu
Copy link
Owner

xybu commented Sep 11, 2015

Something must have changed on OnrDrive's sign in flow.

Sincerely,
Xiangyu Bu

Sent from my Windows Phone


From: Liam Marshallmailto:notifications@github.com
Sent: ‎9/‎11/‎2015 5:13 PM
To: xybu/onedrive-d-oldmailto:onedrive-d-old@noreply.github.com
Subject: Re: [onedrive-d-old] Network error when running onedrive-pref (#182)

Same problem as well, Ubuntu 15.04.


Reply to this email directly or view it on GitHub:
#182 (comment)

@xybu
Copy link
Owner

xybu commented Sep 11, 2015

Are you guys behind some proxy? What is your internet connection? I can't reproduce the problem here.

@erinzm
Copy link
Contributor

erinzm commented Sep 11, 2015

It seems to be a SSL error, when I ^c the process I get a bunch of exceptions of the form:

^CTraceback (most recent call last):
  File "/home/liam/.local/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 544, in urlopen
    body=body, headers=headers)
  File "/home/liam/.local/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 341, in _make_request
    self._validate_conn(conn)
  File "/home/liam/.local/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 761, in _validate_conn
    conn.connect()
  File "/home/liam/.local/lib/python3.4/site-packages/requests/packages/urllib3/connection.py", line 238, in connect
    ssl_version=resolved_ssl_version)
  File "/home/liam/.local/lib/python3.4/site-packages/requests/packages/urllib3/util/ssl_.py", line 279, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/lib/python3.4/ssl.py", line 365, in wrap_socket
    _context=self)
  File "/usr/lib/python3.4/ssl.py", line 583, in __init__
    self.do_handshake()
  File "/usr/lib/python3.4/ssl.py", line 810, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/liam/.local/lib/python3.4/site-packages/requests/adapters.py", line 370, in send
    timeout=timeout
  File "/home/liam/.local/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 574, in urlopen
    raise SSLError(e)
requests.packages.urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)

During handling of the above exception, another exception occurred:

@erinzm
Copy link
Contributor

erinzm commented Sep 11, 2015

Nope, not behind a proxy either. Just normal, Charter-cable internet.

@ghost
Copy link
Author

ghost commented Sep 11, 2015

Normal connection here too. Here's my error log http://pastebin.com/jYFyE81k

@ilMike42
Copy link

Normal connection for me, too.

@oSLXo
Copy link

oSLXo commented Sep 13, 2015

Same issue , Debian 8.2 x64 , no proxy
Internet connexions tested : France ADSL SFR Operator & France 3G Mobile Bouygues Tel. Operator
OneDrive with Two Factor authentification (just in case, but callback url is well return by onedrive website)

@sleepyfran
Copy link

Same issue here with Ubuntu 15.04 and no proxy.

@xybu
Copy link
Owner

xybu commented Sep 14, 2015

It's more likely some issue on the server side. A possible workaround would be to disable SSL certification verification on python-requests package. It would be adding the argument everywhere requests is used in the API code.

@oSLXo
Copy link

oSLXo commented Sep 14, 2015

Interactive request with browsers to http://onedrive.com are redirected to https://

In ondrive-pref log we see : thread_mgr: able to realize "onedrive.com:80".
Shouldn't it try to connect onedrive.com:443 ?

Maybe Microsoft have made some change on the network load balancer / web application firewall going wrong with onedrive-pref ... something like user-agent not being correctly detected and not redirected to https://

@ebrainte
Copy link

I figured it out. Just go to line 185 of file od_onedrive_api.py and change
OneDriveAPI.OAUTH_TOKEN_URI, data=params, verify=True)

to

OneDriveAPI.OAUTH_TOKEN_URI, data=params, verify=False)

Now build and install it. Voila!

@erinzm
Copy link
Contributor

erinzm commented Sep 16, 2015

@ebrainte: This is the correct fix - for whatever reason, Kenneth Reitz's Certif.io doesn't verify Onedrive's HTTPS cert properly.

@xybu
Copy link
Owner

xybu commented Sep 16, 2015

Documented the problem in https://github.com/xybu/onedrive-d/issues/19. Will port the workaround to new version when I get time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants