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

🔀 address issue #30; test issues #1, #10, #13 #47

Closed
wants to merge 2 commits into from

Conversation

FireJuun
Copy link

@FireJuun FireJuun commented May 10, 2023

This PR should help users who are using flutter_web_auth_2 on macOS.

When first running FlutterWebAuth2.authenticate() with version 2.1.4 on macOS, I was getting the exact issue as was noted in issue #30:

flutter_web_auth_2/FlutterWebAuth2Plugin.swift:39: Fatal error: Unexpectedly found nil while unwrapping an Optional value

I believe this platform exception is what you were referencing in issue #10, though there isn't enough detail to know this for sure. Also of note, Chrome is my default browser (testing #13).

To address issue #30, I did the following:

  • 🧱 deleted example/macos folder, then ran flutter create .
    • In current state, the macos Podfile was causing a lot of errors
    • The simplest fix here was to allow Flutter to recreate all of its dependencies
  • ⬆️ upgraded all macOS platform dependencies to 10.15
    • This requirement was already set by the macos/Classes/FlutterWebAuth2Plugin.swift file

Of note, while making these changes, I also addressed this issue in the test/flutter_web_auth_2_test.dart file:

  • 🐛 add null safety to TestDefaultBinaryMessengerBinding

The end result is a working example for macOS in Chrome:
macos-webauth-example

🐛 add null safety to TestDefaultBinaryMessengerBinding
🐛 delete and re-create macos Podfile
⬆️ upgrade platform dependency to 10.15
@ThexXTURBOXx
Copy link
Owner

First of all: Thanks for your PR! However, this does not seem to fix anything in flutter_web_auth_2 directly, but rather addresses some issues in the example and tests.
The issues you mentioned will then still persist in other users' devices. Do you have any idea to fix the underlying issue instead of just the example and tests?

hot restart seems fail if this package is pulled into another package
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

Successfully merging this pull request may close these issues.

2 participants