Open loic-lopez opened 5 years ago
Caused by: java.io.FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed
This is interesting ^^
Have you tried with a different .mp3
file?
@paulmelnikow thanks for reply, I have not tried but the code runs in production version of the application.
Also it works in a simulator with a debug build.
Maybe, as i'm on androidX, before migrating to androidX the problem was not there.
try turning off the resigning of the apk in the pre launch settings, see if that helps
@ajungg where?
maybe what he means is this release management --> pre-launch report --> go to settings --> Pre-launch report version
please let me know the result, I also experienced the same things :(
Hello, I have the same error since the 22th of this month. Everything works fine with a production build on every phone I tried but every device of the pre-launch report crashs with this stacktrace :
FATAL EXCEPTION: mqt_native_modules
Process: com
android.content.res.Resources$NotFoundException: File res/raw/question.mp3 from drawable resource ID #0x7f080002
at android.content.res.Resources.openRawResourceFd(Resources.java:1315)
at com.zmxv.RNSound.RNSoundModule.createMediaPlayer(RNSoundModule.java:153)
at com.zmxv.RNSound.RNSoundModule.prepare(RNSoundModule.java:57)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:746)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
at android.os.Looper.loop(Looper.java:148)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.io.FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed
at android.content.res.AssetManager.openNonAssetFdNative(Native Method)
at android.content.res.AssetManager.openNonAssetFd(AssetManager.java:426)
at android.content.res.Resources.openRawResourceFd(Resources.java:1312)
... 12 more
The resigning of the apk is off and it still doesn't work. I'm not using androidX (yet) and my react-native-sound package is not up to date. These are my versions : "react-native": "0.57.7", "react-native-sound": "^0.10.9",
If I understand correctly I can still deploy my build and see if it affects my users but I'm a bit scared.
I tried this but not sure this is a good solution enough I added this in my proguard rule
-keep class *.R
-keepclasseswithmembers class **.R$* {
public static <fields>;
}
maybe see if that helps
In my case for my production builds i'm not using proguard.
If I understand correctly I can still deploy my build and see if it affects my users but I'm a bit scared.
@nromptea42 you can try a production build without submitting it to your external users.
I'm not using proguard either. @loic-lopez I downloaded, installed and launched the apk on multiple phones and it works fine. Maybe I will deploy to a certain percentage of external users to see how it goes.
maybe what he means is this release management --> pre-launch report --> go to settings --> Pre-launch report version
please let me know the result, I also experienced the same things :(
Thats exactly what i meant :)
That option turns off the resigning of the APK and disables some features of the Robo Test. I had similar issues since two days and that helped. Since it worked before it seems to be a temporary issue with the Robo test.
After digging a lot I made my binary x64 compliant see: developer.android.com/distribute/best-practices/develop/64-bit#building_with_android_studio_or_gradle
And submitted an AAB bundle the error does not occur anymore. How to generate an AAB bundle:
cd android && ./gradlew bundleRelease
I will update this issue if I have more information.
:beetle: Description Getting
android.content.res.Resources$NotFoundException
on submitting App to playstore:beetle: Code:
Is your issue with...
Are you using...
react-native run-android
)Which versions are you using?
Does the problem occur on...
If your problem is happening on a device, which device?
Stacktrace:
Also the javascript code above is working on a simulator.