Skip to content
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

[macOS] [version 0.4.3]: unexpectedly found nil while unwrapping an Optional value #155

Open
r-durao-pvotal opened this issue May 25, 2023 · 0 comments

Comments

@r-durao-pvotal
Copy link

Getting this error when trying to perform a redirect to my auth:

flutter_web_auth/FlutterWebAuthPlugin.swift:38: Fatal error: Unexpectedly found nil while unwrapping an Optional value

Tried looking at the code in question, but unfamiliar with Swift, seems to be that keyWindow is null? Is there any setup step for macOS that is needed before using this library?

   guard let provider = NSApplication.shared.keyWindow!.contentViewController as? FlutterViewController else {
                result(FlutterError(code: "FAILED", message: "Failed to aquire root FlutterViewController" , details: nil))
                return
            }

flutter doctor output:

~/$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.10.1, on macOS 13.3.1 22E772610a darwin-arm64, locale en-PT)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] IntelliJ IDEA Ultimate Edition (version 2022.1.3)
[✓] VS Code (version 1.78.1)
[✓] Connected device (2 available)
[✓] Network resources

• No issues found!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant