Open jeedy20 opened 5 months ago
Getting same, any solution you found?
Nothing yet
Can you fill in the required info of the issue? I need a full stacktrace + output of flutter doctor.
[√] Flutter (Channel stable, 3.16.9, on Microsoft Windows [Version 10.0.22000.2538], locale en-NG) [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 33.0.0) [√] Chrome - develop for the web [!] Visual Studio - develop Windows apps (Visual Studio Build Tools 2019 16.11.33) X The current Visual Studio installation is incomplete. Please use Visual Studio Installer to complete the installation or reinstall Visual Studio. [!] Android Studio (version 2021.3) X Unable to determine bundled Java version. [√] Android Studio (version 2023.1) [√] VS Code (version 1.85.2) [√] Connected device (4 available) [√] Network resources
These are what you requested for
i implemented this plugin's basic of functionality my self and full fill my requirements. with stripe js (client side) card-field element, tested on firebase works fine.
@jeedy20 I cannot see in the stack trace that it has to do something with our sdk. What kind of widget are you using ?
@remonh87 i have also same problem.Platform._operatingSystem in flutter web
[√] Flutter (Channel stable, 3.16.3, on Microsoft Windows [Version 10.0.22000.2538], locale en-NG) [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 33.0.0) [√] Chrome - develop for the web [!] Visual Studio - develop Windows apps (Visual Studio Build Tools 2019 16.11.33) X The current Visual Studio installation is incomplete. Please use Visual Studio Installer to complete the installation or reinstall Visual Studio. [!] Android Studio (version 2021.3) X Unable to determine bundled Java version. [√] Android Studio (version 2023.1) [√] VS Code (version 1.85.2) [√] Connected device (4 available) [√] Network resources
@jeedy20 I cannot see in the stack trace that it has to do something with our sdk. What kind of widget are you using ?
Payment Element sir.
I was unable to reproduce this in the example app. Can you provide a small example repo / code?
I had been experiencing the same issue then realised that I forgot to add flutter_stripe_web: ^5.0.0
to the dependencies.
flutter_stripe
and flutter_stripe_web
, both are required to work on flutter web.
This worked for me! Hope this helps someone.
I had been experiencing the same issue then realised that I forgot to add
flutter_stripe_web: ^5.0.0
to the dependencies.flutter_stripe
andflutter_stripe_web
, both are required to work on flutter web.This worked for me! Hope this helps someone.
i added both dependencies flutter_stripe and flutter_stripe_web but not worked for me 🤨. it works fine in debug mode but when app deployed to firebase hosting than its not.
Yeah. Any solution yet?
does the same happen when you run flutter run --release
?
@remonh87 I'm having the same issue, but as long as I'm working locally everything works. So, it doesn't happen the same when I run flutter run --release
I looked into it and this is a flutter issue and not something from this sdk: https://github.com/flutter/flutter/issues/36126
So what could be the solution?
@jeedy20 I solved the issue upgrading both Flutter and the SDKs version.
flutter --version
Flutter 3.19.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision bae5e49bc2 (2 weeks ago) • 2024-02-13 17:46:18 -0800
Engine • revision 04817c99c9
Tools • Dart 3.3.0 • DevTools 2.31.1
Flutter SKDs version:
flutter_stripe: ^10.0.0
flutter_stripe_web: ^5.0.0
Try this out, it worked for me.
Okay thanks alot
Since I can not upgrade to Flutter 3.19 I made an hacky edit in method_channel_stripe
StripePlatform create() => kIsWeb?MethodChannelStripe(
methodChannel: const MethodChannel(
'flutter.stripe/payments',
JSONMethodCodec(),
),
platformIsIos: false,
platformIsAndroid: false,
):MethodChannelStripe(
methodChannel: const MethodChannel(
'flutter.stripe/payments',
JSONMethodCodec(),
),
platformIsIos: Platform.isIOS,
platformIsAndroid: Platform.isAndroid,
);
I fixed this issue that for some reason only happened on the Web version on Android devices (iOS Web and Desktop Web was working fine)
With this
if(kIsWeb){ WebStripe.instance.initialise(publishableKey: "stripePublicKey"); } else { Stripe.publishableKey = "stripePublicKey"; }
I get an Uncaught Unsupported operation: Platform._operatingSystem after i deploy my flutter web app to firebase hosting and its stucked in the splash screen any solution to this?. I think this is the cause of the error in my main.dart page.
await dotenv.load(fileName: ".env"); Stripe.publishableKey = dotenv.env['StripePublishableKey']!; Stripe.merchantIdentifier = 'merchant.flutter.stripe.test'; Stripe.urlScheme = 'flutterstripe'; await Stripe.instance.applySettings();