privacyidea / pi-authenticator

OTP Authenticator App for privacyIDEA Authentication Server
Other
39 stars 21 forks source link

Uncaught Error: type 'Null' is not a subtype of type 'String' #321

Closed frankmer closed 1 year ago

frankmer commented 1 year ago

It seems that _handleIncomingAuthRequest cannot handle null values. Fix this by refactoring the code to support null-safety.


[ERROR] (2023-10-09 09:31:05.022542) Uncaught Error: type 'Null' is not a subtype of type 'String' [ERROR] type 'Null' is not a subtype of type 'String' [ERROR] Stacktrace: [ERROR] #0 PushRequestNotifier._handleIncomingRequest (package:privacyidea_authenticator/state_notifiers/push_request_notifier.dart:93) [ERROR] #1 PushRequestNotifier._handleIncomingAuthRequest. (package:privacyidea_authenticator/state_notifiers/push_request_notifier.dart:66) [ERROR] #2 Mutex.protect (package:mutex/src/mutex.dart:79) [ERROR] [ERROR] #3 PushRequestNotifier._handleIncomingAuthRequest (package:privacyidea_authenticator/state_notifiers/push_request_notifier.dart:64) [ERROR]

frankmer commented 1 year ago

Nullcheck for every value of the required keys.