Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='storage.googleapis.com', port=443): Max retries exceeded with url: /chromium-browser-snapshots/Linux_x64/575458/chrome-linux.zip (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)) #126

Closed
Bhupesh-V opened this issue Feb 23, 2020 · 9 comments
Labels
answered question Further information is requested

Comments

@Bhupesh-V
Copy link

This issue also relates to the following issue

I am trying to run the following command
wplay -wc firstname_lastname

Then I select New session
but the following error is thrown

I am currently on a 32bit system

[W:pyppeteer.chromium_downloader] start chromium download.
Download may take a few minutes.
Traceback (most recent call last):
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/urllib3/contrib/pyopenssl.py", line 485, in wrap_socket
    cnx.do_handshake()
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/OpenSSL/SSL.py", line 1934, in do_handshake
    self._raise_ssl_error(self._ssl, result)
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/OpenSSL/SSL.py", line 1671, in _raise_ssl_error
    _raise_current_error()
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/OpenSSL/_util.py", line 54, in exception_from_error_queue
    raise exception_type(errors)
OpenSSL.SSL.Error: [('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/urllib3/connectionpool.py", line 672, in urlopen
    chunked=chunked,
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/urllib3/connectionpool.py", line 376, in _make_request
    self._validate_conn(conn)
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn
    conn.connect()
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/urllib3/connection.py", line 360, in connect
    ssl_context=context,
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 370, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/urllib3/contrib/pyopenssl.py", line 491, in wrap_socket
    raise ssl.SSLError("bad handshake: %r" % e)
ssl.SSLError: ("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/bhupesh/Documents/defe/bin/wplay", line 5, in <module>
    from wplay.__main__ import main
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/wplay/__main__.py", line 114, in <module>
    asyncio.get_event_loop().run_until_complete(main())
  File "/usr/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete
    return future.result()
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/wplay/__main__.py", line 108, in main
    await match_args(args)
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/wplay/__main__.py", line 85, in match_args
    await wchat.chat(args.name)
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/wplay/wchat.py", line 7, in chat
    page, _ = await pypConfig.configure_browser_and_load_whatsapp()
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/wplay/utils/pyppeteerConfig.py", line 44, in configure_browser_and_load_whatsapp
    browser = await __config_browser(username, save_session)
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/wplay/utils/pyppeteerConfig.py", line 85, in __config_browser
    return await launch(headless=False, autoClose=False)
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/pyppeteer/launcher.py", line 311, in launch
    return await Launcher(options, **kwargs).launch()
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/pyppeteer/launcher.py", line 125, in __init__
    download_chromium()
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/pyppeteer/chromium_downloader.py", line 136, in download_chromium
    extract_zip(download_zip(get_url()), DOWNLOADS_FOLDER / REVISION)
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/pyppeteer/chromium_downloader.py", line 78, in download_zip
    data = http.request('GET', url, preload_content=False)
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/urllib3/request.py", line 76, in request
    method, url, fields=fields, headers=headers, **urlopen_kw
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/urllib3/request.py", line 97, in request_encode_url
    return self.urlopen(method, url, **extra_kw)
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/urllib3/poolmanager.py", line 330, in urlopen
    response = conn.urlopen(method, u.request_uri, **kw)
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/urllib3/connectionpool.py", line 760, in urlopen
    **response_kw
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/urllib3/connectionpool.py", line 760, in urlopen
    **response_kw
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/urllib3/connectionpool.py", line 760, in urlopen
    **response_kw
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/urllib3/connectionpool.py", line 720, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/home/bhupesh/Documents/defe/lib/python3.6/site-packages/urllib3/util/retry.py", line 436, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='storage.googleapis.com', port=443): Max retries exceeded with url: /chromium-browser-snapshots/Linux_x64/575458/chrome-linux.zip (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),))
@rpotter12
Copy link
Member

@Bhupesh-V I don't know exactly what is happening but there might be any connection error or any installation error because at first it should download the chromium browser but at that time the error started.

I suggest you to uninstall it and install the whatsapp-play again.

@rpotter12
Copy link
Member

@xandao-dev
Copy link
Collaborator

@Bhupesh-V which urllib3 version you're using? I use urllib3==1.25.8.
If isn't the same version try: pip3 install urllib3==1.25.8

@xandao-dev
Copy link
Collaborator

Maybe is related to the firewall in the port 443 too.

@Bhupesh-V
Copy link
Author

I suggest you to uninstall it and install the whatsapp-play again.

Well this worked
But apparently my system is not supported for its execution (No build for 32bit Architecture)

@rpotter12 rpotter12 added question Further information is requested answered labels Feb 24, 2020
@xandao-dev
Copy link
Collaborator

32 bit Architecture not supported. Maybe in the future we add selenium again, as an alternative .

@ghost
Copy link

ghost commented Apr 2, 2021

I change the version of urllib from 1.26.4 to 1.25.8, and it works.

@alirezadigi
Copy link

Hi
I have another issue on windows and raspberry pi
but I think it's pyppeteer problem.

[W:pyppeteer.chromium_downloader] start chromium download.
Download may take a few minutes.
100%|█████████████████████████████████████| 193/193 [00:00<00:00, 379334.90it/s]
[W:pyppeteer.chromium_downloader]
chromium download done.
Process Killed!
Traceback (most recent call last):
  File "/home/pi/.local/bin/wplay", line 6, in <module>
    from wplay.__main__ import main
  File "/home/pi/.local/lib/python3.7/site-packages/wplay/__main__.py", line 216, in <module>
    asyncio.get_event_loop().run_until_complete(main())
  File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
    return future.result()
  File "/home/pi/.local/lib/python3.7/site-packages/wplay/__main__.py", line 209, in main
    await get_and_match_args(parser)
  File "/home/pi/.local/lib/python3.7/site-packages/wplay/__main__.py", line 192, in get_and_match_args
    await get_media.get_profile_photos()
  File "/home/pi/.local/lib/python3.7/site-packages/wplay/get_media.py", line 20, in get_profile_photos
    page, _ = await browser_config.configure_browser_and_load_whatsapp()
  File "/home/pi/.local/lib/python3.7/site-packages/wplay/utils/browser_config.py", line 59, in configure_browser_and_load_whatsapp
    browser = await __config_browser(username, save_session)
  File "/home/pi/.local/lib/python3.7/site-packages/wplay/utils/browser_config.py", line 129, in __config_browser
    return await launch(headless=False, autoClose=False)
  File "/home/pi/.local/lib/python3.7/site-packages/pyppeteer/launcher.py", line 306, in launch
    return await Launcher(options, **kwargs).launch()
  File "/home/pi/.local/lib/python3.7/site-packages/pyppeteer/launcher.py", line 119, in __init__
    download_chromium()
  File "/home/pi/.local/lib/python3.7/site-packages/pyppeteer/chromium_downloader.py", line 146, in download_chromium
    extract_zip(download_zip(get_url()), DOWNLOADS_FOLDER / REVISION)
  File "/home/pi/.local/lib/python3.7/site-packages/pyppeteer/chromium_downloader.py", line 134, in extract_zip
    with ZipFile(data) as zf:
  File "/usr/lib/python3.7/zipfile.py", line 1222, in __init__
    self._RealGetContents()
  File "/usr/lib/python3.7/zipfile.py", line 1289, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

@0xpriyanshu
Copy link

I change the version of urllib from 1.26.4 to 1.25.8, and it works.

it still doesnt work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants