His headphones kept cutting out, so he read the AliExpress code

Bluetooth Headphone Drop Issue Traced to AliExpress Code

His headphones kept cutting out, so he read the AliExpress code. A developer discovered the reason behind the dropping Bluetooth audio on the AliExpress homepage, which runs silent WebAudio graphs from Alibaba's anti-abuse scripts.

A Firefox engineer confirmed the technique has been neutralized since 2023 for all but 48 users.

The Discoverer's Story

Connor Jones documented his experience in a blog post on August 20th, highlighting that the issue occurs specifically when opening an AliExpress page in Firefox or Chrome while using multipoint Bluetooth headphones. Closing the tab immediately fixes the problem.

Initial Checks

Jones initially checked for hidden media elements and various audio-related activities but found nothing suspicious. However, he noticed the issue started only after the page had sat idle for several seconds.

Finding the Culprit

To gain insights, Jones wrapped the AudioContext constructor to log its usage and the connect method to observe connections to the audio destination. He discovered two AudioContext objects were created, both entering the running state and connecting nodes to the destination, even without media elements or play calls.

These scripts appear to be part of Alibaba’s browser security and anti-abuse tooling named collina.js and fireyejs.js, served from an AWS directory on an Alibaba media domain.

The Audio Graph

Both scripts build a similar audio graph: a sawtooth oscillator, an analyser node, a script processor, a gain node set to zero, and the audio destination. This setup generates a known waveform, measures its output through the browser's audio implementation, and prevents any audible sound by setting the gain to zero.

Additional Metrics

Jones also observed that these scripts measure various metrics such as canvas rendering, WebGL renderer information, screen dimensions, device memory, WebRTC behavior, performance timing, and properties related to browser automation.