Open rakhimian opened 5 years ago
Please find logging below:
Performing hot restart...
Syncing files to device ASUS Z00LD...
Restarted application in 3 076ms.
E/MethodChannel#simple_auth_flutter/showAuthenticator(24407): Failed to handle method call
E/MethodChannel#simple_auth_flutter/showAuthenticator(24407): java.lang.IllegalArgumentException: Unsupported value: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase()' on a null object reference
E/MethodChannel#simple_auth_flutter/showAuthenticator(24407): at io.flutter.plugin.common.StandardMessageCodec.writeValue(StandardMessageCodec.java:294)
E/MethodChannel#simple_auth_flutter/showAuthenticator(24407): at io.flutter.plugin.common.StandardMethodCodec.encodeErrorEnvelope(StandardMethodCodec.java:70)
E/MethodChannel#simple_auth_flutter/showAuthenticator(24407): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.error(MethodChannel.java:230)
E/MethodChannel#simple_auth_flutter/showAuthenticator(24407): at clancey.simpleauth.simpleauthflutter.SimpleAuthFlutterPlugin.onMethodCall(SimpleAuthFlutterPlugin.java:63)
E/MethodChannel#simple_auth_flutter/showAuthenticator(24407): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:222)
E/MethodChannel#simple_auth_flutter/showAuthenticator(24407): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:96)
E/MethodChannel#simple_auth_flutter/showAuthenticator(24407): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:643)
E/MethodChannel#simple_auth_flutter/showAuthenticator(24407): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#simple_auth_flutter/showAuthenticator(24407): at android.os.MessageQueue.next(MessageQueue.java:323)
E/MethodChannel#simple_auth_flutter/showAuthenticator(24407): at android.os.Looper.loop(Looper.java:135)
E/MethodChannel#simple_auth_flutter/showAuthenticator(24407): at android.app.ActivityThread.main(ActivityThread.java:5451)
E/MethodChannel#simple_auth_flutter/showAuthenticator(24407): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#simple_auth_flutter/showAuthenticator(24407): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
E/MethodChannel#simple_auth_flutter/showAuthenticator(24407): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
E/flutter (24407): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: PlatformException(error, Unsupported value: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase()' on a null object reference, null)
E/flutter (24407): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:564:7)
E/flutter (24407): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:316:33)
E/flutter (24407):
I'm getting a similar error and my redirectUrl is not null
E/MethodChannel#simple_auth_flutter/showAuthenticator( 8185): Failed to handle method call
E/MethodChannel#simple_auth_flutter/showAuthenticator( 8185): java.lang.IllegalArgumentException: Unsupported value: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase()' on a null object reference
E/MethodChannel#simple_auth_flutter/showAuthenticator( 8185): at io.flutter.plugin.common.StandardMessageCodec.writeValue(StandardMessageCodec.java:294)
E/MethodChannel#simple_auth_flutter/showAuthenticator( 8185): at io.flutter.plugin.common.StandardMethodCodec.encodeErrorEnvelope(StandardMethodCodec.java:70)
E/MethodChannel#simple_auth_flutter/showAuthenticator( 8185): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.error(MethodChannel.java:230)
E/MethodChannel#simple_auth_flutter/showAuthenticator( 8185): at clancey.simpleauth.simpleauthflutter.SimpleAuthFlutterPlugin.onMethodCall(SimpleAuthFlutterPlugin.java:63)
E/MethodChannel#simple_auth_flutter/showAuthenticator( 8185): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:222)
E/MethodChannel#simple_auth_flutter/showAuthenticator( 8185): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:96)
E/MethodChannel#simple_auth_flutter/showAuthenticator( 8185): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:656)
E/MethodChannel#simple_auth_flutter/showAuthenticator( 8185): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#simple_auth_flutter/showAuthenticator( 8185): at android.os.MessageQueue.next(MessageQueue.java:326)
E/MethodChannel#simple_auth_flutter/showAuthenticator( 8185): at android.os.Looper.loop(Looper.java:181)
E/MethodChannel#simple_auth_flutter/showAuthenticator( 8185): at android.app.ActivityThread.main(ActivityThread.java:7045)
E/MethodChannel#simple_auth_flutter/showAuthenticator( 8185): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#simple_auth_flutter/showAuthenticator( 8185): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/MethodChannel#simple_auth_flutter/showAuthenticator( 8185): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)
It is unclear what is null from the error. It'd be great if the plugin told me what was null.
So I need to handle this better. This is caused by a null redirect url. You need something in the redirect or this error happens.
_Originally posted by @Clancey in https://github.com/Clancey/simple_auth/issues/27#issuecomment-426885594_
Hi! let say I've some redirect url. Where I should set them? Thanks!