-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Promise was rejected with a value of undefined
.
#18
Comments
I'm facing the same issue flutter doctor -v[✓] Flutter (Channel stable, 3.3.8, on macOS 13.0 22A380 darwin-arm, locale en-NL) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 14.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2021.3) [✓] VS Code (version 1.73.1) [✓] Connected device (2 available) [✓] HTTP Host Availability |
I am facing the same issue, can you please help. |
When I run the example, I get the same error. I use Flutter 3.7.3. |
Hi, what version of keycloak do you use? |
I am facing the same issue, does anyone know how to fix this? (flutter V: 3.7.12) |
What version of the library are you using? |
Hello, I have the same issue only if i use onLoad: "check-sso" in the KeycloakService Initialization. It works fine with "login-required". |
What version of the plug-in are you using? Also, have you tested with the example app? |
Sorry for the late response, void main() async {
keycloakService = KeycloakService(KeycloakConfig(
url: <KEYCLOAK_URL>, // Keycloak auth base url
realm: <REALM_NAME>',
clientId: <CLIENT_NAME>));
await keycloakService.init(
initOptions: KeycloakInitOptions(
onLoad: 'login-required',
redirectUri: '${window.location.origin}',
silentCheckSsoRedirectUri:
'${window.location.origin}/silent-check-sso.html',
),
);
runApp(MyApp());
}
This error seems to be from keycloak_service.dart, line 29 : authed = await promiseToFuture<bool>(_keycloak.init(initOptions));
Even with the parameter : flow: 'implicit', |
Please what command do you use to build the application? Are you building with canvaskit? I cant seem to replicate this issue |
@gibahjoe git clone [email protected]:gibahjoe/keycloak_flutter.git
cd keycloak_flutter
cd example
flutter pub get
code .
flutter run -d chrome --web-port=8090 ./lib/main.dart --web-renderer html When I launch VS Code with the |
Can you please share the keycloak.js file you are using Also, please share your keycloak clients' .json config file so that I can check if the issue is a client config issue. thank you. |
Hi, I managed to track down this issue and resolve it. I recreated it when the web origins config was not set in the client. Please check that that is your case I have updated the documentation to reflect this and also included a sample keycloak client in the example app. If you are still having the issue, kindly import the sample client and test with that. I have also pushed an update to the library (v0.0.21). Please test it and let me know. thanks a lot |
I'm trying to use the example app to evaluate how to use this package.
And calling KeycloakService.init() throws an exception;
I tried this with
0.0.3
and0.0.19
of this package, on flutter 3.3.0 (but also with flutter 3.0.5 and 2.10.5)flutter doctor -v
Adapted Example App
flutter create --platform web .
creates the index.html differently then in the past, so I'll post it as wellindex.html
The text was updated successfully, but these errors were encountered: