react-native-skottie icon indicating copy to clipboard operation
react-native-skottie copied to clipboard

Skottie crashes on release builds on Android, adding proguard rule stops it from building a release apk

Open ISnowFoxI opened this issue 9 months ago • 5 comments

The app crashes as soon as you navigate to a page where there is a Skottie component. This was happening on Android. Ios worked fine. Let me know if you need extra logs or anything.

React code:

import cameraPermission from './cameraPermission.json';
...
 <Skottie
  style={styles.animationStyle}
  source={micPermission}
  autoPlay
  loop
  resizeMode="contain"
/>

Sentry report:

Exception in HostFunction: java.lang.NoSuchMethodError: no non-static method "Lcom/skiaskottie/DotLottieReader;.readDotLottie(Ljava/lang/String;)Ljava/lang/String;

LogCat specifically for the release apk:

  
E  FATAL EXCEPTION: mqt_native_modules
Process: com.xxx.xxx, PID: 26091
com.facebook.react.common.JavascriptException: Error: Exception in HostFunction: java.lang.NoSuchMethodError: no non-static method "Lcom/skiaskottie/DotLottieReader;.readDotLottie(Ljava/lang/String;)Ljava/lang/String;", js engine: hermes, stack:
callNativeSyncHook@1:101483
nonPromiseMethodWrapper@1:98493
anonymous@1:2612919
loadModuleImplementation@1:75222
guardedLoadModule@1:74764
metroRequire@1:74386
anonymous@1:2612067
loadModuleImplementation@1:75222
guardedLoadModule@1:74721
metroRequire@1:74386
PermissionsRequired@1:2611442
renderWithHooks@1:364797
beginWork$1@1:406649
performUnitOfWork@1:393234
workLoopSync@1:393094
renderRootSync@1:392975
performSyncWorkOnRoot@1:390366
flushSyncCallbacks@1:354441
batchedUpdatesImpl@1:407047
batchedUpdates@1:347251
_receiveRootNodeIDEvent@1:347536
receiveTouches@1:401729
__callFunction@1:102741
anonymous@1:101046
__guard@1:102002
callFunctionReturnFlushedQueue@1:101004

at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(SourceFile:76)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(SourceFile:143)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(SourceFile:22)
at com.facebook.jni.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(SourceFile:1)
at android.os.Looper.loopOnce(Looper.java:211)
at android.os.Looper.loop(Looper.java:300)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(SourceFile:38)
at java.lang.Thread.run(Thread.java:1012)

ISnowFoxI avatar May 17 '24 12:05 ISnowFoxI