Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Crash on SO Loader #657

Open
1 task done
Junaid-Sakib opened this issue May 6, 2020 · 7 comments
Open
1 task done

Crash on SO Loader #657

Junaid-Sakib opened this issue May 6, 2020 · 7 comments

Comments

@Junaid-Sakib
Copy link

Junaid-Sakib commented May 6, 2020

Version

//Litho
implementation "com.facebook.litho:litho-core:$versions.lithoVersion"
implementation "com.facebook.litho:litho-widget:$versions.lithoVersion"
kapt "com.facebook.litho:litho-processor:$versions.lithoVersion"
implementation 'com.facebook.soloader:soloader:0.5.1'
implementation "com.facebook.litho:litho-fresco:$versions.lithoVersion"
testImplementation "com.facebook.litho:litho-testing:$versions.lithoVersion"
implementation "com.facebook.litho:litho-sections-core:$versions.lithoVersion"
implementation "com.facebook.litho:litho-sections-widget:$versions.lithoVersion"
compileOnly "com.facebook.litho:litho-sections-annotations:$versions.lithoVersion"
kapt "com.facebook.litho:litho-sections-processor:$versions.lithoVersion"

where lithoVersion = lithoVersion : '0.34.0'

Issues and Steps to Reproduce

generated from a prod app, stacktrace via Firebase.

Expected Behavior

Should not crash

Link to Code

Caused by java.lang.UnsatisfiedLinkError
couldn't find DSO to load: libyoga.so caused by: couldn't find DSO to load: libfb.so caused by: com.facebook.jni.HybridData$Destructor
com.facebook.soloader.SoLoader.doLoadLibraryBySoName (SoLoader.java:738)
com.facebook.soloader.SoLoader.loadLibraryBySoName (SoLoader.java:591)
com.facebook.soloader.SoLoader.loadLibrary (SoLoader.java:529)
com.facebook.soloader.SoLoader.loadLibrary (SoLoader.java:484)
com.facebook.yoga.YogaNative.<clinit> (YogaNative.java:15)
com.facebook.yoga.YogaNative.jni_YGConfigNew (YogaNative.java)
com.facebook.yoga.YogaConfig.<init> (YogaConfig.java:20)
com.facebook.yoga.YogaConfigFactory.create (YogaConfigFactory.java:5)
com.facebook.litho.yoga.LithoYogaFactory.createYogaConfig (LithoYogaFactory.java:26)
com.facebook.litho.NodeConfig.<clinit> (NodeConfig.java:45)
com.facebook.litho.InternalNodeUtils.create (InternalNodeUtils.java:26)
com.facebook.litho.Column.resolve (Column.java:90)
com.facebook.litho.Layout.create (Layout.java:167)
com.facebook.litho.Layout.create (Layout.java:119)
com.facebook.litho.Layout.createAndMeasureComponent (Layout.java:76)
com.facebook.litho.LayoutState.calculate (LayoutState.java:1444)
com.facebook.litho.ComponentTree$LayoutStateFuture.calculateLayoutStateInternal (ComponentTree.java:2456)
com.facebook.litho.ComponentTree$LayoutStateFuture.access$2700 (ComponentTree.java:2374)
com.facebook.litho.ComponentTree$LayoutStateFuture$1.call (ComponentTree.java:2434)
com.facebook.litho.ComponentTree$LayoutStateFuture$1.call (ComponentTree.java:2426)
java.util.concurrent.FutureTask.run (FutureTask.java:266)
com.facebook.litho.ComponentTree$LayoutStateFuture.runAndGet (ComponentTree.java:2545)
com.facebook.litho.ComponentTree.calculateLayoutState (ComponentTree.java:2339)
com.facebook.litho.ComponentTree.measure (ComponentTree.java:1061)
com.facebook.litho.LithoView.performLayout (LithoView.java:412)
com.facebook.litho.ComponentHost.onLayout (ComponentHost.java:799)
android.view.View.layout (View.java:22085)

This is not happening in my .apk bundle but aab bundle

@wooyukit
Copy link

wooyukit commented May 6, 2020

I have the same crash in my app. I can 100% reproduce by using emulator with android 8.0 version

@Junaid-Sakib
Copy link
Author

Junaid-Sakib commented May 6, 2020

For now adding: android.bundle.enableUncompressedNativeLibs=false to my gradle.properties seems to resolve the issue for me. With great hope I had added Litho to my production code, only to face this issue and a bit of disappointment.

@wooyukit
Copy link

wooyukit commented May 6, 2020

Thanks for your hints. Let me try tomorrow

@wooyukit
Copy link

wooyukit commented May 7, 2020

It works. Thanks again.

@wooyukit
Copy link

@Junaid-Sakib Please close the issue. Thanks

@Junaid-Sakib
Copy link
Author

Just to update here, with the above fix - I still got a crash on a Xaiomi device today.

Brand: Xiaomi
Model: MI 8
Orientation: Portrait
RAM free: 1.29 GB
Disk free: 78.14 GB
Operating System
Version: 10
Orientation: Portrait
Rooted: No

Caused by java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libyoga.so result: 0
       at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:825)
       at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:673)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:611)
       at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:559)
       at com.facebook.yoga.YogaNative.<clinit>(YogaNative.java:15)
       at com.facebook.yoga.YogaNative.jni_YGConfigNew(YogaNative.java)
       at com.facebook.yoga.YogaConfig.<init>(YogaConfig.java:20)
       at com.facebook.yoga.YogaConfigFactory.create(YogaConfigFactory.java:5)
       at com.facebook.litho.yoga.LithoYogaFactory.createYogaConfig(LithoYogaFactory.java:26)
       at com.facebook.litho.NodeConfig.<clinit>(NodeConfig.java:45)
       at com.facebook.litho.InternalNodeUtils.create(InternalNodeUtils.java:26)
       at com.facebook.litho.Row.resolve(Row.java:90)
       at com.facebook.litho.Layout.create(Layout.java:167)
       at com.facebook.litho.Layout.create(Layout.java:119)
       at com.facebook.litho.Layout.create(Layout.java:187)
       at com.facebook.litho.Layout.create(Layout.java:119)
       at com.facebook.litho.Layout.createAndMeasureComponent(Layout.java:76)
       at com.facebook.litho.LayoutState.calculate(LayoutState.java:1444)
       at com.facebook.litho.ComponentTree$LayoutStateFuture.calculateLayoutStateInternal(ComponentTree.java:2456)
       at com.facebook.litho.ComponentTree$LayoutStateFuture.access$2700(ComponentTree.java:2374)
       at com.facebook.litho.ComponentTree$LayoutStateFuture$1.call(ComponentTree.java:2434)
       at com.facebook.litho.ComponentTree$LayoutStateFuture$1.call(ComponentTree.java:2426)
       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
       at com.facebook.litho.ComponentTree$LayoutStateFuture.runAndGet(ComponentTree.java:2545)
       at com.facebook.litho.ComponentTree.calculateLayoutState(ComponentTree.java:2339)
       at com.facebook.litho.ComponentTree.measure(ComponentTree.java:1061)
       at com.facebook.litho.LithoView.performLayout(LithoView.java:412)
       at com.facebook.litho.ComponentHost.onLayout(ComponentHost.java:799)
       at android.view.View.layout(View.java:74)
       at android.view.ViewGroup.layout(ViewGroup.java:21)
       at androidx.viewpager.widget.ViewPager.onLayout(ViewPager.java:1775)
       at android.view.View.layout(View.java:74)
       at android.view.ViewGroup.layout(ViewGroup.java:21)
       at android.widget.LinearLayout.setChildFrame(LinearLayout.java:4)
       at android.widget.LinearLayout.layoutVertical(LinearLayout.java:196)
       at android.widget.LinearLayout.onLayout(LinearLayout.java:5)
       at android.view.View.layout(View.java:74)
       at android.view.ViewGroup.layout(ViewGroup.java:21)
       at android.widget.FrameLayout.layoutChildren(FrameLayout.java:166)
       at android.widget.FrameLayout.onLayout(FrameLayout.java:6)
       at android.view.View.layout(View.java:74)
       at android.view.ViewGroup.layout(ViewGroup.java:21)
       at android.widget.RelativeLayout.onLayout(RelativeLayout.java:42)
       at android.view.View.layout(View.java:74)
       at android.view.ViewGroup.layout(ViewGroup.java:21)
       at android.widget.FrameLayout.layoutChildren(FrameLayout.java:166)
       at android.widget.FrameLayout.onLayout(FrameLayout.java:6)
       at android.view.View.layout(View.java:74)
       at android.view.ViewGroup.layout(ViewGroup.java:21)
       at android.widget.FrameLayout.layoutChildren(FrameLayout.java:166)
       at android.widget.FrameLayout.onLayout(FrameLayout.java:6)
       at android.view.View.layout(View.java:74)
       at android.view.ViewGroup.layout(ViewGroup.java:21)
       at android.widget.LinearLayout.setChildFrame(LinearLayout.java:4)
       at android.widget.LinearLayout.layoutVertical(LinearLayout.java:196)
       at android.widget.LinearLayout.onLayout(LinearLayout.java:5)
       at android.view.View.layout(View.java:74)
       at android.view.ViewGroup.layout(ViewGroup.java:21)
       at android.widget.FrameLayout.layoutChildren(FrameLayout.java:166)
       at android.widget.FrameLayout.onLayout(FrameLayout.java:6)
       at android.view.View.layout(View.java:74)
       at android.view.ViewGroup.layout(ViewGroup.java:21)
       at android.widget.LinearLayout.setChildFrame(LinearLayout.java:4)
       at android.widget.LinearLayout.layoutVertical(LinearLayout.java:196)
       at android.widget.LinearLayout.onLayout(LinearLayout.java:5)
       at android.view.View.layout(View.java:74)
       at android.view.ViewGroup.layout(ViewGroup.java:21)
       at android.widget.FrameLayout.layoutChildren(FrameLayout.java:166)
       at android.widget.FrameLayout.onLayout(FrameLayout.java:6)
       at com.android.internal.policy.DecorView.onLayout(DecorView.java)
       at android.view.View.layout(View.java:74)
       at android.view.ViewGroup.layout(ViewGroup.java:21)
       at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:29)
       at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2331)
       at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:31)
       at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:2)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:20)
       at android.view.Choreographer.doCallbacks(Choreographer.java:79)
       at android.view.Choreographer.doFrame(Choreographer.java:182)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:9)
       at android.os.Handler.handleCallback(Handler.java:2)
       at android.os.Handler.dispatchMessage(Handler.java:4)
       at android.os.Looper.loop(Looper.java:249)
       at android.app.ActivityThread.main(ActivityThread.java:98)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:11)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:282)

@zibellon
Copy link

Hello! I have the same error...

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants