stripe-android icon indicating copy to clipboard operation
stripe-android copied to clipboard

[BUG] Unable to load connect account onboarding url returned from Stripe.

Open rajeshkhumanthem opened this issue 1 year ago • 2 comments

Summary

Android App trying to open url returned from call to "https://api.stripe.com/v1/accounts" in a Webview fails. This is during a Connect account onboarding process.

Code to reproduce

Stacktrace from Chrome is given below: Uncaught ReferenceError: globalThis is not defined at getHostname (connect-flows.express_unified.023b9ffde252a582b993.min.js:5) at isStripeInternalHostname (connect-flows.express_unified.023b9ffde252a582b993.min.js:5) at isDevEnvironment (connect-flows.express_unified.023b9ffde252a582b993.min.js:5) at getEnvironment (connect-flows.express_unified.023b9ffde252a582b993.min.js:5) at Object. (connect-flows.express_unified.023b9ffde252a582b993.min.js:13) at webpack_require (connect-flows.runtime~express_unified.2cf0bb060194f759fbd9.min.js:1) at Object. (connect-flows.express_unified.023b9ffde252a582b993.min.js:14) at webpack_require (connect-flows.runtime~express_unified.2cf0bb060194f759fbd9.min.js:1) at Object. (connect-flows.express_unified.023b9ffde252a582b993.min.js:32) at webpack_require (connect-flows.runtime~express_unified.2cf0bb060194f759fbd9.min.js:1)

It looks like it is looking for a variable that doesn't exist and crashes.

Android version

SDK Level 28

Impacted devices

Samsung S22 Android simulator running the above SDK.

Installation method

Android Studio Running on MacOS Sonoma 14.1.1

Dependency Versions

kotlin: stripe-android: Android Gradle Plugin: Gradle:

SDK classes

SDK Level 28

Video

Other information

This issue is simple; a JS script (see name in the stack trace) is referencing a variable without checking if it exist first. Please see the stack trace above from Chrome debugger. It works fine with simulator running SDK Level 29.

rajeshkhumanthem avatar Feb 06 '24 02:02 rajeshkhumanthem

Tested with SDK Level 29 and it works fine.

rajeshkhumanthem avatar Feb 06 '24 02:02 rajeshkhumanthem

Hi @rajeshkhumanthem I'm not able to reproduce this. Is this happening on emulators and physical devices?

Are you still able to recreate this?

jaynewstrom-stripe avatar Jun 17 '24 17:06 jaynewstrom-stripe

Please reopen with more info to recreate.

jaynewstrom-stripe avatar Jul 16 '24 17:07 jaynewstrom-stripe