-
Notifications
You must be signed in to change notification settings - Fork 10.3k
ConnectionState.getNextInvocationId() Null pointer exception #14025
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
Comments
Can you share the stack trace of the null ref and the version of the java client you're using? |
I start signalR and invoke on start complete.
|
Where is the null ref in that stack trace? Are you able to provide the code you're running that reproduces the problem? |
I commented for you fabric error stack trace. |
I'm still not really sure how you're getting a null ref now. However, we do have plans to clean up a lot of the connection state logic to make issues like this less likely #12138 If you can provide any more details about how you're hitting the null ref, like code examples etc. then we can try to fix it faster, or provide workarounds until a fix is made. |
@mashahbazi can you also share the exact version of the Java client you are using so we can correlate the line number in the stack trace properly? As @BrennanConroy said, it looks like the connection is closing and you're running If you can provide a code sample that illustrates how you're calling invoke that would help, even if you can't share the full code itself. It would help if you can walk us through what triggers the code that calls invoke (is it responding to a connection event of some kind, or a UI action, etc.). |
@anurse
this I my code of invoke and where I get the null pointer exception. |
What calls this code though? The call stack is showing that you're inside the close event of the HubConnection, so I'm trying to trace that back.
Yes, this is certainly possible. We should be throwing a RuntimeException in that case (so you can catch it and identify the reason). Right now we are throwing a NullPointerException, which is wrong, but an exception should be thrown when you try to invoke on a closed connection. Your code should be prepared for an error in that case.
I'm actually asking for the version of the SignalR client, i.e. the version of the |
After I receive close event from my connection, I stop my connection so I create a new connection and call start on it. after my connection start I check signalR connection then I invoke server with code that send in previous comment.
yes, Any exception that make sense and not just a NullPointerException.
I use preview preview8.19405.7 |
Can you show the actual Java code that does this? Looking at the call stack you posted above (which has |
Closing this as we haven't heard from you and generally close issues with no response after some time. Please feel free to comment if you're able to get the information we're looking for and we can reopen the issue to investigate further! |
Uh oh!
There was an error while loading. Please reload this page.
I was created an issue for this bug #11995
So you added a milestone for it preview 8 and close issue. Now after preview 8 release I update my signalR core for java clients to that version the error is still accrue. Because it's a fatal exception my crush. So can you help me with this problem??
The text was updated successfully, but these errors were encountered: