Skip to content
This repository has been archived by the owner on May 8, 2020. It is now read-only.

target closed when a dialog ( for example a geetest captcha) shows #252

Open
icedrunkard opened this issue Sep 12, 2019 · 1 comment
Open

Comments

@icedrunkard
Copy link

websockets == 6.0
[E:pyppeteer.connection] connection unexpectedly closed
Task exception was never retrieved
future: <Task finished coro=<Connection._async_send() done, defined at C:\Python37\lib\site-packages\pyppeteer\connection.py:69> exception=InvalidStateError('invalid state')>
Traceback (most recent call last):
File "C:\Python37\lib\site-packages\websockets\protocol.py", line 528, in transfer_data
msg = yield from self.read_message()
File "C:\Python37\lib\site-packages\websockets\protocol.py", line 580, in read_message
frame = yield from self.read_data_frame(max_size=self.max_size)
File "C:\Python37\lib\site-packages\websockets\protocol.py", line 645, in read_data_frame
frame = yield from self.read_frame(max_size)
File "C:\Python37\lib\site-packages\websockets\protocol.py", line 710, in read_frame
extensions=self.extensions,
File "C:\Python37\lib\site-packages\websockets\framing.py", line 100, in read
data = yield from reader(2)
File "C:\Python37\lib\asyncio\streams.py", line 677, in readexactly
raise IncompleteReadError(incomplete, n)
asyncio.streams.IncompleteReadError: 0 bytes read on a total of 2 expected bytes

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Python37\lib\site-packages\pyppeteer\connection.py", line 73, in _async_send
await self.connection.send(msg)
File "C:\Python37\lib\site-packages\websockets\protocol.py", line 361, in send
yield from self.ensure_open()
File "C:\Python37\lib\site-packages\websockets\protocol.py", line 501, in ensure_open
self.close_code, self.close_reason) from self.transfer_data_exc
websockets.exceptions.ConnectionClosed: WebSocket connection is closed: code = 1006 (connection closed abnormally [internal]), no reason

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Python37\lib\site-packages\pyppeteer\connection.py", line 79, in _async_send
await self.dispose()
File "C:\Python37\lib\site-packages\pyppeteer\connection.py", line 170, in dispose
await self._on_close()
File "C:\Python37\lib\site-packages\pyppeteer\connection.py", line 153, in _on_close
f'Protocol error {cb.method}: Target closed.', # type: ignore
asyncio.base_futures.InvalidStateError: invalid state

@icedrunkard icedrunkard changed the title target closed when a dialog ( for example a captcha) shows target closed when a dialog ( for example a geetest captcha) shows and Sep 12, 2019
@icedrunkard icedrunkard changed the title target closed when a dialog ( for example a geetest captcha) shows and target closed when a dialog ( for example a geetest captcha) shows Sep 12, 2019
PMK9 added a commit to Penny-AI/pyppeteer that referenced this issue Oct 18, 2019
It's to stop getting this error for recaptcha for isagenix login: miyakogi#252
PMK9 added a commit to Penny-AI/pyppeteer that referenced this issue Oct 19, 2019
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

1 participant