flutter_stripe icon indicating copy to clipboard operation
flutter_stripe copied to clipboard

[stripe_checkout] Uncaught ReferenceError: Stripe is not defined

Open MatteoAntolini opened this issue 2 years ago • 2 comments

After calling redirectToCheckout, I got a white screen and this error in chat Uncaught ReferenceError: Stripe is not defined. If I copy the session url on browser, it works.

Full log
I/PlatformViewsController(23452): Hosting view in view hierarchy for platform view: 1
4
D/EGL_emulation(23452): eglMakeCurrent: 0xe9ffd920: ver 2 0 (tinfo 0xe9fafe80)
I/chromium(23452): [INFO:CONSOLE(1)] "Uncaught ReferenceError: Stripe is not defined", source:  (1)
D/EGL_emulation(23452): eglMakeCurrent: 0x9367f560: ver 2 0 (tinfo 0x9377c830)
4
D/EGL_emulation(23452): eglMakeCurrent: 0xe9ffd920: ver 2 0 (tinfo 0xe9fafe80)
E/chromium(23452): [ERROR:ssl_client_socket_impl.cc(946)] handshake failed; returned -1, SSL error code 1, net_error -201
I/chromium(23452): [INFO:CONSOLE(1)] "Uncaught ReferenceError: Stripe is not defined", source: https://stripe.com/base_url/ (1)
2
D/EGL_emulation(23452): eglMakeCurrent: 0xe9ffd920: ver 2 0 (tinfo 0xe9fafe80)
2
E/chromium(23452): [ERROR:ssl_client_socket_impl.cc(946)] handshake failed; returned -1, SSL error code 1, net_error -201
D/EGL_emulation(23452): eglMakeCurrent: 0xe9ffd920: ver 2 0 (tinfo 0xe9fafe80)
I/chatty  (23452): uid=10233(test.hoongry.flutterhoongry) RenderThread identical 8 lines
D/EGL_emulation(23452): eglMakeCurrent: 0xe9ffd920: ver 2 0 (tinfo 0xe9fafe80)

MatteoAntolini avatar Jan 11 '23 17:01 MatteoAntolini

Is this on Web?

Did you follow the instructions for it? https://github.com/flutter-stripe/flutter_stripe/tree/main/packages/stripe_checkout#web

Please provide a code example.

jonasbark avatar Jan 17 '23 11:01 jonasbark

No, it's on mobile Android.

I found out that this cloud happens on Android Emulators that have no access to Google Play Services. Maybe is some kind of integration with Google Pay that breaks the code. On a real device, for now, I didn't see this error.

I'm currently using the library importing it from github

flutter_stripe: ^5.1.0
stripe_checkout:
  git:
    url: https://github.com/flutter-stripe/flutter_stripe
    path: packages/stripe_checkou

MatteoAntolini avatar Jan 17 '23 12:01 MatteoAntolini

closed as it is quite old ticket and I could not reproduce it anymore. Feel free to create a new ticket if the issue still persist

remonh87 avatar Apr 14 '24 15:04 remonh87