You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2024-02-1120:53:41E/MahDebug: java.util.concurrent.CancellationException:ArrayChannel was cancelled
java.util.concurrent.CancellationException:ArrayChannel was cancelled
at kotlinx.coroutines.channels.AbstractChannel.cancel(AbstractChannel.kt:656)
at kotlinx.coroutines.channels.ReceiveChannel$DefaultImpls.cancel$default(Channel.kt:279)
at mirai-api-http-2.10.0.mirai2.jar[shared]//io.ktor.websocket.DefaultWebSocketSessionImpl$runOutgoingProcessor$1.invokeSuspend(DefaultWebSocketSession.kt:228)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoop.processUnconfinedEvent(EventLoop.common.kt:69)
at kotlinx.coroutines.DispatchedTaskKt.resumeUnconfined(DispatchedTask.kt:245)
at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:161)
at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:397)
at kotlinx.coroutines.CancellableContinuationImpl.completeResume(CancellableContinuationImpl.kt:513)
at kotlinx.coroutines.channels.AbstractChannel$ReceiveHasNext.resumeReceiveClosed(AbstractChannel.kt:958)
at kotlinx.coroutines.channels.AbstractSendChannel.helpClose(AbstractChannel.kt:342)
at kotlinx.coroutines.channels.AbstractSendChannel.close(AbstractChannel.kt:271)
at kotlinx.coroutines.channels.SendChannel$DefaultImpls.close$default(Channel.kt:93)
at mirai-api-http-2.10.0.mirai2.jar[shared]//io.ktor.websocket.RawWebSocketJvm$1.invokeSuspend(RawWebSocketJvm.kt:78)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
constsecWebSocketExtensions=res.headers['sec-websocket-extensions'];if(secWebSocketExtensions!==undefined){if(!perMessageDeflate){constmessage='Server sent a Sec-WebSocket-Extensions header but no extension '+'was requested';abortHandshake(websocket,socket,message);return;}letextensions;try{extensions=parse(secWebSocketExtensions);}catch(err){constmessage='Invalid Sec-WebSocket-Extensions header';abortHandshake(websocket,socket,message);return;}constextensionNames=Object.keys(extensions);if(extensionNames.length!==1||extensionNames[0]!==PerMessageDeflate.extensionName){constmessage='Server indicated an extension that was not requested';abortHandshake(websocket,socket,message);return;}try{perMessageDeflate.accept(extensions[PerMessageDeflate.extensionName]);}catch(err){constmessage='Invalid Sec-WebSocket-Extensions header';abortHandshake(websocket,socket,message);return;}websocket._extensions[PerMessageDeflate.extensionName]=perMessageDeflate;}
[2024-03-08 11:19:50.505] base.py (43) - [ERROR] :
Traceback (most recent call last):
File "/root/qchatgpt/lib/python3.11/site-packages/websockets/legacy/client.py", line 654, in __await_impl__
await protocol.handshake(
File "/root/qchatgpt/lib/python3.11/site-packages/websockets/legacy/client.py", line 325, in handshake
raise InvalidStatusCode(status_code, response_headers)
websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 404
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/qchatgpt/lib/python3.11/site-packages/websockets/legacy/client.py", line 647, in __await_impl_timeout__
return await self.__await_impl__()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/qchatgpt/lib/python3.11/site-packages/websockets/legacy/client.py", line 668, in __await_impl__
await protocol.wait_closed()
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/apps/qchatgpt/main.py", line 287, in run_bot_wrapper
qqbot.adapter.run_sync()
File "/opt/apps/qchatgpt/pkg/qqbot/sources/yirimirai.py", line 120, in run_sync
loop.run_until_complete(MiraiRunner(self.bot)._run())
File "/root/.pyenv/versions/3.11.7/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
returnfuture.result()
^^^^^^^^^^^^^^^
File "/root/qchatgpt/lib/python3.11/site-packages/mirai/bot.py", line 240, in _run
await self.startup()
File "/root/qchatgpt/lib/python3.11/site-packages/mirai/bot.py", line 228, in startup
await asyncio.gather(*coros)
File "/root/qchatgpt/lib/python3.11/site-packages/mirai/bot.py", line 137, in startup
await self._adapter.login(self.qq)
File "/root/qchatgpt/lib/python3.11/site-packages/mirai/adapters/base.py", line 35, in wrapped
return await func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/qchatgpt/lib/python3.11/site-packages/mirai/adapters/websocket.py", line 187, in login
self.connection = await connect(self.host_name, extra_headers=headers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/qchatgpt/lib/python3.11/site-packages/websockets/legacy/client.py", line 646, in __await_impl_timeout__
async with asyncio_timeout(self.open_timeout):
File "/root/.pyenv/versions/3.11.7/lib/python3.11/asyncio/timeouts.py", line 115, in __aexit__
raise TimeoutError from exc_val
TimeoutError
[2024-03-08 11:19:50.509] main.py (324) - [ERROR] : 捕捉到未知异常:, 请前往 https://github.com/RockChinQ/QChatGPT/issues 查找或提issue
Exception in thread Thread-2 (run_bot_wrapper):
Traceback (most recent call last):
File "/root/qchatgpt/lib/python3.11/site-packages/websockets/legacy/client.py", line 654, in __await_impl__
await protocol.handshake(
File "/root/qchatgpt/lib/python3.11/site-packages/websockets/legacy/client.py", line 325, in handshake
raise InvalidStatusCode(status_code, response_headers)
websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 404
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/qchatgpt/lib/python3.11/site-packages/websockets/legacy/client.py", line 647, in __await_impl_timeout__
return await self.__await_impl__()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/qchatgpt/lib/python3.11/site-packages/websockets/legacy/client.py", line 668, in __await_impl__
await protocol.wait_closed()
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/root/.pyenv/versions/3.11.7/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
File "/root/.pyenv/versions/3.11.7/lib/python3.11/threading.py", line 982, in run
self._target(*self._args, **self._kwargs)
File "/opt/apps/qchatgpt/main.py", line 327, in run_bot_wrapper
raise e
File "/opt/apps/qchatgpt/main.py", line 287, in run_bot_wrapper
qqbot.adapter.run_sync()
File "/opt/apps/qchatgpt/pkg/qqbot/sources/yirimirai.py", line 120, in run_sync
loop.run_until_complete(MiraiRunner(self.bot)._run())
File "/root/.pyenv/versions/3.11.7/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
returnfuture.result()
^^^^^^^^^^^^^^^
File "/root/qchatgpt/lib/python3.11/site-packages/mirai/bot.py", line 240, in _run
await self.startup()
File "/root/qchatgpt/lib/python3.11/site-packages/mirai/bot.py", line 228, in startup
await asyncio.gather(*coros)
File "/root/qchatgpt/lib/python3.11/site-packages/mirai/bot.py", line 137, in startup
await self._adapter.login(self.qq)
File "/root/qchatgpt/lib/python3.11/site-packages/mirai/adapters/base.py", line 35, in wrapped
return await func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/qchatgpt/lib/python3.11/site-packages/mirai/adapters/websocket.py", line 187, in login
self.connection = await connect(self.host_name, extra_headers=headers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/qchatgpt/lib/python3.11/site-packages/websockets/legacy/client.py", line 646, in __await_impl_timeout__
async with asyncio_timeout(self.open_timeout):
File "/root/.pyenv/versions/3.11.7/lib/python3.11/asyncio/timeouts.py", line 115, in __aexit__
raise TimeoutError from exc_val
TimeoutError
使用的版本
问题描述
V2.9.1 无问题,V2.10.0 报错如下
使用 Node.js/mirai-ts/mirai-js 作为客户端
MAH 的报错
错误日志输出会伴随每一条监听的消息一同报出。
客户端 mirai-ts/mirai-js 的报错
ws 库中的相关代码
使用 YiriMirai 作为客户端
MAH 无错误输出
客户端 YiriMirai 的报错
相关 issues/commits
42e5281
YunYouJun/mirai-ts#60 (comment)
The text was updated successfully, but these errors were encountered: