2

I'm seeing this error in the pre-launch report:

Caused by: b.b.a.h.h: Error loading audio file: sounds/mysound.ogg
...
Caused by: java.io.FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed
at android.content.res.AssetManager.openAssetFd(Native Method)
at android.content.res.AssetManager.openFd(AssetManager.java:332)

The App is working fine on a real device, and also in the emulator. It only seems to show up in the pre-launch report (all devices fail).

Has anyone come across this before?

The following StackOverflow post looks related: java.io.FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed

However I ran the command unzip -lv MyApplication.apk and it says the sound files are not compressed ("Stored" with 0%).

I also tried explicitly adding

android {
    aaptOptions {
        noCompress "ogg"
    }
}

but to no avail.

Is this a problem with the Firebase emulators? One of the devices listed as failing matches a real device configuration that I have tested as working on a physical device.

Also, I'm using the LibGDX framework. I load the assets in the loading screen like so:

assetManager.load("sounds/mysound.ogg", Sound.class);

And then I get them using:

assetManager.get("sounds/mysound.ogg", Sound.class);
magritte
  • 7,396
  • 10
  • 59
  • 79
  • I think it's an issue with the Pre-launch report device images. In the Crashlytics reports I couldn't find any crash report outside the devices of the Pre-launch report devices. Same app, with the same code base uploaded on the 17th - 0 issues. Today (21st) - 10 crashes on the Pre-launch report 10 hours ago. Tried to fix something - 5 hours ago - 13 crashed. – sagis Jul 21 '19 at 17:59
  • Didn't mentioned what I'm seeing: same crash, while loading ogg sound files during loading of resources with SoundPool.load(). Java app, not LibGDX. Tried Android Studio 3.4.2 & 3.4.1, Build tools 29.0.1 & 28.0.3, with & without the aaptOptions. All with the same issue. – sagis Jul 22 '19 at 03:45
  • @sagis I have found the cause and a workaround - in the pre-launch report, click the settings tab to the far right, then scroll down to "Pre-launch report version". Click the opt-out toggle. Works fine now across all test devices. It must be something to do with the way they resign the apk if you opt in to that. – magritte Jul 22 '19 at 09:07
  • It looks like this issue was fixed before the 25th. I'm no longer seeing those errors. – sagis Jul 26 '19 at 19:33

0 Answers0