GoogleCloudPlatform / recaptcha-enterprise-flutter

Apache License 2.0
23 stars 8 forks source link

"Invalid Package Name" - When I run initClient #39

Closed edrianbiagi closed 7 months ago

edrianbiagi commented 7 months ago

I'm having trouble running the project. I get this error:

Captura de Tela 2024-04-02 às 22 37 49

I used version 18.4.2 and 18.5.0-beta02.

The error occurs at this point in the code:

try { result = await RecaptchaEnterprise.initClient(siteKey, timeout: 10000); } on PlatformException catch (err) { print('Caught platform exception on init: $err'); errorMessage = 'Code: ${err.code} Message ${err.message}'; } catch (err) { print('Caught exception on init: $err'); errorMessage = err.toString(); }

Has anyone ever experienced this? Thank you for your attention!

mcorner commented 7 months ago

You have to configure a matching package name when creating the key. https://cloud.google.com/recaptcha-enterprise/docs/create-key-mobile