ITADN

Failure to get browser version crashes the program

#319OpenRe-hd 创建于 2025-06-20
bugstale
R
Re-hdcommented
### Before submitting a bug report... - [x] This bug wasn't already reported. (I have checked every bug report on GitHub) - [x] I've ran the program with the -r argument. ### Branch master ### Commit none ### Describe the bug Access to googlechromelabs.github.io with port=443 often fails due to connection reset, which prevents the program from obtaining a version number and causes it to crash. I think this problem can be avoided by increasing the tries of page refreshes.Also add the option for users to manually enter browser version and other data. ### Import the logs 2025-06-20 15:11:47,488 [INFO] ********************······@outlook.com******************** 2025-06-20 15:11:47,488 [DEBUG] in __init__ 2025-06-20 15:17:48,905 [ERROR] urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None)) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\Users\11412\MS-Rewards-Farmer-2.0.0\venv\Lib\site-packages\requests\adapters.py", line 667, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "C:\Users\11412\MS-Rewards-Farmer-2.0.0\venv\Lib\site-packages\urllib3\connectionpool.py", line 871, in urlopen return self.urlopen( ^^^^^^^^^^^^^ File "C:\Users\11412\MS-Rewards-Farmer-2.0.0\venv\Lib\site-packages\urllib3\connectionpool.py", line 871, in urlopen return self.urlopen( ^^^^^^^^^^^^^ File "C:\Users\11412\MS-Rewards-Farmer-2.0.0\venv\Lib\site-packages\urllib3\connectionpool.py", line 871, in urlopen return self.urlopen( ^^^^^^^^^^^^^ [Previous line repeated 1 more time] File "C:\Users\11412\MS-Rewards-Farmer-2.0.0\venv\Lib\site-packages\urllib3\connectionpool.py", line 841, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "C:\Users\11412\MS-Rewards-Farmer-2.0.0\venv\Lib\site-packages\urllib3\util\retry.py", line 519, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='googlechromelabs.github.io', port=443): Max retries exceeded with url: /chrome-for-testing/last-known-good-versions.json (Caused by ProtocolError('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\11412\MS-Rewards-Farmer-2.0.0\main.py", line 33, in main earned_points = executeBot(currentAccount) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\11412\MS-Rewards-Farmer-2.0.0\main.py", line 151, in executeBot with Browser(mobile=False, account=currentAccount) as desktopBrowser: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\11412\MS-Rewards-Farmer-2.0.0\src\browser.py", line 49, in __init__ ) = GenerateUserAgent().userAgent(self.browserConfig, mobile) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\11412\MS-Rewards-Farmer-2.0.0\src\userAgentGenerator.py", line 52, in userAgent app = self.getAppComponents(mobile) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\11412\MS-Rewards-Farmer-2.0.0\src\userAgentGenerator.py", line 123, in getAppComponents chromeVersion = self.getChromeVersion() ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\11412\MS-Rewards-Farmer-2.0.0\src\userAgentGenerator.py", line 194, in getChromeVersion response = self.getWebdriverPage( ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\11412\MS-Rewards-Farmer-2.0.0\src\userAgentGenerator.py", line 202, in getWebdriverPage response = makeRequestsSession().get(url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\11412\MS-Rewards-Farmer-2.0.0\venv\Lib\site-packages\requests\sessions.py", line 602, in get return self.request("GET", url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\11412\MS-Rewards-Farmer-2.0.0\venv\Lib\site-packages\requests\sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\11412\MS-Rewards-Farmer-2.0.0\venv\Lib\site-packages\requests\sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\11412\MS-Rewards-Farmer-2.0.0\venv\Lib\site-packages\requests\adapters.py", line 700, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='googlechromelabs.github.io', port=443): Max retries exceeded with url: /chrome-for-testing/last-known-good-versions.json (Caused by ProtocolError('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))) 2025-06-20 15:17:49,664 [INFO] [POINTS] Data saved for the next day. ### Screenshots no pages ### Value of dashboard variable https://gist.github.com/Re-hd/a64603d7e8b9ef14e3ec694d47d639f9
1 条评论