authpass / biometric_storage

Flutter plugin to store data behind biometric authentication (ie. fingerprint)
https://pub.dev/packages/biometric_storage
MIT License
177 stars 104 forks source link

Compiling on linux fails #42

Closed miDeb closed 2 years ago

miDeb commented 2 years ago

Compiling an app that depends on biometric_storage fails on the latest master channel stable release with the following error message (on linux and I'd guess on macos as well):

dart_tool/flutter_build/generated_main.dart:47:9: Error: Undefined name 'Win32BiometricStoragePlugin'.
        Win32BiometricStoragePlugin.registerWith();
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^

I think this might be related to recent changes to dartPluginClass by flutter, so if you think this is flutter's bug and not yours feel free to close this issue :)

nikhilbadyal commented 2 years ago

Same issue. Unable to compile because Win32BiometricStoragePlugin.registerWith(); is undefined.

Samin-youki commented 2 years ago

@hpoul any update on this?

TMSantos commented 2 years ago

@miDeb did you found any solution?

miDeb commented 2 years ago

@TMSantos sorry, I did not.

brianblanchard-wf commented 2 years ago

I took a stab a fixing this in https://github.com/authpass/biometric_storage/pull/47. There is more info around the source of the issue in the pull request description. It is not just a linux issue, this issue most likely reproduces on any platform (expect for web).

If you all have the time to target my branch as your dependency of biometric_storage I would love to know if this fixes the issues you are seeing 😄

cc: @TMSantos, @miDeb

TMSantos commented 2 years ago

@brianblanchard-wf thanks, Indeed it happens outside linux, I use macOS, I end up forking and removing desktop part https://github.com/TMSantos/biometric_storage/commit/ce730be728b2710c7a6644863fc305a68b7b71c6 , as I only need mobile, will wait for this to be merged

hpoul commented 2 years ago

I've published #47 as 4.0.0-rc.1 - maybe you could give it a try and let me know if it works for you. thanks.

nikhilbadyal commented 2 years ago

@hpoul Thanks, fixed now.

miDeb commented 2 years ago

Works for me - thanks!

itaishalom commented 2 years ago

Solved my issue.

Samin-youki commented 2 years ago

I'm running my app on windows, with flutter 2.8.0 and dart 2.15.0 and getting this error... any solution?

Samin-youki commented 2 years ago

@hpoul i could not test the version you published:

biometric_storage ^4.0.0-rc.1 which doesn't match any versions, version solving failed.

hpoul commented 2 years ago

@Samin-youki sorry, i called it 4.0.0-dev.1 🙈 https://pub.dev/packages/biometric_storage/versions/4.0.0-dev.1

Samin-youki commented 2 years ago

@hpoul thank you so much, the problem is fixed in 4.0.0-dev.1 :)

hpoul commented 2 years ago

@hpoul 4.0.0-dev.1 is not working for Web anymore!!!!! Why isn't this tested on every platform????

Okay, I'll refund you your money 🤣 Feel free to create a PR with your tests, but keep your!!!!!????!!!! To yourself. Thanks!!!!

Ahmadre commented 2 years ago

ci/cd pipeline it not working:

Xcode's output:
↳
    /Users/vagrant/git/ios/Runner/GeneratedPluginRegistrant.m:12:9: fatal error: module 'biometric_storage' not found
    @import biometric_storage;
     ~~~~~~~^~~~~~~~~~~~~~~~~

downgrading to v. 2 is also not possible to other build errors.

mtskf commented 2 years ago

Same error here...

    ** BUILD FAILED **
Xcode's output:
↳
    /Users/*************/ios/Runner/GeneratedPluginRegistrant.m:12:9: fatal error: module 'biometric_storage' not found
    @import biometric_storage;
     ~~~~~~~^~~~~~~~~~~~~~~~~
    1 error generated.
wal33d006 commented 2 years ago

Exact same error here. Flutter version 2.8.1

Ahmadre commented 2 years ago

@hpoul do you believe me now?

Ahmadre commented 2 years ago

@hpoul https://github.com/authpass/biometric_storage/issues/52

mtskf commented 2 years ago

I had the same issue but it was sorted after reinstalling pod files somehow:

❯ cd ios ❯ rm Podfile.lock ❯ pod update ❯ pod rm -rf ~/Library/Developer/Xcode/DerivedData/* ❯ flutter clean ❯ flutter pub get ❯ flutter build ios ❯ pod install

Ahmadre commented 2 years ago

For anyone who's still struggling: https://github.com/flutter/flutter/issues/54599#issuecomment-617244516

This solved my issues

hpoul commented 2 years ago

I think this should be solved. If anyone still experiences this, please create a new issue.