-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lottie-splashscreen is not working with Ionic5 Capacitor 2.0.0-beta.1 #188
Comments
Capacitor is not supported. |
Any pointers on how to get Lottie to work with Capacitor 2.0 as a splash screen? |
I haven't tried Capacitor yet. No clue if they support installing native dependencies (lottie-ios and lottie-android) which are required for this plugin to function. Kotlin and Swift are supported out of the box AFAIK, so the hooks for Android are no problem. Since this is a Cordova plugin, it should work, at least the documentation says so. On a personal side note: Capacitor has a very low priority for me, given that I really dislike Ionic's business model and behavior within the Cordova ecosystem and community. This means: selling an overpriced product made by a non-profit organization while giving nothing back to the original open source projects. This includes delegating their paying customers to Apache's support channels expecting that the maintainers (all unpaid volunteers) fix the bugs, while Ionic makes a sh*ton of 💰💰. |
It should have solution |
@timbru31 is this capable of being fixed in capacitor? |
There is a bug in Capacitor: #224 (comment) |
Good news, I've fixed the capacitor bug and it's included in v3.0.0-alpha.13 and v2.4.6 (at least for iOS) |
hi @timbru31, Is the android part functional too with capacitor ? |
@Jrbebel It should compile, yes. But it's untested from my side. Feel free to open a new issue if things are broken |
@timbru31 i will create a ticket for my problem on android |
having the same issue on android. Is there any solution to make it work with capacitor? |
Having same issue any solution to work in android |
Facing the same issue still. Any Updates? |
Hi, we are facing the same issue. Any news on this? Or a workaround? |
Hi, too bad, the project seems to be dead ... |
I found the solution |
timbru31 Thank you folks for the great work! We also never use Ionic-capacitor, always sticking to cordova last 9 years! And sometimes native. Does the lottie work for Android 33? I am trying now. |
Bug report
Androidx project crash after including this plugin, Is this compatible with Ionic5 Capacitor 2.0.0-beta.1?
What steps will reproduce the problem?
create blank Ionic5 project with capacitor 2.0.0-beta.1
and install plugin using following commands
npm install cordova-plugin-lottie-splashscreen
npm install @ionic-native/lottie-splash-screen
ionic cap sync
What do you see instead?
Application crashed.
Log file of the issue/error
Launching 'app' on Nexus 5X API 29 x86.
$ adb shell am start -n "io.ionic.starter/io.ionic.starter.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 18156 on device 'Nexus_5X_API_29_x86 [emulator-5554]'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
W/FirebaseApp: Default FirebaseApp failed to initialize because no default options were found. This usually means that com.google.gms:google-services was not applied to your gradle project.
I/FirebaseInitProvider: FirebaseApp initialization unsuccessful
D/libEGL: Emulator has host GPU support, qemu.gles is set to 1.
W/libc: Unable to set property "qemu.gles" to "1": connection failed; errno=13 (Permission denied)
W/RenderThread: type=1400 audit(0.0:44): avc: denied { write } for name="property_service" dev="tmpfs" ino=8412 scontext=u:r:untrusted_app:s0:c136,c256,c512,c768 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0 app=io.ionic.starter
D/libEGL: loaded /vendor/lib/egl/libEGL_emulation.so
D/libEGL: loaded /vendor/lib/egl/libGLESv1_CM_emulation.so
D/libEGL: loaded /vendor/lib/egl/libGLESv2_emulation.so
E/o.ionic.starte: Invalid ID 0x00000000.
W/o.ionic.starte: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed)
W/o.ionic.starte: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed)
I/WebViewFactory: Loading com.google.android.webview version 74.0.3729.185 (code 373018518)
I/o.ionic.starte: The ClassLoaderContext is a special shared library.
I/o.ionic.starte: The ClassLoaderContext is a special shared library.
I/cr_LibraryLoader: Time to load native libraries: 22 ms (timestamps 2982-3004)
E/o.ionic.starte: Invalid ID 0x00000000.
E/o.ionic.starte: Invalid ID 0x00000000.
I/chromium: [INFO:library_loader_hooks.cc(50)] Chromium logging enabled: level = 0, default verbosity = 0
I/cr_LibraryLoader: Expected native library version number "74.0.3729.185", actual native library version number "74.0.3729.185"
W/cr_ChildProcLH: Create a new ChildConnectionAllocator with package name = com.google.android.webview, sandboxed = true
W/o.ionic.starte: Accessing hidden method Landroid/content/Context;->bindServiceAsUser(Landroid/content/Intent;Landroid/content/ServiceConnection;ILandroid/os/Handler;Landroid/os/UserHandle;)Z (greylist, reflection, allowed)
I/cr_BrowserStartup: Initializing chromium process, singleProcess=false
W/o.ionic.starte: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->(Landroid/content/Context;I)V (greylist, reflection, allowed)
W/o.ionic.starte: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->logEvent(Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;)V (greylist, reflection, allowed)
Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionStarted(I)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed)
Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(II)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed)
Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed)
Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextSelection;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed)
Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(III)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed)
Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(IIILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed)
D/Capacitor: Starting BridgeActivity
W/System.err: java.lang.ClassNotFoundException: de.dustplanet.cordova.lottie.LottieSplashScreen
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:454)
at java.lang.Class.forName(Class.java:379)
at org.apache.cordova.PluginManager.instantiatePlugin(PluginManager.java:489)
at org.apache.cordova.PluginManager.getPlugin(PluginManager.java:169)
at org.apache.cordova.PluginManager.startupPlugins(PluginManager.java:97)
at org.apache.cordova.PluginManager.init(PluginManager.java:86)
at com.getcapacitor.cordova.MockCordovaWebViewImpl.init(MockCordovaWebViewImpl.java:62)
W/System.err: at com.getcapacitor.BridgeActivity.load(BridgeActivity.java:75)
at com.getcapacitor.BridgeActivity.init(BridgeActivity.java:58)
at io.ionic.starter.MainActivity.onCreate(MainActivity.java:16)
at android.app.Activity.performCreate(Activity.java:7802)
at android.app.Activity.performCreate(Activity.java:7791)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1299)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
W/System.err: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
W/System.err: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
W/System.err: at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
W/System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "de.dustplanet.cordova.lottie.LottieSplashScreen" on path: DexPathList[[zip file "/data/app/io.ionic.starter-yHMXLiK_IEzB6nqAyvgSxg==/base.apk"],nativeLibraryDirectories=[/data/app/io.ionic.starter-yHMXLiK_IEzB6nqAyvgSxg==/lib/x86, /system/lib, /system/product/lib]]
W/System.err: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 26 more
I/System.out: Error adding plugin de.dustplanet.cordova.lottie.LottieSplashScreen.
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
Process: io.ionic.starter, PID: 18156
java.lang.RuntimeException: Unable to start activity ComponentInfo{io.ionic.starter/io.ionic.starter.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CordovaPlugin.privateInitialize(java.lang.String, org.apache.cordova.CordovaInterface, org.apache.cordova.CordovaWebView, org.apache.cordova.CordovaPreferences)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3270)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CordovaPlugin.privateInitialize(java.lang.String, org.apache.cordova.CordovaInterface, org.apache.cordova.CordovaWebView, org.apache.cordova.CordovaPreferences)' on a null object reference
at org.apache.cordova.PluginManager.getPlugin(PluginManager.java:171)
at org.apache.cordova.PluginManager.startupPlugins(PluginManager.java:97)
at org.apache.cordova.PluginManager.init(PluginManager.java:86)
at com.getcapacitor.cordova.MockCordovaWebViewImpl.init(MockCordovaWebViewImpl.java:62)
at com.getcapacitor.BridgeActivity.load(BridgeActivity.java:75)
at com.getcapacitor.BridgeActivity.init(BridgeActivity.java:58)
at io.ionic.starter.MainActivity.onCreate(MainActivity.java:16)
at android.app.Activity.performCreate(Activity.java:7802)
at android.app.Activity.performCreate(Activity.java:7791)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1299)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Version information
@ionic-native/lottie-splash-screen: 5.23.0
cordova-plugin-lottie-splashscreen: 0.8.0
@capacitor/core:2.0.0-beta.1
capacitor/cli: 2.0.0-beta.1
@capacitor/android: ^2.0.0-beta.1
@ionic-native/core: 5.0.0
Android Studio 3.6.1
Checklist
The text was updated successfully, but these errors were encountered: