razorpay / razorpay-flutter

Razorpay Flutter Plugin
MIT License
108 stars 149 forks source link

Razor pay CheckoutBridge.sendAnalyticsData Error #371

Closed Umang18009 closed 6 months ago

Umang18009 commented 9 months ago

i am using razorpay_flutter: ^1.3.6 in my application, whenever i tap Pay Now button at that time Razorpay was crashed

Description

Error : Uncaught TypeError: CheckoutBridge.sendAnalyticsData is not a function", source: https://api.razorpay.com/v1/checkout/public?version=1.6.36&library=checkoutjs&platform=android&session_token=B10F34CC5144455C56D51B5CC1BCCA46242B94F14B0B75CFA52A82CA8A152BCFD35208AFC9679975EDD0B7DBE63D76C8097B6E1E412AADAAD6FD53C12EA1EFCEE9EABB60DCF011630715CAA2220D3A84862E63DEC77C54899810DA4F7309BC221AFB25FBF87EF61E68CA4701D6E8EE47634D62F9F88F90A34271F547A595E79B3B721C289B3487AB7583AF29C3425FDB78E206&traffic_env=production (1)

Code : Map<String,dynamic> _razorPayOptions = { 'key': 'NfRvtDt3Gxxffr', 'amount': 100, 'name': 'Acme Corp.', 'description': 'Fine T-Shirt',}; _razorpay.open(_razorPayOptions);

Flutter Version :

3.19.0

vivekshindhe commented 9 months ago

@Umang18009 There should be another reason for the crash that you can find in the logs. This is not a Fatal exception. Can you please share that?

codingstark-dev commented 8 months ago

Getting same error

E/com.razorpay.checkout( 5542): Webview JS Error: Uncaught TypeError: CheckoutBridge.sendAnalyticsData is not a function
I/chromium( 5542): [INFO:CONSOLE(1)] "Uncaught TypeError: CheckoutBridge.sendAnalyticsData is not a function", source: https://api.razorpay.com/v1/checkout/public?version=1.6.36&library=checkoutjs&platform=android&session_token=98C4FABC558089950290D4559183A0E4998D82F05E457107712E8702A9E2BB788468ED0B0387BD282C61668F7512D18A076B69A27E7BD9B09C5248112E78441EE194176624E84819CE67650DA0C098B06998D4AF529B20C5AA4024AB109620F0B67894D32AA7EF9E897D77DE12FA66F1149AEBF34570D7000C75DCD2EAC484A0331E21B6847CA4D80BF3E8B028E6C33&traffic_env=canary (1)
D/AppSignatureHelper( 5542): pkg: com.example.xyz-- hash: DVvfO6rxx
D/Apps    ( 5542): 0
E/flutter ( 5542): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'String' is not a subtype of type 'Map<dynamic, dynamic>?' in type cast
E/flutter ( 5542): #0      PaymentFailureResponse.fromMap (package:razorpay_flutter/razorpay_flutter.dart:151:44)
E/flutter ( 5542): #1      Razorpay._handleResult (package:razorpay_flutter/razorpay_flutter.dart:72:42)
E/flutter ( 5542): #2      Razorpay.open (package:razorpay_flutter/razorpay_flutter.dart:54:5)
E/flutter ( 5542): <asynchronous suspension>
E/flutter ( 5542): 
saivikasdev commented 8 months ago

IS THAT FIX BUDDY??

JayDropOn commented 8 months ago

I am facing the same issue.

NiteshZennaxx commented 8 months ago

i am also facing same issue that @Umang18009 has mentioned.

tusharuit25 commented 8 months ago

what is this issue all about when app opened in dubug mode it works but not in release mode.

JAYDEEPAD commented 7 months ago

i have same issue please solve it and give code public

afradahsan commented 7 months ago

Facing a similar error. Please suggest a solution.

E/com.razorpay.checkout( 2852): Webview JS Error: Uncaught TypeError: CheckoutBridge.sendAnalyticsData is not a function
I/chromium( 2852): [INFO:CONSOLE(1)] "Uncaught TypeError: CheckoutBridge.sendAnalyticsData is not a function", 
source: https://api.razorpay.com/v1/checkout/public?version=1.6.38&library=checkoutjs&platform=android&session_token=C198C3700FE7579038191AF16FC5309CBB880F1FCE87EC323E7399566B3C430B70C80CF7C1EE0CD26C68793875893A9000F76A762EB52F3B8982EA94913BE899ECB79B0E6495ED19EB685C0F0C539DBDB12E3765D1612F610174CF8DFC38704F7AC0CB6DAF1CF46D395BDCBDE8EBFBC636D5B978D8AA11DEDCC9DC5CF79F2BB8F750CF337DE316A01B6206F2B71BF5DE850115&traffic_env=production (1)
shibakar commented 6 months ago

Any solution to this ?

Umang18009 commented 6 months ago

@all

Using below code, mine issued has been resolved. i have been just changed API key.


                var options = {
                  'key': 'rzp_test_xxxxxxxxxxxxxx',
                  'amount': 100,
                  'name': 'XXXXXXX',
                  'description': 'XXXXXXX',
                  'retry': {'enabled': true, 'max_count': 1},
                  'send_sms_hash': true,
                  'theme': {'color': '#01806F'},
                  'prefill': {
                    'contact': '+91XXXXXXXXXX',
                    'email': 'XXXX@gmail.com'
                  },
                  'external': {
                    'wallets': ['paytm']
                  },
                  'checkout':{
                    "name": "XXXXXXX"
                  }
                };
                razorpay.on(
                    Razorpay.EVENT_PAYMENT_ERROR, handlePaymentErrorResponse);
                razorpay.on(Razorpay.EVENT_PAYMENT_SUCCESS,
                    handlePaymentSuccessResponse);
                razorpay.on(Razorpay.EVENT_EXTERNAL_WALLET,
                    handleExternalWalletSelected);
                razorpay.open(options);
Umang18009 commented 6 months ago

@Umang18009 There should be another reason for the crash that you can find in the logs. This is not a Fatal exception. Can you please share that?

i have solved that 😊, Thank You.

Umang18009 commented 6 months ago

Any solution to this ?

just use different API key and try it again.

TechPradheep commented 1 month ago

Webview JS Error: Uncaught TypeError: CheckoutBridge.sendAnalyticsData is not a function I/chromium( 6590): [INFO:CONSOLE(1)] "Uncaught TypeError: CheckoutBridge.sendAnalyticsData is not a function", source: https://api.razorpay.com/v1/checkout/public?version=1.6.40&library=checkoutjs&platform=android&session_token=84EF51BA263D3A628C9808AF58D5AA8DDAC74E7207B874CD308417E256EAA28144B0DDA0032E13B923047096BFAA2EB2451DC6D60C51423AA1DAD2CAD3649E0A381CCA938AC6ADE0375E34BCB3DB38F7475E714C651C566CE73AD13B0072E9FD89BF8AF4512452CB&traffic_env=production (1)

Anyone fixed this issue

TechPradheep commented 1 month ago

@Umang18009 There should be another reason for the crash that you can find in the logs. This is not a Fatal exception. Can you please share that?

i have solved that 😊, Thank You.

How to fixed the issue explain it please

Shiba-Kar commented 1 month ago

@ALL

Using below code, mine issued has been resolved. i have been just changed API key.

                var options = {
                  'key': 'rzp_test_xxxxxxxxxxxxxx',
                  'amount': 100,
                  'name': 'XXXXXXX',
                  'description': 'XXXXXXX',
                  'retry': {'enabled': true, 'max_count': 1},
                  'send_sms_hash': true,
                  'theme': {'color': '#01806F'},
                  'prefill': {
                    'contact': '+91XXXXXXXXXX',
                    'email': 'XXXX@gmail.com'
                  },
                  'external': {
                    'wallets': ['paytm']
                  },
                  'checkout':{
                    "name": "XXXXXXX"
                  }
                };
                razorpay.on(
                    Razorpay.EVENT_PAYMENT_ERROR, handlePaymentErrorResponse);
                razorpay.on(Razorpay.EVENT_PAYMENT_SUCCESS,
                    handlePaymentSuccessResponse);
                razorpay.on(Razorpay.EVENT_EXTERNAL_WALLET,
                    handleExternalWalletSelected);
                razorpay.open(options);

rzp_test this is test keys it works but not rzp_live keys

NibeditaSaha002 commented 3 weeks ago

Facing a similar error. Please suggest a solution.

E/com.razorpay.checkout( 2852): Webview JS Error: Uncaught TypeError: CheckoutBridge.sendAnalyticsData is not a function
I/chromium( 2852): [INFO:CONSOLE(1)] "Uncaught TypeError: CheckoutBridge.sendAnalyticsData is not a function", 
source: https://api.razorpay.com/v1/checkout/public?version=1.6.38&library=checkoutjs&platform=android&session_token=C198C3700FE7579038191AF16FC5309CBB880F1FCE87EC323E7399566B3C430B70C80CF7C1EE0CD26C68793875893A9000F76A762EB52F3B8982EA94913BE899ECB79B0E6495ED19EB685C0F0C539DBDB12E3765D1612F610174CF8DFC38704F7AC0CB6DAF1CF46D395BDCBDE8EBFBC636D5B978D8AA11DEDCC9DC5CF79F2BB8F750CF337DE316A01B6206F2B71BF5DE850115&traffic_env=production (1)

heyy have you fix this???

JadhavC07 commented 2 weeks ago

Facing same issue here => E/com.razorpay.checkout(19285): Webview JS Error: Uncaught TypeError: CheckoutBridge.sendAnalyticsData is not a function I/chromium(19285): [INFO:CONSOLE(1)] "Uncaught TypeError: CheckoutBridge.sendAnalyticsData is not a function", source: https://api.razorpay.com/v1/checkout/public?version=1.6.40&library=checkoutjs&platform=android&session_token=8FBBE2E9A46A8487E0B1778FBC77FF02969F200D60A5536466A87B1DC370F10C4B5EB5118A03159B865D95BA8667A6378243CB16B8A4C886DECAA59E327F946CDA0457744E8D8083D00F0BCFDC448AEF843A03ED9DF3EBF9D4BFABD1FCF1633F4C455ADBAB72F7D5&traffic_env=production (1)

Shiba-Kar commented 2 weeks ago

Facing same issue here => E/com.razorpay.checkout(19285): Webview JS Error: Uncaught TypeError: CheckoutBridge.sendAnalyticsData is not a function I/chromium(19285): [INFO:CONSOLE(1)] "Uncaught TypeError: CheckoutBridge.sendAnalyticsData is not a function", source: https://api.razorpay.com/v1/checkout/public?version=1.6.40&library=checkoutjs&platform=android&session_token=8FBBE2E9A46A8487E0B1778FBC77FF02969F200D60A5536466A87B1DC370F10C4B5EB5118A03159B865D95BA8667A6378243CB16B8A4C886DECAA59E327F946CDA0457744E8D8083D00F0BCFDC448AEF843A03ED9DF3EBF9D4BFABD1FCF1633F4C455ADBAB72F7D5&traffic_env=production (1)

411 repost here