-
-
Notifications
You must be signed in to change notification settings - Fork 170
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
Cannot connect to Twitch #386
Comments
You need to enter the proxy address on the settings page, usually in the format http://127.0.0.1:port number |
I have same problem (Win10 pro 64bit). |
I found the solution to the problem, it was in SSL certificates, for some reason aiohttp could not find and use them, in the file twitch.py on line 662 change: this: to this: |
brother where is the twitch.py |
Do not use compiled version, download github source, and run it from python manual. |
If you know how to install can you write dc |
Do you know where the source codes are? |
Big green button on the home page: |
@CDeLeon94 There is no exe file in the dist folder |
It works, thanks. |
The SSL verification error is masked by the request retry logic. To see it, one would need to disable the exception handling on requests, here: Line 1505 in e5f4ea1
Changing this to an unrelated exception, like |
12:49:30: Fatal error encountered: |
https://www.howtouselinux.com/post/exploring-unable-to-get-local-issuer-certificate In other words, this is an issue with your machine, mostly. Here's some more resources on this topic: aio-libs/aiohttp#7287 Based on this information, it seems like something went wrong when you were installing Python. Reinstalling it may solve the problem. Alternatively, one can perform a disk error check / system integrity verification, via |
I have the same issue, same working conditions (amazon ec2 free tier, Windows Server 2022) |
Just got the same error on Windows 11.. yesterday it was working fine. Today, I get the following 11:33:56: Cannot connect to Twitch, retrying in 30 seconds... Even tried a fresh copy of 16.dev.6e0b461 |
I'm really not sure what else to say here. This is an issue related to your operating system, not the miner. Details of the SSL error and what to do with it can be found here: #386 (comment) I'll probably make it so that this particular error is allowed to "bubble out", while other ones will cause the usual retry loop. That'll make more sense in the long run. |
Thanks for the reply and for your continued work on the project. |
i'm facing the same issue, I tried this on Windows 11 (Desktop) and Raspberry Pi 5 (Pi OS) |
FYI By using the latest version of master it works now on my VM without doing the change mentioned in #386 (comment) |
Yes, I pushed out that commit to discourage disabling SSL as a "solution", per discussion under #415. Disabling SSL is not a safe solution by any means. I'd rather have an additional dependency that disable all web security measures. |
I just started getting this error, out of nowhere. Twitch on the browser works just fine. After applying the suggestion from #386 (comment) to figure out what the exception is, I always get this one (even after multiple app restarts and token renewals): Click me to expand17:46:55: Logging level: CALL
17:46:56: INFO: Checking login
17:46:56: INFO: Restoring session from cookie
17:46:57: INFO: Login successful, user ID: XXXXXX
17:46:57: INFO: Websocket[0] connecting...
17:46:58: INFO: Websocket[0] connected.
17:47:05: Fatal error encountered:
17:47:05:
17:47:05: Traceback (most recent call last):
17:47:05: File "/home/gui/dev/TwitchDropsMiner/env/lib/python3.11/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection
17:47:05: return await self._loop.create_connection(*args, **kwargs)
17:47:05: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17:47:05: File "/usr/lib/python3.11/asyncio/base_events.py", line 1069, in create_connection
17:47:05: sock = await self._connect_sock(
17:47:05: ^^^^^^^^^^^^^^^^^^^^^^^^^
17:47:05: File "/usr/lib/python3.11/asyncio/base_events.py", line 973, in _connect_sock
17:47:05: await self.sock_connect(sock, address)
17:47:05: File "/usr/lib/python3.11/asyncio/selector_events.py", line 634, in sock_connect
17:47:05: return await fut
17:47:05: ^^^^^^^^^
17:47:05: asyncio.exceptions.CancelledError
17:47:05:
17:47:05: The above exception was the direct cause of the following exception:
17:47:05:
17:47:05: Traceback (most recent call last):
17:47:05: File "/home/gui/dev/TwitchDropsMiner/env/lib/python3.11/site-packages/aiohttp/client.py", line 574, in _request
17:47:05: conn = await self._connector.connect(
17:47:05: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17:47:05: File "/home/gui/dev/TwitchDropsMiner/env/lib/python3.11/site-packages/aiohttp/connector.py", line 544, in connect
17:47:05: proto = await self._create_connection(req, traces, timeout)
17:47:05: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17:47:05: File "/home/gui/dev/TwitchDropsMiner/env/lib/python3.11/site-packages/aiohttp/connector.py", line 911, in _create_connection
17:47:05: _, proto = await self._create_direct_connection(req, traces, timeout)
17:47:05: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17:47:05: File "/home/gui/dev/TwitchDropsMiner/env/lib/python3.11/site-packages/aiohttp/connector.py", line 1204, in _create_direct_connection
17:47:05: transp, proto = await self._wrap_create_connection(
17:47:05: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17:47:05: File "/home/gui/dev/TwitchDropsMiner/env/lib/python3.11/site-packages/aiohttp/connector.py", line 989, in _wrap_create_connection
17:47:05: async with ceil_timeout(
17:47:05: File "/usr/lib/python3.11/asyncio/timeouts.py", line 111, in __aexit__
17:47:05: raise TimeoutError from exc_val
17:47:05: TimeoutError
17:47:05:
17:47:05: The above exception was the direct cause of the following exception:
17:47:05:
17:47:05: Traceback (most recent call last):
17:47:05: File "/home/gui/dev/TwitchDropsMiner/main.py", line 158, in main
17:47:05: await client.run()
17:47:05: File "/home/gui/dev/TwitchDropsMiner/twitch.py", line 765, in run
17:47:05: await self._run()
17:47:05: File "/home/gui/dev/TwitchDropsMiner/twitch.py", line 810, in _run
17:47:05: await self.fetch_inventory()
17:47:05: File "/home/gui/dev/TwitchDropsMiner/twitch.py", line 1669, in fetch_inventory
17:47:05: await self.gui.inv.add_campaign(campaign)
17:47:05: File "/home/gui/dev/TwitchDropsMiner/gui.py", line 1347, in add_campaign
17:47:05: campaign_image = await self._cache.get(campaign.image_url, size=(108, 144))
17:47:05: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17:47:05: File "/home/gui/dev/TwitchDropsMiner/cache.py", line 106, in get
17:47:05: async with self._twitch.request("GET", url) as response:
17:47:05: File "/usr/lib/python3.11/contextlib.py", line 204, in __aenter__
17:47:05: return await anext(self.gen)
17:47:05: ^^^^^^^^^^^^^^^^^^^^^
17:47:05: File "/home/gui/dev/TwitchDropsMiner/twitch.py", line 1495, in request
17:47:05: response = await self.gui.coro_unless_closed(
17:47:05: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17:47:05: File "/home/gui/dev/TwitchDropsMiner/gui.py", line 2050, in coro_unless_closed
17:47:05: return await next(iter(done))
17:47:05: ^^^^^^^^^^^^^^^^^^^^^^
17:47:05: File "/home/gui/dev/TwitchDropsMiner/env/lib/python3.11/site-packages/aiohttp/client.py", line 1174, in throw
17:47:05: return self._coro.throw(*args, **kwargs)
17:47:05: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17:47:05: File "/home/gui/dev/TwitchDropsMiner/env/lib/python3.11/site-packages/aiohttp/client.py", line 578, in _request
17:47:05: raise ServerTimeoutError(
17:47:05: aiohttp.client_exceptions.ServerTimeoutError: Connection timeout to host https://static-cdn.jtvnw.net/ttv-boxart/515025.jpg
17:47:05:
17:47:05: Exiting...
17:47:05: INFO: Websocket[0] stopped.
17:47:05:
17:47:05: Application Terminated.
17:47:05: Close the window to exit the application. But here's the thing, that URL opens instantly on my web browser (and even with Click me to expand
DNS resolution of Click me to expand
I'm out of ideas to debug this further. EDIT: Great, I started the app in debug mode ( |
That looks like just a server timeout. An actual one. The miner was working as intended 🙂 It should succeed once the server responds again.
Heh 😄 Yeah, requests and connection stability is something each application just needs to take care of. There's many things that can go wrong, the server goes down, the internet connection is down or simply struggling at the time, poor wi-fi signal, the list is quite long. I wonder if there should be some more variety to the error messages, as it's only really just this one, and one that says "Twitch is down", but that only displays on 5XX responses from the server. |
I reliably get the "cannot connect" message after a while, now, too. Beginning to wonder if there's some intentional behavior on the server's part to pooch TDM. I'll see if I'm getting any interesting error messages when I have time to troubleshoot. |
Since there was no reports on this for a while now, I'm assuming this issue has resolved itself, and can now be closed. |
I still get this issue, but I've just been fixing it by closing and reopening the client. |
Tried that multiple times, been tryin to fix this for few hours, not sure whats been going wrong. |
@hakutzu you are running a forked version (specifically Windows200000 fork) going by your screenshot, I'd suggest you bring the issue up over there to them instead otherwise grab the dev build from the release section of this repo (or build from this repo source instead of a forks source) and try it instead and see if you get the same problem. |
Yeah, I recommend making sure one is reporting an issue in the appropriate place. I can't exactly help with running a fork, you'll need to report it under the fork's project, not here. Also, this is a kind reminder that closed issues with no activity for a while should usually remain closed. If you're experiencing a similar issue as described in a past issue, please just create a new issue, and attach a mention/link to the past issue you think is relevant. |
I use vds amazon ec2 free tier, (Windows Server 2022) with the help of browser authorization opens and tweetch site works, but with the help of the program writes that can not connect, what is the problem and how can it be fixed?
The text was updated successfully, but these errors were encountered: