tmthecoder / dargon2

Argon2 Dart Bindings
https://docs.tmthecoder.dev/dargon2/
MIT License
18 stars 12 forks source link

Flutter 3.7 error #15

Closed rlbartz closed 1 year ago

rlbartz commented 1 year ago

When running argon2_flutter plugin with flutter 3.7.0 (previous version works well) it breaks with the following error (Only on web):

ChromeProxyService: Failed to evaluate expression 'require': InternalError: Expression evaluation in async frames is not supported. No frame with index 15 Error: Mismatched anonymous define() module: function() { return CanvasKitInit; }

File: Argon2.dart Funcion: _registerRequire()

Steps to reproduce:

tmthecoder commented 1 year ago

Hi, does this help at all: https://stackoverflow.com/questions/71521564/chromeproxyservice-failed-to-evaluate-expression-handleprimarypointerinterna

If not, it seems like a debug only error. Can you see if it comes up in a release build (Test argon2 functionality in a release web app?)

rlbartz commented 1 year ago

I tested in release web, and it works. In debug mode, just works if I downgrade flutter to 3.3.10 (event with fresh install of flutter sdk 3.7.0). I tried all tips on this link (https://stackoverflow.com/questions/71521564/chromeproxyservice-failed-to-evaluate-expression-handleprimarypointerinterna), but it doesn't helped. Any way to work around this error in debug mode in order to be able to test application before release?

Yavnik commented 1 year ago

I'm getting similar error in web debug after upgrading to Flutter 3.7 on the function argon2.hashPasswordString()

[DArgon2ErrorCode.ARGON2_UNKNOWN_ERRO… read properties of undefined (reading 'argon2i')

tmthecoder commented 1 year ago

Hi,

I'm looking into this right now. The reading properties of undefined is due to the prior error's cascading effects (argon2's web library isn't loaded, so the objects are undefined)

tmthecoder commented 1 year ago

Fixed with 3.2.0

rlbartz commented 1 year ago

Thank you. It's working properly now.

Yavnik commented 1 year ago

@tmthecoder Thank you for the quick fix, Tejas. Much appreciated.