Closed Bug 1848518 Opened 9 months ago Closed 8 months ago

No audio/sound on nightly

Categories

(Core :: Audio/Video: cubeb, defect, P1)

Firefox 118
ARM
Android
defect

Tracking

()

VERIFIED FIXED
119 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox-esr115 --- unaffected
firefox117 --- unaffected
firefox118 blocking verified
firefox119 blocking verified

People

(Reporter: quadriflax, Assigned: padenot)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files, 2 obsolete files)

User Agent: Mozilla/5.0 (Android 11; Mobile; rv:109.0) Gecko/117.0 Firefox/117.0

Steps to reproduce:

Sound has stopped working on my Samsung Tab A running Android 10. YouTube, etc. load and play fine, just without audio. Audio works on literally everything else, including Beta and stable releases. Worked as of at least two nightly releases ago, I believe.

118.0a1 (Build #2015967809), e1c9818038+
GV: 118.0a1-20230811213712
AS: 118.20230811050249

Actual results:

No sound plays when loading any videos, etc, from browser.

Expected results:

Sound should play.

(In reply to Quadriflax from comment #0)

User Agent: Mozilla/5.0 (Android 11; Mobile; rv:109.0) Gecko/117.0 Firefox/117.0

Steps to reproduce:

Sound has stopped working on my Samsung Tab A running Android 10. YouTube, etc. load and play fine, just without audio. Audio works on literally everything else, including Beta and stable releases. Worked as of at least two nightly releases ago, I believe.

118.0a1 (Build #2015967809), e1c9818038+
GV: 118.0a1-20230811213712
AS: 118.20230811050249

Actual results:

No sound plays when loading any videos, etc, from browser.

Expected results:

Sound should play.

Sorry, this is on Android 11, not 10.

I did somemore testing on this. A reboot and uninstall/fresh reinstall did not fix. I went back through APK Mirror and updated one nightly at a time until it stopped working. The last working version is:

118.0a1 (Build #2015967137), 7cce8ace88+
GV: 118.0a1-20230807215239
AS: 118.20230806050240

The next version below, sound stops working entirely:

118.0a1 (Build #2015967249), 540f25a41a+
GV: 118.0a1-20230809092330
AS: 118.20230809050307

This appears to only affect armeabi-v7a devices from what I can tell. Both my Samsung and an old LG G Pad X have the exact same issue where sound works on build #2015967137, but stops working on build #2015967249.

Is there anything else I can provide to try and sort this?

Depends on your info: Bug may happen between https://hg.mozilla.org/mozilla-central/shortlog/d59d0a5038b29cdbcbb2d4b003d642a2617e297f and https://hg.mozilla.org/mozilla-central/shortlog/1f46af18938c502599b89d62cb0c1d9a221b3126

There're several commits about audio.


Some questions which may do help to developers:

  1. Does this happens on all sites or youtube only?
  2. Does this happens on specific youtube video (if so, link would be helpful) or all youtube video?

Is there anything else I can provide to try and sort this?
You could try getting log from device via adb logcat ( With Enable Gecko Logs would be better ) and upload it here.

How to Enable Gecko Logs:

  1. In browser, Goto "Settings" -> "About Firefox" -> Click on Firefox Icon several times.
  2. Then go back to Settings , Switch on Enable Gecko Logs in Advanced Section
Flags: needinfo?(padenot)

(In reply to jackyzy823 from comment #3)

Depends on your info: Bug may happen between https://hg.mozilla.org/mozilla-central/shortlog/d59d0a5038b29cdbcbb2d4b003d642a2617e297f and https://hg.mozilla.org/mozilla-central/shortlog/1f46af18938c502599b89d62cb0c1d9a221b3126

There're several commits about audio.


Some questions which may do help to developers:

  1. Does this happens on all sites or youtube only?

All sites. Everything I've tested so far has no sound since aforementioned build above.

  1. Does this happens on specific youtube video (if so, link would be helpful) or all youtube video?

All YouTube videos. I've tried DailyMotion, BBC, TikTok, Reddit, etc. There's just no sound.


Is there anything else I can provide to try and sort this?
You could try getting log from device via adb logcat ( With Enable Gecko Logs would be better ) and upload it here.

How to Enable Gecko Logs:

  1. In browser, Goto "Settings" -> "About Firefox" -> Click on Firefox Icon several times.
  2. Then go back to Settings , Switch on Enable Gecko Logs in Advanced Section

My apologies, but how do I pull the logs? You mention "adb logcat", but I'm not sure what that is or how to use it. Is there a quick guide I can follow somewhere? I've done the steps above and enabled the Gecko logs, tested a few sites (all still fail to play sound), but not sure how I can pull what might be useful. Happy to do so, I'm just not very familiar with adb or debugging things on Android, unfortunately.

Curious to know if anyone else can replicate on an armeabi-v7a device. My arm64-v8a devices seem to be fine.

but how do I pull the logs? You mention "adb logcat", but I'm not sure what that is or how to use it. Is there a quick guide I can follow somewhere? I've done the steps above and enabled the Gecko logs, tested a few sites (all still fail to play sound), but not sure how I can pull what might be useful. Happy to do so, I'm just not very familiar with adb or debugging things on Android, unfortunately.

Here's the instruction https://bugzilla.mozilla.org/show_bug.cgi?id=1816330#c9

Curious to know if anyone else can replicate on an armeabi-v7a device. My arm64-v8a devices seem to be fine.

Thanks for the key information.

I've tested on a arm64-v8a device and install Fenix of armeabi-v7a variant ( from https://ftp.mozilla.org/pub/fenix/nightly/2023/08/2023-08-14-04-01-12-fenix-118.0a1-android-armeabi-v7a/) and the audio also does not play .

The most suspicious ticket is https://bugzilla.mozilla.org/show_bug.cgi?id=1833654 and https://phabricator.services.mozilla.com/D181520

Status: UNCONFIRMED → NEW
Ever confirmed: true

(In reply to jackyzy823 from comment #5)

Here's the instruction https://bugzilla.mozilla.org/show_bug.cgi?id=1816330#c9

Thanks. I was able to get a file with a log dump, but looks like this is a log of everything the tablet is doing. What is the best way to illustrate the specific Firefox audio issue so I'm not just giving everything (I'm not entirely sure what all of this means, so hesitant to share anything non-essential to the public)?

(In reply to jackyzy823 from comment #6)

Thanks for the key information.

I've tested on a arm64-v8a device and install Fenix of armeabi-v7a variant ( from https://ftp.mozilla.org/pub/fenix/nightly/2023/08/2023-08-14-04-01-12-fenix-118.0a1-android-armeabi-v7a/) and the audio also does not play .

The most suspicious ticket is https://bugzilla.mozilla.org/show_bug.cgi?id=1833654 and https://phabricator.services.mozilla.com/D181520

Given that you were able to replicate, do you even need logs from me, or are you able to pull some and analyze your own? I'm happy to help, I'm just a bit slow with this stuff.

My log here

The most suspicious part:

08-14 20:49:05.917 25453 25826 I Gecko   : [Child 25453, MediaDecoderStateMachine #1] WARNING: bc82a5f0 OpenCubeb() failed to init cubeb: file /builds/worker/checkouts/gecko/dom/media/AudioStream.cpp:281
08-14 20:49:05.917 25453 25826 I Gecko   : [Child 25453, MediaDecoderStateMachine #1] WARNING: Decoder=cbf26f20 [OnMediaSinkAudioError]: file /builds/worker/checkouts/gecko/dom/media/MediaDecoderStateMachine.cpp:4649

(In reply to jackyzy823 from comment #8)

My log here

The most suspicious part:

08-14 20:49:05.917 25453 25826 I Gecko   : [Child 25453, MediaDecoderStateMachine #1] WARNING: bc82a5f0 OpenCubeb() failed to init cubeb: file /builds/worker/checkouts/gecko/dom/media/AudioStream.cpp:281
08-14 20:49:05.917 25453 25826 I Gecko   : [Child 25453, MediaDecoderStateMachine #1] WARNING: Decoder=cbf26f20 [OnMediaSinkAudioError]: file /builds/worker/checkouts/gecko/dom/media/MediaDecoderStateMachine.cpp:4649

I'm definitely seeing the same:

08-14 10:25:04.068 21685 21852 I Gecko   : [Child 21685, MediaDecoderStateMachine #1] WARNING: 9cefe9e0 OpenCubeb() failed to init cubeb: file /builds/worker/checkouts/gecko/dom/media/AudioStream.cpp:281
08-14 10:25:04.068 21685 21852 I Gecko   : [Child 21685, MediaDecoderStateMachine #1] WARNING: Decoder=a0e52e40 [OnMediaSinkAudioError]: file /builds/worker/checkouts/gecko/dom/media/MediaDecoderStateMachine.cpp:4649
Assignee: nobody → padenot
Flags: needinfo?(padenot)

Quadriflax , Could you help gathering some information on your Samsung Tab A or LG G Pad X ( use the one which has a higher android version)

Open browser and input about:support in url and goto , Find Media Section (could using Find in Page) , Take a screenshot or copy all text in this section especially 1. audio backend 2. default audio output device's format.

Thanks.

Flags: needinfo?(quadriflax)

Audio Backend opensl
Max Channels 2
Preferred Sample Rate 48000
Roundtrip latency (standard deviation) ...

Output Devices
Name Group Vendor State Preferred Format Channels Rate Latency
Default audio output device Enabled All default: S16LE, support: S16LE S16BE F32LE F32BE 2 default: 44100, support: 44100 - >44100 128 - 441

Input Devices
Name Group Vendor State Preferred Format Channels Rate Latency
Default audio input device Enabled All default: S16LE, support: S16LE S16BE F32LE F32BE 1 default: 44100, support: 44100 - 44100 >128 - 441
Media Capabilities

The above is from my Samsung Tab A on Android 11. Let me know if you need anything else.

Flags: needinfo?(quadriflax)

Some additional log:

Gecko   : [Child 14829: MediaDecoderStateMachine #1]: E/cubeb cubeb.c:386:Invalid format, 0x809d2fcc 0x0 1 0
Cubeb_OpenSL: Playback params: Rate 48000, channels 2, format 2, latency in frames 4800.

After some digging, I found the key reason is opensl is incompatible with f32 when minsdk <= LOLLPOP.

From this commit (bingo, i guessed right) , Audio output format is AUDIO_OUTPUT_FORMAT = AUDIO_FORMAT_FLOAT32 , will be converted to CUBEB_SAMPLE_FLOAT32NE (format 2 in the second line of the log) for cubeb.

params.format = CubebUtils::ToCubebFormat<AUDIO_OUTPUT_FORMAT>::value;

template <AudioSampleFormat N>
struct ToCubebFormat {
  static const cubeb_sample_format value = CUBEB_SAMPLE_FLOAT32NE;
};

then the keypoint https://searchfox.org/mozilla-central/source/media/libcubeb/src/cubeb_opensl.c#1108-1130

if __ANDROID_API__ < ANDROID_VERSION_LOLLIPOP , opensl_set_format_ext is not defined and will not be called, so format is NULL , then opensl_set_format will be called. In opensl_set_format , only CUBEB_SAMPLE_S16LE and CUBEB_SAMPLE_S16BE will be handled, other format will cause CUBEB_ERROR_INVALID_FORMAT. then Audio failed to initialize.

When targetting armeabi , the __ANDROID_API__ is 16 (because of --target=arm-linux-androideabi16) < ANDROID_VERSION_LOLLIPOP (21) , so failure occurs.

When targetting arm64 , the __ANDROID_API__ is 21 (because of --target=aarch64-linux-android21) == ANDROID_VERSION_LOLLIPOP (21) , so format is assigned by opensl_set_format_ext.


Although i don't know 1) why opensl is still used in Android 11. 2) why ndk targetting to API 16 when building armeabi.

Got anwser for question 2 from geckoview matrix channel. https://searchfox.org/mozilla-central/rev/ce049e593c7d062a039938cabccaab4c14b8ebfd/build/moz.configure/android-ndk.configure#36-41

Flags: needinfo?(padenot)

All, thanks for all the help diagnosing this, and sorry for the breakage.

Just a note that I have a patch series that fixes this, and I have sound again on Firefox compiled against older SDKs. This should land in the coming days. I need to unbreak audio input as well. It took some time because I was off work at the beginning of the week.

What's quite problematic is that our CI was completely green and didn't report any issue. It's something I'm thinking of addressing as well.

Flags: needinfo?(padenot)

I don't suppose there is an ETA on the fix dropping in the nightly release? Still no sound for the past week+.

Depends on D186860

Hopefully tomorrow or the day after.

:padenot could you confirm/add the regressor on this? Wondering if it only impacts 118+, or is 117 affected

Flags: needinfo?(padenot)

Hello. It says here that it simply needs a tag before it will be applied. Same status for the other one. So who do we contact or how do we make this happen? Thanks.

Pushed by padenot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/de6c4da0020b
Update libcubeb to revision 3f86a. r=cubeb-reviewers,kinetik
https://hg.mozilla.org/integration/autoland/rev/f648d27187b6
Reapply patch on top of cubeb. r=cubeb-reviewers,kinetik

Backed out for causing Android build bustages.

Latest beta is now also broken with no sound:

118.0b2 (Build #2015971121), 22c354a4d2+
GV: 118.0-20230829180158
AS: 118.0

It seems the error is that cube_opensl.c is forgotten to be renamed to cubeb_opensl.cpp in moz.build file .

Keywords: regression
Regressed by: 1833654
Component: General → Audio/Video: cubeb
Product: Fenix → Core
Hardware: All → ARM

Set release status flags based on info from the regressing bug 1833654

Duplicate of this bug: 1851403

Matthew, I think Paul is on PTO, could you own this bug in the meantime or help us find an owner? Thanks!

Flags: needinfo?(kinetik)

same problem .
adding info.

Andrroid 9 Tablet
Mediatek MT8168 chip
Mali-G52 MC1

Depends on D187410

See Also: → 1852005
Duplicate of this bug: 1852005
See Also: 1852005

I have the same problem in Firefox Beta for Android since v118.0b2 and also in Nightly. No problem in the stable version. I don't have any extensions installed.
OS: Android 8 (Oreo)

Karl, this is marked as a release blocker and we are mid beta cycle, can you please assist us moving it forward with this bug? Thanks

Flags: needinfo?(karlt)
Severity: -- → S2
Priority: -- → P1
Flags: needinfo?(padenot)
Flags: needinfo?(kinetik)
Flags: needinfo?(karlt)

just a follow-up. problem persists in v118.0b6.

Alastor, are you taking this bug?

Flags: needinfo?(alwu)

No, there are already r+ patches, we just need to land them.

Flags: needinfo?(alwu)
Pushed by alwu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e2341e420b86
Update libcubeb to revision 3f86a. r=cubeb-reviewers,chunmin
https://hg.mozilla.org/integration/autoland/rev/14ea6d3e3958
Reapply patch on top of cubeb. r=cubeb-reviewers,chunmin
https://hg.mozilla.org/integration/autoland/rev/181edc7c67df
Update source filename of opensl in moz.build. r=cubeb-reviewers,chunmin
Flags: qe-verify+
Duplicate of this bug: 1852349

Please request uplift to beta, thanks.

Flags: needinfo?(karlt)
Flags: needinfo?(jackyzy823)
Flags: needinfo?(cchang)
Flags: needinfo?(karlt) → needinfo?(padenot)
Attachment #9350295 - Attachment is obsolete: true
Flags: needinfo?(padenot)
Attachment #9350294 - Attachment is obsolete: true

Comment on attachment 9351500 [details]
Bug 1848518 - Update libcubeb to revision 3f86a. r?#cubeb-reviewers

Beta/Release Uplift Approval Request

  • User impact if declined: No audio (input/output) on older android version or ARMv7 devices.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Attempt to play audio on an ARMv7 device, and to make a webrtc call.
  • List of other uplifts needed: None
  • Risk to taking this patch: Medium
  • Why is the change risky/not risky? (and alternatives if risky): This has been tested manually by myself and community members.
  • String changes made/needed:
  • Is Android affected?: Yes
Attachment #9351500 - Flags: approval-mozilla-beta?
Attachment #9351501 - Flags: approval-mozilla-beta?
Attachment #9351502 - Flags: approval-mozilla-beta?
Flags: needinfo?(jackyzy823)
Flags: needinfo?(cchang)

Managed to reproduce the issue on 118.0b5 and on Nightly 119.0a1 (from 2023-09-06) with a Redmi 9C NFC (Android 10).
Not reproducible on RC 117.0.1 with the same device.
Also reproduced on Beta 118 with a Sony Xperia (Android 6.0.1).

Verified as fixed on the latest Nightly build (119.0a1 from 2023-09-12) with both devices.

Marking the ticket as verified on 119.

Flags: qe-verify+

Comment on attachment 9351500 [details]
Bug 1848518 - Update libcubeb to revision 3f86a. r?#cubeb-reviewers

Approved for 118.0b8, thanks.

Attachment #9351500 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9351501 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9351502 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Verified as fixed on the latest Beta build (118.0b8).

Devices used:

  • Redmi 9C NFC (Android 10).
  • Sony Xperia (Android 6.0.1).

Marking the ticket as verified for 118 as well.

Status: RESOLVED → VERIFIED
Regressions: 1853012
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: