-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[wasm][debugger] Fix "command is not pending" #72953
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
Conversation
|
Tagging subscribers to this area: @thaystg Issue DetailsSession id can be different if there is a redirect, but the message id is kept. I mean, even if the sessionID number is changed the sequential number that answers the message is the same, so we only need to compare the sequential number. I have no idea how to create a test case for it.
|
|
are the message-ids really unique across all sessions? |
It looks like yes. |
|
is that true for our ids? |
|
That is exactly the case that we are getting the message error described in the issue, we are sending messageID=259, and the session does not exist anymore, so we receive an answer with messageID=259 and another sessionID, that is why we weren't find it. Where we increment:
Where we use it:
This is only reset on firefox when we connect to the page, on chrome it's never reset. |
What do you mean by a "redirect" here? |
When it was observed? This link to issue does not work, could you check it? |
It looks like you don't have rights to see it, I already asked for, let's wait. |
Something like go to a login page and login. |
|
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsSession id can be different if there is a redirect, but the message id is kept. I mean, even if the sessionID number is changed the sequential number that answers the message is the same, so we only need to compare the sequential number. I have no idea how to create a test case for it. Fix https://github.com/aspnet/AspNetCore-ManualTests/issues/1456
|
|
This still doesn't seem correct to me (not to mention we'd need to change the hash computation) based on the error in the linked issue my guess is that we're comparing one message with a string.Empty sessionId to another with a null one. Can you changing the MessageId constructor to do: |
lewing
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see how this would fix the dictionary lookup in the general case. We need to make sure the hash code and Equals use the same logic
This is exactly what we are comparing: So to be clear, we are sending command 276 from sessionID FD9F77A4C958D595651B0F5D39AC75AC and receiving the answer from SessionId = ""; So I agree we need to change the hash, but I don't think that considering an empty string as NULL will fix it. |
|
iirc a missing sessionId means it applies to all sessions so it makes more sense than a different sessionId. The updates look fine although it might make sense to warn if the sessions have a value and are different because I don't think that should ever happen. What command is the response to? |
|

Session id can be different if there is a redirect, but the message id is kept.
I mean, even if the sessionID number is changed the sequential number that answers the message is the same, so we only need to compare the sequential number.
For example:
We send -> messageID = 1 to sessionID = aaa
We receive -> messageID = 1 sessionID = bbb because there was a redirect
So it was not finding in the dictionary because we were expecting SessionID and MessageId to be the same.
other.sessionId == sessionId && other.id == id;I have no idea how to create a test case for it.
Fix https://github.com/aspnet/AspNetCore-ManualTests/issues/1456