AppsFlyerSDK / appsflyer-flutter-plugin

Flutter Plugin for AppsFlyer SDK
MIT License
142 stars 111 forks source link

Error in the Android platform #265

Open jopmiddelkamp opened 1 year ago

jopmiddelkamp commented 1 year ago

Describe the bug I see this in my crash logger.

I’m seeing this error in my crash log for our Android app.

Fatal Exception: java.lang.Error: java.lang.IllegalAccessException: Class java.lang.Class<java.lang.reflect.Method> cannot access protected  method java.lang.Class com.appsflyer.internal.AFa1xSDK$$.loadClass(java.lang.String, boolean) of class java.lang.Class<com.appsflyer.internal.AFa1xSDK$$>
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1168)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
       at java.lang.Thread.run(Thread.java:764)

Caused by java.lang.IllegalAccessException: Class java.lang.Class<java.lang.reflect.Method> cannot access protected  method java.lang.Class com.appsflyer.internal.AFa1xSDK$$.loadClass(java.lang.String, boolean) of class java.lang.Class<com.appsflyer.internal.AFa1xSDK$$>
       at java.lang.reflect.Method.invokeImpl(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:411)
       at com.appsflyer.internal.AFa1xSDK$$.AFInAppEventType(:100)
       at com.appsflyer.internal.AFa1xSDK$$.AFInAppEventParameterName(:26)
       at java.lang.reflect.Method.invokeImpl(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:411)
       at com.appsflyer.internal.AFa1vSDK.AFInAppEventParameterName(:126)
       at com.appsflyer.internal.AFc1kSDK.AFInAppEventType(:35)
       at com.appsflyer.internal.AFd1cSDK.AFInAppEventParameterName(:265)
       at com.appsflyer.internal.AFd1iSDK.valueOf(:25)
       at com.appsflyer.internal.AFd1pSDK$5.run(:154)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
       at java.lang.Thread.run(Thread.java:764)

To Reproduce

Expected behavior This should not show in our logging.

Screenshots

Smartphone (please complete the following information):

image

and

image

Additional context

appsflyer_sdk:
    dependency: transitive
    description:
      name: appsflyer_sdk
      sha256: "48d5ef435b5f34de2f9b54f71200d9243a5b23b493f16f53a750ddf7396c3d5d"
      url: https://pub.dev/
    source: hosted
    version: "6.10.3"
github-actions[bot] commented 1 year ago

👋 Hi @jopmiddelkamp and Thank you for reaching out to us. In order for us to provide optimal support, please submit a ticket to our support team at support@appsflyer.com. When submitting the ticket, please specify:

hc-kim commented 11 months ago

@jopmiddelkamp I experienced the same issue, and the cause was that a boolean value was passed as a value in the Map parameter when you call logEvent. According to the error log, Appsflyer only supports string or numeric values.

roblframpton commented 11 months ago

This issue was a bug in the Android version which has just been fixed. We need to wait on a new release of the Flutter SDK however.