question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.lang.UnsatisfiedLinkError: com.facebook.imagepipeline.memory.NativeMemoryChunk and java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libimagepipeline.so

See original GitHub issue

Hi, I have two problems, most of them happen on the Android 5.1 system of the OPPO brand mobile phone. The following is the error log.

Log1

java.lang.UnsatisfiedLinkError: com.facebook.imagepipeline.memory.NativeMemoryChunk
at com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:25)
    at com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:13)
    at com.facebook.imagepipeline.memory.BasePool.get(BasePool.java:267)
    at com.facebook.imagepipeline.memory.MemoryPooledByteBufferOutputStream.<init>(MemoryPooledByteBufferOutputStream.java:51)
    at com.facebook.imagepipeline.memory.MemoryPooledByteBufferFactory.newOutputStream(MemoryPooledByteBufferFactory.java:106)
    at com.facebook.imagepipeline.memory.MemoryPooledByteBufferFactory.newOutputStream(MemoryPooledByteBufferFactory.java:24)
    at com.facebook.imagepipeline.producers.NetworkFetchProducer.onResponse(NetworkFetchProducer.java:96)
    at com.facebook.imagepipeline.producers.NetworkFetchProducer$1.onResponse(NetworkFetchProducer.java:73)
    at com.facebook.imagepipeline.backends.okhttp3.OkHttpNetworkFetcher$2.onResponse(OkHttpNetworkFetcher.java:193)
    at okhttp3.RealCall$AsyncCall.execute(RealCall.java:174)
    at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    at java.lang.Thread.run(Thread.java:818)

Log2

java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libimagepipeline.so caused by: dlopen failed: "/data/data/com.saltchucker/lib-main/libimagepipeline.so" is 64-bit instead of 32-bit
    at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:738)
    at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:591)
    at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:529)
    at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:484)
    at com.facebook.imagepipeline.nativecode.ImagePipelineNativeLoader.load(ImagePipelineNativeLoader.java:40)
    at com.facebook.imagepipeline.memory.NativeMemoryChunk.<clinit>(NativeMemoryChunk.java:31)
    at com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:25)
    at com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:13)
    at com.facebook.imagepipeline.memory.BasePool.get(BasePool.java:267)
    at com.facebook.imagepipeline.memory.MemoryPooledByteBufferOutputStream.<init>(MemoryPooledByteBufferOutputStream.java:51)
    at com.facebook.imagepipeline.memory.MemoryPooledByteBufferFactory.newByteBuffer(MemoryPooledByteBufferFactory.java:73)
    at com.facebook.imagepipeline.memory.MemoryPooledByteBufferFactory.newByteBuffer(MemoryPooledByteBufferFactory.java:24)
    at com.facebook.imagepipeline.producers.LocalFetchProducer.getByteBufferBackedEncodedImage(LocalFetchProducer.java:85)
    at com.facebook.imagepipeline.producers.LocalFetchProducer.getEncodedImage(LocalFetchProducer.java:97)
    at com.facebook.imagepipeline.producers.LocalAssetFetchProducer.getEncodedImage(LocalAssetFetchProducer.java:37)
    at com.facebook.imagepipeline.producers.LocalFetchProducer$1.getResult(LocalFetchProducer.java:50)
    at com.facebook.imagepipeline.producers.LocalFetchProducer$1.getResult(LocalFetchProducer.java:46)
    at com.facebook.common.executors.StatefulRunnable.run(StatefulRunnable.java:43)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    at com.facebook.imagepipeline.core.PriorityThreadFactory$1.run(PriorityThreadFactory.java:51)
    at java.lang.Thread.run(Thread.java:818)

Fresco version

implementation "com.facebook.fresco:fresco:1.13.0"
implementation "com.facebook.fresco:animated-gif:1.13.0"
implementation "com.facebook.fresco:animated-webp:1.13.0"
implementation "com.facebook.fresco:webpsupport:1.13.0"
implementation "com.facebook.fresco:imagepipeline-okhttp3:1.13.0"

Most of them happen in the following phones

  • OPPO A59s
  • OPPO A37
  • OPPO A59
  • OPPO R9

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

18reactions
ShawnDongAicommented, Jul 31, 2019

I have a solution before fresco fix this issue, maybe it can help you. Preload the libimagepipeline so, shutdown fresco if we catch an UnsatisfiedLinkError, then reinit by disabe native implementation. Like this:

val builder = ImagePipelineConfig.newBuilder(context) val imagePipelineConfig = builder.build() Fresco.initialize(context, imagePipelineConfig) try { ImagePipelineNativeLoader.load() } catch (error: UnsatisfiedLinkError) { Fresco.shutDown() builder.experiment().setNativeCodeDisabled(true) imagePipelineConfig = builder.build() Fresco.initialize(context, imagePipelineConfig) error.printStackTrace() }

3reactions
iamsdkcommented, May 28, 2020

I use the latest version v2.2, and it still happend in my app. java.lang.UnsatisfiedLinkError: couldn’t find DSO to load: libimagepipeline.so result: 0

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.UnsatisfiedLinkError: couldn't find DSO to load ...
Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libimagepipeline.so at com.facebook.soloader.SoLoader.
Read more >
Android java.lang.UnsatisfiedLinkError: couldn't find DSO to load
Error cause. Fatal Exception: java.lang.UnsatisfiedLinkError couldn't find DSO to load: libimagepipeline.so com.facebook.soloader.SoLoader.
Read more >
关于奔溃日志的原生崩溃的疑问? - DCloud问答
UnsatisfiedLinkError : couldn't find DSO to load: libimagepipeline.so caused by: dlopen ... NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:25)
Read more >
A brand new website interface for an even better experience!
Fatal Exception: java.lang.UnsatisfiedLinkError couldn't find DSO to load: libimagepipeline.so / com.facebook.imagepipeline.memory.NativeMemoryChunk.
Read more >
LATEST: AppYet v4.0.24 Released | Page 4
o.a.a(NativeLoader.java:4) at com.facebook.imagepipeline.memory. ... UnsatisfiedLinkError: couldn't find DSO to load: libimagepipeline.so ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found