-
Notifications
You must be signed in to change notification settings - Fork 24
[Bug] Local Audio App - nowplaying binary crashes with Node.js v18/v20/v22 compatibility error on macOS #24
Copy link
Copy link
Open
Description
Bug Summary:
The Local Audio app fails to work on macOS due to a critical Node.js compatibility issue with the n-nowplaying.darwin-universal.node binary. The binary crashes across multiple Node.js versions (v18, v20, v22) with the error NODE_MODULE_VERSION mismatch, preventing the Local Audio app from controlling any local media players.
Environment:
- OS: macOS 14.5.0 (Darwin 24.5.0)
- DeskThing Version: Latest (Local Audio app v0.11.1)
- Node.js Versions Tested: v18.x, v20.x, v22.7.0
- Device: M1/M2 Mac (Apple Silicon)
Steps to Reproduce:
- Install DeskThing Local Audio app v0.11.1 by Riprod
- Navigate to
~/Library/Application Support/deskthing/apps/audio/server/ - Test the nowplaying binary directly:
node -e "const { NowPlaying } = require('./n-nowplaying.darwin-universal.node'); const np = new NowPlaying();" - Observe the crash
Actual Behavior:
Error: The module '/path/to/n-nowplaying.darwin-universal.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 108. This version of Node.js requires
NODE_MODULE_VERSION 127. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
Expected Behavior:
- The Local Audio app should successfully interface with macOS media session APIs
- SoundCloud in Chrome, Spotify, and other media players should be controllable through DeskThing
- Track information should display on the DeskThing device
Evidence the APIs Work:
- ✅ macOS built-in Now Playing controls work perfectly with SoundCloud in Chrome
- ✅ Media Session API is functional (proven by system-level controls)
- ❌ DeskThing Local Audio app fails due to binary incompatibility
Additional Context:
DeskThing Logs Show the Issue:
[INFO] Refreshed music data from audio
[ERROR] App undefined had issue being verified App does not have a name!
Technical Analysis:
- Root Cause: The
node-nowplayingbinary dependency is compiled for an older Node.js version - Impact: Complete failure of Local Audio functionality on macOS
- Scope: Affects all macOS users trying to control local media
- Workaround Attempts: Tried downloading latest binary from JoeyEamigh/nowplaying repo - same issue
Binary Details:
- File:
n-nowplaying.darwin-universal.node - Source: JoeyEamigh/nowplaying repository
- Current Version: v0.1.0
- Issue: Built against NODE_MODULE_VERSION 108, modern Node.js requires 127+
Proposed Solutions:
- Immediate Fix: Rebuild the nowplaying binary for current Node.js versions (v18+)
- Alternative: Switch to a different media session API library that's actively maintained
- Compatibility Layer: Use Node.js version detection and multiple binary variants
- Long-term: Consider implementing native macOS MediaRemote API calls directly
Related Information:
- nowplaying Library: https://github.com/JoeyEamigh/nowplaying
- Similar Issue Pattern: This affects Windows/Linux users with different NODE_MODULE_VERSION mismatches
- Impact Level: Critical - core functionality completely broken on macOS
Files Affected:
~/Library/Application Support/deskthing/apps/audio/server/n-nowplaying.darwin-universal.node~/Library/Application Support/deskthing/apps/audio/server/index.js~/Library/Application Support/deskthing/apps/audio/server/nowplayingWrapper.ts
Testing Performed:
- ✅ Verified accessibility permissions are set correctly
- ✅ Confirmed DeskThing is properly getting "music data from audio"
- ✅ Tested across Node.js v18, v20, v22 - all fail identically
- ✅ Verified macOS system media APIs work independently
- ✅ Fixed corrupted apps.json config issues (separate bug)
Priority: High - Core feature completely non-functional for macOS users
Labels: bug, macOS, audio, compatibility, critical
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels