Skip to content
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

Problems with encryption enabled #1

Open
gpvigano opened this issue Sep 14, 2018 · 0 comments
Open

Problems with encryption enabled #1

gpvigano opened this issue Sep 14, 2018 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@gpvigano
Copy link
Owner

Environment

M2MqttUnity commit: 2ce51ed
Unity 3D versions: 2017.1.0f3, 2017.1.4f1, 2018.1.9f1, 2018.2.5f1

Steps to reproduce

Open the M2MqttUnity_Test example scene.
Run it in Editor or build on Windows Standalone or Android.
Enable encryption, try to connect to a broker (e.g. iot.eclipse.org).

Expected behavior

Connection successful (activating encryption and choosing the proper port, e.g. 8883 for mosquitto brokers).

Current behavior

While no problem was found using a not encrypted connection,
testing the included example also with encryption
it does not work on Windows Standalone, Android (and even in Unity Editor), but
it works when built on UWP/Windows 10 (PC and HoloLens).

Failed to connect to iot.eclipse.org:8883:
uPLibrary.Networking.M2Mqtt.Exceptions.MqttConnectionException: Exception connecting to the broker ---> System.IO.IOException: The authentication or decryption has failed. ---> Mono.Security.Protocol.Tls.TlsException: The authentication or decryption has failed.
  at Mono.Security.Protocol.Tls.RecordProtocol.ProcessAlert (AlertLevel alertLevel, AlertDescription alertDesc) [0x00000] in <filename unknown>:0 
  at Mono.Security.Protocol.Tls.RecordProtocol.InternalReceiveRecordCallback (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at uPLibrary.Networking.M2Mqtt.MqttClient.Connect (System.String clientId, System.String username, System.String password, Boolean willRetain, Byte willQosLevel, Boolean willFlag, System.String willTopic, System.String willMessage, Boolean cleanSession, UInt16 keepAlivePeriod) [0x00039] in D:\Unity3D\Projects\IoT\M2MqttUnity\Assets\M2Mqtt\MqttClient.cs:565 
  at uPLibrary.Networking.M2Mqtt.MqttClient.Connect (System.String clientId) [0x0000d] in D:\Unity3D\Projects\IoT\M2MqttUnity\Assets\M2Mqtt\MqttClient.cs:485 
  at M2MqttUnity.M2MqttUnityClient+<DoConnect>c__Iterator0.MoveNext () [0x001d2] in D:\Unity3D\Projects\IoT\M2MqttUnity\Assets\M2MqttUnity\Scripts\M2MqttUnityClient.cs:304 
UnityEngine.Debug:LogErrorFormat(String, Object[])
M2MqttUnity.<DoConnect>c__Iterator0:MoveNext() (at Assets/M2MqttUnity/Scripts/M2MqttUnityClient.cs:309)

(see also eclipse-paho/paho.mqtt.m2mqtt#21)

This was referenced Sep 16, 2020
@gpvigano gpvigano added bug Something isn't working help wanted Extra attention is needed labels Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant