M2MqttUnity icon indicating copy to clipboard operation
M2MqttUnity copied to clipboard

Receive: Test message is not displayed and gives the following error

Open madhawap opened this issue 5 years ago • 1 comments

Environment

Windows 10 Unity version 2017.4.3f1 Downloaded the repository on 10/05/2019 Visual Studio Version 2017 HoloLens 1

Steps to reproduce

  1. Build the Unity scene M2MqttUnity_TestXR without any modifications to the code or anything.
  2. Once the build is successful, open the M2MqttUnity.sln from Visual studio 2017
  3. Set settings to Release, x86 and Device
  4. Start Debugging

Expected behavior

To see the following output,

Test message published Receive: Test message

Current behavior

Following error

Connected to iot.eclipse.org:1883...

(Filename: C:\buildslave\unity\build\artifacts/generated/Metro/runtime/DebugBindings.gen.cpp Line: 51)

Test message published

(Filename: C:\buildslave\unity\build\artifacts/generated/Metro/runtime/DebugBindings.gen.cpp Line: 51)

'M2MqttUnity.exe' (CoreCLR: CoreCLR_UWP_Domain): Loaded 'C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\M2MqttUnityVS.Release_x86.per287\System.Diagnostics.StackTrace.dll'. Cannot find or open the PDB file. Exception thrown: 'System.InvalidOperationException' in Assembly-CSharp.dll Exception thrown: 'uPLibrary.Networking.M2Mqtt.Exceptions.MqttCommunicationException' in Assembly-CSharp.dll Exception thrown: 'System.AggregateException' in System.Private.CoreLib.ni.dll The thread 0x13b8 has exited with code 0 (0x0). The thread 0xfdc has exited with code 0 (0x0). The thread 0x700 has exited with code 0 (0x0). The thread 0x179c has exited with code 0 (0x0). Exception thrown: 'uPLibrary.Networking.M2Mqtt.Exceptions.MqttCommunicationException' in Assembly-CSharp.dll Failed to connect to iot.eclipse.org:1883: uPLibrary.Networking.M2Mqtt.Exceptions.MqttCommunicationException: Exception of type 'uPLibrary.Networking.M2Mqtt.Exceptions.MqttCommunicationException' was thrown. at uPLibrary.Networking.M2Mqtt.MqttClient.SendReceive(Byte[] msgBytes, Int32 timeout) at uPLibrary.Networking.M2Mqtt.MqttClient.SendReceive(MqttMsgBase msg, Int32 timeout) at uPLibrary.Networking.M2Mqtt.MqttClient.Connect(String clientId, String username, String password, Boolean willRetain, Byte willQosLevel, Boolean willFlag, String willTopic, String willMessage, Boolean cleanSession, UInt16 keepAlivePeriod) at M2MqttUnity.M2MqttUnityClient.<DoConnect>d__38.MoveNext()

(Filename: C:\buildslave\unity\build\artifacts/generated/Metro/runtime/DebugBindings.gen.cpp Line: 51)

madhawap avatar May 13 '19 02:05 madhawap

I always used Debug|Start without debugging (CTRL+F5) to start applications on HoloLens, as you can see here in "Deploying an app over USB - HoloLens (1st gen)" in the screenshots (even if the text says "Debug > Start debugging" in the screenshot you see "Start without debugging"). As far as I knew it was the only way to make it work (the other way never worked for me).

Sorry if I can't help you otherwise, but I stopped developing with HoloLens since some months ago (and I have no more access to an HoloLens for debugging).

gpvigano avatar May 13 '19 12:05 gpvigano