-
-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
NIOCore/NIOLoopBound.swift:120: Precondition failed in 2.14.0 #140
Comments
I have the same bug. Is there a fix in the pipeline or a workaround ? |
I am getting into almost the same trouble. Only the backtrace points to a different file and line in NIOCore. It happens on localhost during development as well as on Heroku where I host the application. I have also found out that ti started happening from version 2.13.0 so I am for now staying with 2.12.1 specified in package manifest. |
Same here using websocket-kit as a client. |
Facing the same bug. Any update on a fix/workaround? |
i had the same issue when i was accidentally mixing escaping closure syntax and async/await in my websocket routes. fixing that fixed the problem for me |
You should be able to wrap your |
Hey, thanks a ton! Your tip about not mixing up escaping closures with async/await was spot-on. I wrapped my async/await stuff in a Task { ... }, and this fixed the issue. |
Describe the bug
I'm seeing a precondition failed when setting onText or onBinary on an upgraded websocket.
To Reproduce
vapor new testing; cd testing; open Package.swift;
add the following route to routes.swift
Build and run. Then connect to ws://localhost:8080/test with a websocket client.
When the onText handler is added, the server will crash with precondition failed.
Expected behavior
A properly added onText or onBinary handler that does not fail the box's precondition and crash.
Environment
MacOS 13.4, m1 Mac mini 2020
Xcode 14.3.1
Vapor: 4.77.0
toolbox: 18.7.1
websocket-kit: 2.14.0
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: