question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Client ID can be null

See original GitHub issue

I think there is an issue handling null client IDs. From what I know (and I may be wrong here) client IDs may be null when requesting a subscription.

And currently this works fine in Milo with the exception of handling the server result after the subscriptions succeeded:

OpcUaSubscription.java:130

if (item.getStatusCode().isGood()) {
  itemsByClientHandle.put(item.getClientHandle(), item);
  itemsByServerHandle.put(item.getMonitoredItemId(), item);
}

I think this could be fixed with ignoring null client IDs altogether in this case.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
kevinherroncommented, Sep 8, 2017

In the next version of my code generator I’ll try to put @Nonnull annotations on any of the parameters I can determine shouldn’t ever be null.

0reactions
ctroncommented, Sep 8, 2017

There is no scenario where creating a monitored item and providing a null clientHandle in the MonitoredItemCreateRequest is the correct behavior.

After digging a bit into the issue and into the OPC UA code at https://github.com/OPCFoundation/UA-.NET/blob/master/Stack/Core/Stack/Generated/Opc.Ua.Client.cs#L2807 I think you are right, the clientHandle should never be null.

But that isn’t obvious from the API of Milo. So I would suggest to either directly check for null in the constructor or at least add some JavaDoc for that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

client_id is always null in ValidateClientAuthentication
When I try to access ClientId for validating client id, it is always null. if (context.ClientId != null) { //Set the client who...
Read more >
Client ID returns null - Free Support Forum - aspose.com
I need to fetch the worksheet's client id from the server. Here are the following code. Before pasting the code I would like...
Read more >
"JMSCC0101: The client ID cannot be null. Specify a ... - ERROR
To resolve the issue, ensure that Client ID is set while creating JMS Topic Connection Factory in the IBM MQ server. Additional Information....
Read more >
Client id in tokenrequest object is null when ... - GitHub
when I debug to the step httpRequest.send() in NimbusAuthorizationCodeTokenResponseClient class, I have found the client id is null after ...
Read more >
ClientID null issue on Tomcat - Server Fault
Cause: JMSCC0101: The client ID cannot be null. 373399 [WARN] DefaultMessageListenerContainer: Setup of JMS message listener invoker failed for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found