Skip to content

ConnectionState.getNextInvocationId() Null pointer exception #11995

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

Closed
mashahbazi opened this issue Jul 9, 2019 · 8 comments
Closed

ConnectionState.getNextInvocationId() Null pointer exception #11995

mashahbazi opened this issue Jul 9, 2019 · 8 comments
Assignees
Labels
area-signalr Includes: SignalR clients and servers bug This issue describes a behavior which is not expected - a bug.

Comments

@mashahbazi
Copy link

After I figured the error #6898 and as said it's error fixed in 3.0.0-preview3. but now is start to send NullPointerException on invoke
Attempt to invoke virtual method 'java.lang.String com.microsoft.signalr.HubConnection$ConnectionState.getNextInvocationId()' on a null object reference
I check hubConnectionState to be HubConnectionState.CONNECTED before calling method invoke.

@analogrelay analogrelay added the area-signalr Includes: SignalR clients and servers label Jul 9, 2019
@analogrelay
Copy link
Contributor

analogrelay commented Jul 9, 2019

cc @mikaelm12

Smells like a race...

@mashahbazi can you post the specific version of com.microsoft.signalr:signalr you are using?

@mikaelm12 mikaelm12 self-assigned this Jul 9, 2019
@mikaelm12
Copy link
Contributor

mikaelm12 commented Jul 9, 2019

Yeah, please post the version of the Java client that you are using, If you're not on preview 6, then I'd first recommend updating to use that. Preview 7 is coming out next week and it also has some updates to the Java client but they shouldn't directly effect the scenario you mention.

Preview 6 version com.microsoft.signalr:signalr:3.0.0-preview6.19307.2 https://search.maven.org/artifact/com.microsoft.signalr/signalr/3.0.0-preview6.19307.2/jar
Note this when looking for the jars on search.maven.org this wont come up as the latest version since we changed our versioning to use dots rather than dashes.

@mikaelm12
Copy link
Contributor

And if you could also include the full stack trace that would be helpful as well!

@mashahbazi
Copy link
Author

yeap, I'm update and my version is 3.0.0-preview6.19307.2. And I said my stack trace for you it's very simple.when you invoke it get null. this is fabric crashlytics log.
com.microsoft.signalr.HubConnection.invoke + 586 (HubConnection.java:586)
before this trace is in my code.

@mikaelm12
Copy link
Contributor

After a quick investigation, it looks like we need some more locking. Moving this into preview 8

@mikaelm12 mikaelm12 added this to the 3.0.0-preview8 milestone Jul 10, 2019
@mikaelm12 mikaelm12 added bug This issue describes a behavior which is not expected - a bug. and removed investigate waiting labels Jul 10, 2019
@mikaelm12
Copy link
Contributor

Done here: #12078

@mikaelm12
Copy link
Contributor

Also related though - #12138

@mashahbazi
Copy link
Author

error occurred in preview 8 again

@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-signalr Includes: SignalR clients and servers bug This issue describes a behavior which is not expected - a bug.
Projects
None yet
Development

No branches or pull requests

3 participants