0
Under review

OPCUA doesnt connnect on unity executable

mcouso 2 years ago in realvirtual.io Starter and Professional updated by Support 2 years ago 7

Hello,


i have been working on a project that uses OPCUA to get some data from a server and when I execut it on the editor of Unity everything works fine but when I try to make the executable for windows platforms, in the executable doesn't connect to the server. Do I need to use any special settings to do the build on Windows?


Please if someone could help me with this I would really apreciate it. Thank you

Answer

Answer
Under review

Hard to say. Are you able to get the Log data when you start it as a compiled version. There should be no special settings you need to consider. You could also use this Asset to get  the Console Log in the Unity Player Window:

https://assetstore.unity.com/packages/tools/gui/in-game-debug-console-68068

Answer
Under review

Hard to say. Are you able to get the Log data when you start it as a compiled version. There should be no special settings you need to consider. You could also use this Asset to get  the Console Log in the Unity Player Window:

https://assetstore.unity.com/packages/tools/gui/in-game-debug-console-68068

Now that i have updated the game4automation assets I get this error in both editor and the executable 

OPCUA Interface - Error in creating session [BadEncodingLimitsExceeded] - please check IP adress and port of your OPCUA server
UnityEngine.Debug:LogError (object)
game4automation.OPCUA_Interface:Connect () (at Assets/game4automation/private/Interfaces/OPCUA4Unity/OPCUA_Interface.cs:152)
game4automation.OPCUA_Interface:OnEnable () (at Assets/game4automation/private/Interfaces/OPCUA4Unity/OPCUA_Interface.cs:778)

The server is the same that worked before updating the asset so I don't think that the IP or the port are the real problems

(Btw I used the asset you mentioned)

We exchanged the underlying OPCUA framework after version 2020.13 so if you don't start with a new project we recommend to not upgrade. So the session is created in Editor mode and not in a Player? Are you able to share your OPCUA server for us for testing?

I have tried with both version previous the change and after the change.

with the ones previous the change the most I got is working in the editor but not in the executable.

With the version after the change I couldn´t make it work not in the editor or the executable. Trying with and without certificates.

This is what I used. Is a test server that a why are some unsused things

Thanks for your help


test servers

Hi, I am not able to run the test server. Even if the path in your bat file is changed to our path. I am sorry we are not Python experts. Can you send it in a way so it is for sure running on our computer without any special Python configuration need?

Best regards

Thomas

Hi Thomas,

I don't have any other way to share it. If I'm not wrong you just need to have python and anaconda installed. Then run the bat in the anaconda Powershell Prompt and should work.

Regars,

Mateo

Hi Mateo, did you find a solution. I was still not able to run your test server. Maybe you could also check https://github.com/nauful/LibUA/issues if you find anything related with your situation. If not we should maybe do a debug session via teams on your computer with your opcua server.