owntracks / android

OwnTracks Android App
http://owntracks.org
Eclipse Public License 1.0
1.37k stars 475 forks source link

App crashes if I don't want to use a client certificate #865

Closed michirod closed 4 years ago

michirod commented 4 years ago

If I go to the Security settings and leave the client certificate blank, then accept, the app crashes.

10-05 13:28:40.446 14103 14103 E AndroidRuntime: FATAL EXCEPTION: main
10-05 13:28:40.446 14103 14103 E AndroidRuntime: Process: org.owntracks.android, PID: 14103
10-05 13:28:40.446 14103 14103 E AndroidRuntime: java.lang.NullPointerException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter, parameter name
10-05 13:28:40.446 14103 14103 E AndroidRuntime:    at org.owntracks.android.support.Preferences.setTlsClientCrt(Unknown Source:2)
10-05 13:28:40.446 14103 14103 E AndroidRuntime:    at org.owntracks.android.ui.preferences.connection.dialog.ConnectionSecurityViewModel.save(ConnectionSecurityViewModel.java:62)
10-05 13:28:40.446 14103 14103 E AndroidRuntime:    at org.owntracks.android.ui.preferences.connection.dialog.BaseDialogViewModel.onClick(BaseDialogViewModel.java:19)
10-05 13:28:40.446 14103 14103 E AndroidRuntime:    at androidx.appcompat.app.AlertController$ButtonHandler.handleMessage(AlertController.java:167)
10-05 13:28:40.446 14103 14103 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:106)
10-05 13:28:40.446 14103 14103 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:201)
10-05 13:28:40.446 14103 14103 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:6820)
10-05 13:28:40.446 14103 14103 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
10-05 13:28:40.446 14103 14103 E AndroidRuntime:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
10-05 13:28:40.446 14103 14103 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:922)
growse commented 4 years ago

Thanks!

Managed to reproduce, should be fixed in 2.2.1.