dynamitechetan / razorpay_flutter

A flutter plugin for integrating razorpay payment gateway. Supports Android and iOS.
Other
31 stars 16 forks source link

App Crashing in Android on startPayment #9

Closed shyjuzz closed 5 years ago

shyjuzz commented 5 years ago

I have tried to integrate the plugin. Unfortunately, the app crashes with the following exception

I/WebViewFactory(32008): Loading com.google.android.webview version 69.0.3497.91 (code 349709100) I/art (32008): Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TracingControllerAdapter> I/art (32008): Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TracingControllerAdapter> I/cr_LibraryLoader(32008): Time to load native libraries: 16 ms (timestamps 4359-4375) E/cr_VariationsUtils(32008): Failed reading seed file "/data/user/0/com.example.consumersample/app_webview/variations_seed_new": /data/user/0/com.example.consumersample/app_webview/variations_seed_new: open failed: ENOENT (No such file or directory) I/chromium(32008): [INFO:library_loader_hooks.cc(36)] Chromium logging enabled: level = 0, default verbosity = 0 I/cr_LibraryLoader(32008): Expected native library version number "69.0.3497.91", actual native library version number "69.0.3497.91" I/cr_BrowserStartup(32008): Initializing chromium process, singleProcess=true I/chromium(32008): [INFO:aw_field_trial_creator.cc(54)] First-WebView-Experiment not found W/cr_media(32008): Requires BLUETOOTH permission E/libEGL (32008): validate_display:255 error 3008 (EGL_BAD_DISPLAY) E/chromium(32008): [ERROR:gl_surface_egl.cc(335)] eglChooseConfig failed with error EGL_BAD_ATTRIBUTE W/AudioCapabilities(32008): Unsupported mime audio/ima-adpcm W/AudioCapabilities(32008): Unsupported mime audio/mpeg-L1 W/AudioCapabilities(32008): Unsupported mime audio/mpeg-L2 I/Choreographer(32008): Skipped 40 frames! The application may be doing too much work on its main thread. W/VideoCapabilities(32008): Unrecognized profile/level 32768/2 for video/mp4v-es W/VideoCapabilities(32008): Unsupported mime video/mjpg I/VideoCapabilities(32008): Unsupported profile 4 for video/mp4v-es W/VideoCapabilities(32008): Unrecognized profile/level 0/0 for video/mpeg2 W/VideoCapabilities(32008): Unrecognized profile/level 0/2 for video/mpeg2 W/VideoCapabilities(32008): Unrecognized profile/level 0/3 for video/mpeg2 I/VideoCapabilities(32008): Unsupported profile 4 for video/mp4v-es W/cr_MediaCodecUtil(32008): HW encoder for video/avc is not available on this device. I/art (32008): Background sticky concurrent mark sweep GC freed 6080(339KB) AllocSpace objects, 0(0B) LOS objects, 21% free, 1672KB/2MB, paused 23.712ms total 96.221ms E/chromium(32008): [ERROR:gl_surface_egl.cc(335)] eglChooseConfig failed with error EGL_BAD_ATTRIBUTE I/Choreographer(32008): Skipped 38 frames! The application may be doing too much work on its main thread. D/AndroidRuntime(32008): Shutting down VM E/AndroidRuntime(32008): FATAL EXCEPTION: main E/AndroidRuntime(32008): Process: com.example.consumersample, PID: 32008 E/AndroidRuntime(32008): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.consumersample/com.razorpay.CheckoutActivity}: java.lang.StringIndexOutOfBoundsException: length=4; regionStart=0; regionLength=8 E/AndroidRuntime(32008): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2417) E/AndroidRuntime(32008): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2477) E/AndroidRuntime(32008): at android.app.ActivityThread.-wrap11(ActivityThread.java) E/AndroidRuntime(32008): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1345) E/AndroidRuntime(32008): at android.os.Handler.dispatchMessage(Handler.java:102) E/AndroidRuntime(32008): at android.os.Looper.loop(Looper.java:148) E/AndroidRuntime(32008): at android.app.ActivityThread.main(ActivityThread.java:5438) E/AndroidRuntime(32008): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(32008): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:762) E/AndroidRuntime(32008): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:652) E/AndroidRuntime(32008): Caused by: java.lang.StringIndexOutOfBoundsException: length=4; regionStart=0; regionLength=8 E/AndroidRuntime(32008): at java.lang.String.startEndAndLength(String.java:298) E/AndroidRuntime(32008): at java.lang.String.substring(String.java:1087) E/AndroidRuntime(32008): at com.razorpay.AnalyticsUtil.getKeyType(:223) E/AndroidRuntime(32008): at com.razorpay.AnalyticsUtil.setAppDetails(:212) E/AndroidRuntime(32008): at com.razorpay.AnalyticsUtil.setup(:52) E/AndroidRuntime(32008): at com.razorpay.l__d$.setOptions(:11048) E/AndroidRuntime(32008): at com.razorpay.b__J_.onCreate(:96) E/AndroidRuntime(32008): at com.razorpay.E$_6$.onCreate(:23) E/AndroidRuntime(32008): at com.razorpay.CheckoutActivity.onCreate(:8) E/AndroidRuntime(32008): at android.app.Activity.performCreate(Activity.java:6251) E/AndroidRuntime(32008): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110) E/AndroidRuntime(32008): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2370) E/AndroidRuntime(32008): ... 9 more

taraka91 commented 5 years ago

i am also getting same error after current build updated to androidX. it is not supporting androidx and app is getting crashed when calling razorpay code with the above error.

Please post the solution , if you have solved this.

dynamitechetan commented 5 years ago

please update the plugin to latest version. i've fixed the androidX issue.