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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Bug Report: WidgetsBinding.instance?.removeObserver #64

Closed
2 tasks done
Tananga opened this issue May 24, 2022 · 8 comments
Closed
2 tasks done

馃悰 Bug Report: WidgetsBinding.instance?.removeObserver #64

Tananga opened this issue May 24, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@Tananga
Copy link

Tananga commented May 24, 2022

馃憻 Reproduction steps

Hi.

I updated my appwrite version to the latest one and now I see this red warnings in the console.
Please take a look.

Screenshot 2022-05-25 at 00 06 50

馃憤 Expected behavior

clear console

馃憥 Actual Behavior

Red warnings in the console

馃幉 Appwrite version

Different version (specify in environment)

馃捇 Operating system

MacOS

馃П Your Environment

Latest version

馃憖 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

馃彚 Have you read the Code of Conduct?

@Tananga Tananga added the bug Something isn't working label May 24, 2022
@2002Bishwajeet
Copy link

These warnings are from the flutter_web_auth package . There is also and issue #117 in the flutter_web_auth repo and a PR is also pending. All we can hope is to be that it gets merged soon

@lohanidamodar
Copy link
Member

For now these are just warnings and doesn't affect the functionality.

@noga-dev
Copy link

noga-dev commented Jul 4, 2022

@Appwrite-Guru You can add this to your pubspec to make those warnings go away:

dependency_overrides:
  flutter_web_auth:
    git:
      url: https://github.com/noga-dev/flutter_web_auth.git
      ref: ee3c26a530a625c3cab7e0c45cc30316c8b4b64c

@jocubeit
Copy link

I think think the dependency should be replaced with https://pub.dev/packages/flutter_web_auth_2 which is an updated fork of the apparently abandoned original flutter_web_auth. The current dependency's last update was in Feb, and given there are a number of PRs going unanswered I think we can call it what it is - abandoned. The link above is the continuation of the excellent package but with relevant fixes.

I for one have an issue wanting to release production grade code but don't want to link to a dependency override. I can't guarantee that fork will be around forever as it's not a published version.

I'm also sick of seeing the stupid exceptions in my console. Can we please update? If not, I'll have to look at forking appwrite/sdk_for_flutter or the generator so I can put something sound into production.

From the author:

If you used flutter_web_auth correctly (and without extra hackage) before, it should be sufficient to replace the following strings everywhere (yes, also in AndroidManifest.xml for example):

FlutterWebAuth -> FlutterWebAuth2
flutter_web_auth -> flutter_web_auth_2

@jocubeit
Copy link

jocubeit commented Aug 29, 2022

I forked the sdk-for-flutter at https://github.com/startcommerce/appwrite_flutter to test swapping in the https://pub.dev/packages/flutter_web_auth_2 dependency.

I had to update device_info_plus to ^4.1.2 and package_info_plus to ^1.4.3+1 at the same time.

I've tested the forked version with GitHub OAuth in a Flutter web app and all is working as expected with clean console output. I have access to the GitHub access token with the scopes requested in the session and I'm not seeing any issues at all. Upgrading has also permitted me to use the latest file_picker version (5.0.1) which means I'm no longer stuck in old FFI land too.

I have not tested Android, iOS, Windows, Mac or Linux, but I am happy to.

Before you say it: I know I can't submit this as a PR because this is the read-only repo, but I am happy to fork the SDK generator and make the required changes and submit a PR there if you're interested. Just need to know if you're happy for me to proceed, or is someone else (@lohanidamodar) already tackling this?

@eldadfux
Copy link
Member

@jocubeit I think you can go ahead and implement the new dependency, this will also help us ensure all tests are running properly. @lohanidamodar has reached out to the maintainer of flutter_web_auth_2 to see if our team can help with maintenance of the new package.

@jocubeit
Copy link

Alright great! I'll go ahead and create a PR.

Thanks for the swift response.

@eldadfux
Copy link
Member

eldadfux commented Sep 1, 2022

Thank you everyone for all the help, version 7.0 with the fix has been released 馃挋 More info and credits to you all in our latest blog post: https://dev.to/appwrite/announcing-new-versions-for-appwrites-flutter-and-dart-sdks-4l5j

@eldadfux eldadfux closed this as completed Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants