Repository navigation
java.io.FileNotFoundException: open failed: EACCES (Permission denied) #88
Copy link
Copy link
Closed
Description
Hello,
My application is crashing only when running on Android 5.X. Here are the details about the error:
Error Stacktrace:
FATAL EXCEPTION: main
Caused by: java.io.FileNotFoundException: /data/data/APP_ID/lib-main/dso_lock: open failed: EACCES (Permission denied)
FATAL EXCEPTION: main
Process: APP_ID:p54993bdf2c8b1ed6b7cda959, PID: 10210
java.lang.RuntimeException: Unable to create application APP_ID.MainApplication: java.lang.RuntimeException: java.io.FileNotFoundException: /data/data/APP_ID/lib-main/dso_lock: open failed: EACCES (Permission denied)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4556)
at android.app.ActivityThread.access$1500(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: /data/data/APP_ID/lib-main/dso_lock: open failed: EACCES (Permission denied)
at com.facebook.soloader.SoLoader.init(SoLoader.java:192)
at APP_ID.MainApplication.onCreate(MainApplication.java:52)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4553)
... 9 more
Caused by: java.io.FileNotFoundException: /data/data/APP_ID/lib-main/dso_lock: open failed: EACCES (Permission denied)
at libcore.io.IoBridge.open(IoBridge.java:456)
at java.io.FileOutputStream.<init>(FileOutputStream.java:87)
at java.io.FileOutputStream.<init>(FileOutputStream.java:72)
at com.facebook.soloader.FileLocker.<init>(FileLocker.java:35)
at com.facebook.soloader.FileLocker.lock(FileLocker.java:31)
at com.facebook.soloader.UnpackingSoSource.prepare(UnpackingSoSource.java:417)
at com.facebook.soloader.SoLoader.initSoSources(SoLoader.java:304)
at com.facebook.soloader.SoLoader.init(SoLoader.java:181)
at com.facebook.soloader.SoLoader.init(SoLoader.java:164)
at com.facebook.soloader.SoLoader.init(SoLoader.java:190)
... 12 more
Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
at libcore.io.IoBridge.open(IoBridge.java:442)
... 21 moreEnviroment:
System:
OS: macOS 11.6.1
CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
Memory: 63.66 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.8.0 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 7.21.0 - /usr/local/bin/npm
Watchman: 2021.08.23.00 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0
Android SDK:
API Levels: 28, 29, 30, 31
Build Tools: 28.0.3, 29.0.2, 30.0.2, 30.0.3, 31.0.0
System Images: android-22 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 4.2 AI-202.7660.26.42.7486908
Xcode: 13.0/13A233 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.5 => 0.61.5Details
The error happens when opening the application, only on Android 5.X versions.
Already tried to add android:requestLegacyExternalStorage="true" to the AndroidManifest.xml, with no success.
Reacted by Matej Drobnič
Metadata
Metadata
Assignees
Labels
No labels
Activity
simpleton commentedon Nov 11, 2021
which version are you using?
fansilva1991 commentedon Nov 19, 2021
@simpleton sorry for the late response.
This is the version I'm using.
simpleton commentedon Nov 20, 2021
fansilva1991 commentedon Nov 25, 2021
@simpleton this is the version used by React Native by default.
Do you know if we have a recommended version to upgrade? I can try to do this and check if solve this issue ( I'm only worried because it is the version chosen by react-native to be used ).
carlonzo commentedon Apr 12, 2022
hi, we started receiving the very same issue. we are on
com.facebook.soloader:soloader:0.10.3Here the stacktrace from a Samsung Galaxy J4 Core Android 8.1.0:
matejdro commentedon May 27, 2022
Same is happening for us for SoLoader
0.10.3. We can't reproduce it locally, but Firebase reports numerous crashes on devices running Android 10-12bachhuberdesign commentedon Jun 6, 2022
Also encountering this issue on SoLoader 0.10.3 in a production app. The overwhelming majority of our crashes are coming from Pixel devices, but there are a handful of Motorola and Samsung as well. All are on SDK 31 or SDK 32 (Android 12). If anyone has steps to re-create this, that would be great.
simpleton commentedon Jun 6, 2022
bachhuberdesign commentedon Jun 6, 2022
Have not been able to re-create it yet, so the only info I have is from Android Vitals on Google Play
simpleton commentedon Jun 27, 2022
should be fixed in b28033f
simpleton commentedon Jun 27, 2022
duplicate #100
Bump SoLoader buck targets to 0.10.4
oonez9665-dev commentedon Mar 19, 2026