checkpw blocks infinitely when using flutter in release apk
Oops I didn't see this issue was created until now, sorry. I'll check it tomorrow, but bear in mind flutter uses a dev version of the Dart 2 SDK and the released version of dBCrypt doesn't support yet Dart 2 (a version that supports it, is almost ready)
I can't reproduce this issue with an Xperia X Performance (Android 8.0) on Windows, with the same Flutter and Android toolchain version and dBCrypt 0.2.0 😕 Could you try with a different phone or the code from the master branch that is Dart 2 ready? I'm not sure I can get a Nexus 5 to try it but I'll try it with the Xperia on Linux tomorrow just in case, but shouldn't make any difference.
I am experiencing the same issue on a OnePlus 5T. However, it does not block forever. It just takes a VERY long time to complete.
I think a good approach would be to make the API async, but off course also fix the performance issue ;-)
Making the API async won't do much since it's a CPU bound task.
But, using a dart Isolate to create a new thread and then get the results back using the inbuilt messaging functionality would solve the issue
I am experiencing the same; On the debug apk it takes around 3 seconds to complete a hash a string, whereas the release apk (no code changes) it takes 160 seconds! Any eta on the dart2 version?
Can confirm this is still an issue.
This issue is caused by: https://github.com/flutter/flutter/issues/24906
@metacomgd Dart 2 version was released months ago. Thanks @NBTX let's hope that when the flutter team fixes that issue, this gets fixed too.
It's not fix yet. WE ARE IN JULY 2019
error not fixed
Has anyone still being affected by this error opened an issue in the Flutter repo? If so, can you post it here?
The issue is not that checkpw blocks infinitely, just that for a large cost factor it can take an incredible amount of time.
With the last flutter stable version for me it takes 4 seconds to run the gist in the original post on my device, which may be too much but nowhere near blocking infinitely like it was originally reported. I think that problem was fixed in #https://github.com/flutter/flutter/issues/24906 and the problem right now it's related to #https://github.com/dart-lang/sdk/issues/37551 but can't try it yet since not even the dev channel has a SDK version with that fix yet.
I have this issue too on recent versions. Sadly, can't do nothing bout it. If anyone needs information, I will kindly provide
@flawnn i made a native implementation for this exact reason: https://pub.dev/packages/flutter_bcrypt
@flawnn i made a native implementation for this exact reason: https://pub.dev/packages/flutter_bcrypt
It seems like this wasn't updated for a long time. Null safety seems also not supported, that's a bit of a bummer.
It works for me :-) PR welcome if you like to update it, or put null safety support in it.
It works for me :-) PR welcome if you like to update it, or put null safety support in it.
https://github.com/jeroentrappers/flutter_bcrypt/pull/6 here you go ;) works for me, migration was flawless
It works for me :-) PR welcome if you like to update it, or put null safety support in it.
Kind reminder again to merge the PR, so other people can use the wonderful package too on higher SDK version :)
Kind reminder again to merge the PR, so other people can use the wonderful package too on higher SDK version :)
Done