Open casumatt opened 1 year ago
do you know the customers device and android version? To manage expectations I do not think there is much we can do if there is no suitable reproducition step
Device is in dark mode, switch it and it will show
@LScodeblack legend, thank you!
@LScodeblack so thank you, dark mode is definitely the issue, but I imagined that darkmode was just making the text 'white', and the only issue was that the user couldn't see the prompts to type in their card details, but in actual fact it does cause CardField to error as per below....
D/EGL_emulation(27919): app_time_stats: avg=4219.07ms min=4219.07ms max=4219.07ms count=1
D/EGL_emulation(27919): app_time_stats: avg=8445.60ms min=129.63ms max=24780.09ms count=3
2
[log] NetworkConnectionManagerWrapper: ConnectivityResult.wifi
I/au.com.casu(27919): NativeAlloc concurrent copying GC freed 43200(1610KB) AllocSpace objects, 10(392KB) LOS objects, 49% free, 9236KB/18MB, paused 907us,112us total 347.656ms
D/EGL_emulation(27919): app_time_stats: avg=629.38ms min=130.39ms max=1540.05ms count=3
D/EGL_emulation(27919): app_time_stats: avg=296.18ms min=17.72ms max=1497.63ms count=6
E/Surface (27919): freeAllBuffers: 1 buffers were freed while being dequeued!
W/au.com.casu(27919): Suspending all threads took: 19.332ms
E/Surface (27919): getSlotFromBufferLocked: unknown buffer: 0x7a95a1643a70
I/au.com.casu(27919): NativeAlloc concurrent copying GC freed 5561(309KB) AllocSpace objects, 4(144KB) LOS objects, 49% free, 9200KB/17MB, paused 1.610ms,19.690ms total 331.538ms
[log] Assessing profile completeness for the current user when the current user is not admin.
[log] The employer's profile has been checked as: true
[log] About to write matches 5
E/MethodChannel#flutter/platform_views(27919): Failed to handle method call
E/MethodChannel#flutter/platform_views(27919): android.view.InflateException: Binary XML file line #23 in au.com.projectname:layout/stripe_card_input_widget: Binary XML file line #23 in au.com.projectname:layout/stripe_card_input_widget: Error inflating class
Is there an actual fix to this so that it works in Dark mode?
Also encountered this issue.
The CardField
breaks when running the Android device in darkmode.
The CardFormField
breaks in a similar way on Android regardless of the theme mode.
Specs:
Flutter: 3.13
flutter_stripe: 9.4.0
Android version: 11
Device: Pixel 4
Anything we can do to fix it?
Am also facing the same issues here.
It works on emulators but not on real devices
This should be fixed from version 9.6.0.
@remonh87 I'm facing this issue with flutter_stripe: 10.0.0 running only in release mode for android. I have tested also the example app and it's also has the issue. Try running release mode with flutter 3.16.5 and Card Field Themes of the example.
Here a video using example app in flutter run --release:
@kekko7072 cannot see the video. Can you give me more info because for me it runs without issues on my pixel. There should be some logs in logcat
Sorry @remonh87 here the video and logs. Video:
Logs:
✓ Built build/app/outputs/flutter-apk/app-release.apk (17.3MB).
Flutter run key commands.
h List all available interactive commands.
c Clear the screen
q Quit (terminate the application on the device).
E/flutter (30569): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, Binary XML file line #39 in com.flutter.stripe.example:layout/stripe_card_input_widget: Binary XML file line #39 in com.flutter.stripe.example:layout/stripe_card_input_widget: Error inflating class com.google.android.material.textfield.TextInputLayout, null, android.view.InflateException: Binary XML file line #39 in com.flutter.stripe.example:layout/stripe_card_input_widget: Binary XML file line #39 in com.flutter.stripe.example:layout/stripe_card_input_widget: Error inflating class com.google.android.material.textfield.TextInputLayout
E/flutter (30569): Caused by: android.view.InflateException: Binary XML file line #39 in com.flutter.stripe.example:layout/stripe_card_input_widget: Error inflating class com.google.android.material.textfield.TextInputLayout
E/flutter (30569): Caused by: java.lang.reflect.InvocationTargetException
E/flutter (30569): at java.lang.reflect.Constructor.newInstance0(Native Method)
E/flutter (30569): at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
E/flutter (30569): at android.view.LayoutInflater.createView(LayoutInflater.java:852)
E/flutter (30569): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1004)
E/flutter (30569): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:959)
E/flutter (30569): at android.view.LayoutInflater.rInflate(LayoutInflater.java:1121)
E/flutter (30569): at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1082)
E/flutter (30569): at android.view.LayoutInflater.rInflate(LayoutInflater.java:1124)
E/flutter (30569): at android.view.LayoutInflater.inflate(LayoutInflater.java:654)
E/flutter (30569): at android.view.LayoutInflater.inflate(LayoutInflater.java:532)
E/flutter (30569): at android.view.LayoutInflater.inflate(LayoutInflater.java:479)
E/flutter (30569): at n9.l.c(SourceFile:1)
E/flutter (30569): at com.stripe.android.view.j0.<init>(SourceFile:1)
E/flutter (30569): at com.stripe.android.view.j0.<init>(SourceFile:2)
E/flutter (30569): at p8.p.<init>(SourceFile:1)
E/flutter (30569): at p8.q.c(SourceFile:1)
E/flutter (30569): at e5.h.<init>(SourceFile:1)
E/flutter (30569): at e5.i.a(SourceFile:1)
E/flutter (30569): at io.flutter.plugin.platform.e0.M(SourceFile:1)
E/flutter (30569): at io.flutter.plugin.platform.e0$a.b(SourceFile:1)
E/flutter (30569): at je.l$a.c(SourceFile:1)
E/flutter (30569): at je.l$a.d(SourceFile:1)
E/flutter (30569): at ke.i$a.a(SourceFile:1)
E/flutter (30569): at ce.c.h(SourceFile:1)
E/flutter (30569): at ce.c.i(SourceFile:1)
E/flutter (30569): at ce.c.e(SourceFile:1)
E/flutter (30569): at ce.b.run(SourceFile:1)
E/flutter (30569): at android.os.Handler.handleCallback(Handler.java:938)
E/flutter (30569): at android.os.Handler.dispatchMessage(Handler.java:99)
E/flutter (30569): at android.os.Looper.loop(Looper.java:250)
E/flutter (30569): at android.app.ActivityThread.main(ActivityThread.java:7806)
E/flutter (30569): at java.lang.reflect.Method.invoke(Native Method)
E/flutter (30569): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/flutter (30569): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:958)
E/flutter (30569): Caused by: java.lang.IncompatibleClassChangeError: Class 'android.content.res.XmlBlock$Parser' does not implement interface 'th.a' in call to 'int th.a.next()' (declaration of 'androidx.core.content.res.c' appears in /data/app/~~KFM4rXT314r-Vw_5R-kvCw==/com.flutter.stripe.example-p16mJ944pKy_dMQi5bt9IQ==/base.apk)
E/flutter (30569): at androidx.core.content.res.c.a(SourceFile:1)
E/flutter (30569): at androidx.core.content.res.h.k(SourceFile:1)
E/flutter (30569): at androidx.core.content.res.h.d(SourceFile:1)
E/flutter (30569): at androidx.core.content.a.c(SourceFile:1)
E/flutter (30569): at g.a.a(SourceFile:1)
E/flutter (30569): at x6.c.b(SourceFile:1)
E/flutter (30569): at com.google.android.material.textfield.z.i(SourceFile:1)
E/flutter (30569): at com.google.android.material.textfield.z.<init>(Unknown Source:63)
E/flutter (30569): at com.google.android.material.textfield.TextInputLayout.<init>(SourceFile:2)
E/flutter (30569): at com.google.android.material.textfield.TextInputLayout.<init>(SourceFile:1)
E/flutter (30569): ... 34 more
E/flutter (30569): )
E/flutter (30569): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651)
E/flutter (30569): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:322)
E/flutter (30569): <asynchronous suspension>
E/flutter (30569): #2 ExpensiveAndroidViewController._sendCreateMessage (package:flutter/src/services/platform_views.dart:1081)
E/flutter (30569): <asynchronous suspension>
E/flutter (30569): #3 AndroidViewController.create (package:flutter/src/services/platform_views.dart:804)
E/flutter (30569): <asynchronous suspension>
E/flutter (30569):
Here flutter doctor
@kekko7072 this has to do with the fact that you do not follow the installation guidelines for the theme. Can you make sure you apply these settings and try it again?
@kekko7072 this has to do with the fact that you do not follow the installation guidelines for the theme. Can you make sure you apply these settings and try it again?
@remonh87 thanks for the response. I tested the example app of the flutter_stripe package and in debug mode it is working but in release mode it's not, like my own app.
I followed and added all setup requirements, i think it's something broke in release mode.
@jonasbark I can reproduce it in the example app. Can you have a look at it? Seems like something broke in the last sync.
I was able to reproduce it as well, but have not found a solution. Only (bad) workaround would be to disable minification and resource shrinking during release builds:
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
It's likely a proguard issue, but I have not found the entries to add as of yet.
9.6.0
Any update? I'm using flutter_stripe: ^10.0.0 but on Android with dark theme the problem persists
Also looking for an update ASAP
I am using version 10.1.0 and I have the same problem, both in debug and realase. Any help? I have configured the theme as shown in the example (copy and paste), in build.gradle I have the same versions as in the example but nothing.
Using v10.1.1, and I have the same issue with the CardFormField
: it throws and leave a blank. CardField
works fine.
@jonasbark do you have an update on this? I remember you took a look at it.
Same issue, some times I need to add spaces on the top and bottom of CardField widget
Describe the bug Our Flutter app uses: flutter_stripe: ^9.1.1. We use the CardField widget. It has been working perfectly, except we now have a user who has experienced the CardField widget as blank, instead of the little credit card icon, and the hint/label text. We have minimum sdk set as 21. I notice that when I am debugging (and the CardField is working) I still see some items in the debug log as per this link: https://github.com/flutter-stripe/flutter_stripe/issues/219, it doesnt seem to impact the CardField widget for me, but may be the cause of the issue for the user.
To Reproduce I haven't been able to reproduce the error, but I have attached a screenshot. The user has cleared app cache, uninstalled and reinstalled app, etc, etc. I have added a screenshot of the experience.
Expected behavior The CardField widget appears normally.
Smartphone / tablet
Additional context Screenshot attached.