-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
client reset observe failed #154
Comments
I have almost the same problem. When I am using "res.reset()" at server-end.
It will cause client-end throwing "Empty messages must be empty error". Using wireshark to capture and I find server-end sending NON msg with '5.00 Internal Server Error' and body 'Empty messages must be empty' after send RST msg. NON msg has the same token with the NON request which client-end sent. I think this cause client-end throws error. I don't know why coap source code deal with reset on this way, maybe it's a bug? (reference to 'fastseries' lib) |
I found this is a bug because the RST msg has token. RFC7252-4.1 specific as follows: The Error "Empty messages must be empty" is thrown by 'coap-packet' lib 'index.js': And I check coap source code 'outgoing_message.js' and I find this: packet.token is NOT set to null! I think this is the essential problem. After I add "packet.token = ''" at the following, the client-end doesn't thow the Error. |
@Pluuuto, I agree that this is a bug. Moreover, there seems to be more (un?)related problems that come out to the surface. There's also some difference depending if the client is on the same host as the server or not. Removing the token is a good first step, which fixes the stated problem, however as a side effect a program with a single coap request does not terminate (which may be another bug). If you want, you can submit a PR with the fix and tests that cover the scenario. If not I'll do it once I get to take a better look at all of the problems that this bug revealed. |
Please check if current master branch has this issue anymore. |
I seem to be having the same problem. Is there a branch where this bug was fixed? |
The issue exists in 0.23.1. I get the same error.... |
@robertbbb @lucarv Could you give a bit more context under which conditions the error occured? (Sorry for the late follow-up question.) |
This issue continue in the release 1.3.0. Any possibility of a solution or how to send an RST to the server in the case of observing. Thanks. |
in client side, i want to send RST packet to server.
when i call req.reset(), it will throw Empty messages must be empty error
The text was updated successfully, but these errors were encountered: