simple_auth icon indicating copy to clipboard operation
simple_auth copied to clipboard

Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase()' on a null object reference when following example

Open ThinkDigitalSoftware opened this issue 6 years ago • 2 comments

I'm using this same code but with my own client secret and ID and I'm getting this error.

E/flutter (29433): [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)

https://github.com/Clancey/simple_auth/blob/54f048ad8470ee1d1a001794eb0286fe51b591fa/simple_auth_flutter_example/lib/main.dart#L78-L84

My code is:

  final githubApi = GithubApi(
                    "github",
                    gitHubClientId,
                    gitHubClientSecret,
                    "com.thinkdigital.software",
                    scopes: [
                      "repo",
                      "public_repo",
                    ],
                  );
 githubApi.authenticate();

ThinkDigitalSoftware avatar Oct 09 '19 22:10 ThinkDigitalSoftware

Actually the same issue here with Keycloak.

Kilomoana83 avatar Mar 22 '21 16:03 Kilomoana83

Same issue with Keycloak as well.

WillianSalceda avatar Dec 27 '21 17:12 WillianSalceda