-
Notifications
You must be signed in to change notification settings - Fork 269
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
StatusBadEncodingLimitsExceeded on single read request #678
Comments
Which gopcua version are you using? Which data structure did you use for the Regarding |
I was using version v0.3.5
What do you mean? In version v0.3.5 the |
I may have confused something here. So you're saying that you get that error just by reading node Can you try this with the latest version cd ./examples/read
go run read.go -endpoint opc.tcp://<host:port> -node 'i=2269' -debug |
That is correct and I upgraded to
|
OK, could you capture a tcpdump and attach this here? If you don't want to attach it here you can send it to me via Keybase. |
I'm having trouble accessing my Keybase account right now. I might be able to get to it later tonight. |
|
Thanks. Can you attach the file? I need to look at the content of the response to understand where it breaks. |
This zip contains the tcpdump pcap file: |
This patch updates the variant decoder to correctly handle Variant values with nil arrays. They have a length of -1. The decoder returned an error of StatusBadEncodingLimitsExceeded which is wrong. Closes #678
Fix the Variant encoder and decoder to handle nil slices correctly by setting the length to -1. Closes #678
Issue #678: Fix Variant to handle nil slices
After connecting to an OPC UA Server by "Softing dataFEED" I did a simple ReadRequest which resulted in a StatusBadEncodingLimitsExceeded.
The request was done like this:
Debugging showed that the error was created at here:
opcua/ua/variant.go
Lines 117 to 146 in 807c2da
The []byte that was decoded looked like this:
which resulted in an
m.arrayLength
of-1
Looking at the Node-ID in UaExpert
I'm unsure how I could work around this error or fix this issue. Another problem is that the
client.State()
becomesDisconnected
andReconnecting
after this issue without returning back toConnected
.The text was updated successfully, but these errors were encountered: