geekuillaume / soundsync

Virtual cables between any audio source and any speaker in your home
https://soundsync.app
Other
840 stars 36 forks source link

Unable to run Soundsync 0.4.16 via systemd service #164

Open balaji-dutt opened 1 year ago

balaji-dutt commented 1 year ago

Hi,

I recently installed Soundsync v0.4.16 on a Ubuntu 20.04 VM and am facing an odd issue. The systemd service for Soundsync will fail with the following error:

Jan 08 03:13:46 repeater soundsync[13103]: 2023-01-08T03:13:46.994Z soundsync:localAudioDevice Created audio server
Jan 08 03:13:46 repeater soundsync[13103]: 2023-01-08T03:13:46.997Z soundsync:sourcesSinksManager Adding sink  Dummy Output of type localdevice
Jan 08 03:13:46 repeater soundsync[13103]: 2023-01-08T03:13:46.997Z soundsync:audioSink:cce10da4-23c0-4ec6-8f6e-4c769aa67fbe Created new audio sink of type localdevice
Jan 08 03:13:46 repeater soundsync[13103]: Error: Error while enumerating devices
Jan 08 03:13:46 repeater soundsync[13103]:     at Object.exports.getAudioDevices (/opt/Soundsync/resources/app/utils/audio/localAudioDevice.js:29:49)
Jan 08 03:13:46 repeater soundsync[13103]:     at Object.exports.getOutputDeviceFromId (/opt/Soundsync/resources/app/utils/audio/localAudioDevice.js:39:20)
Jan 08 03:13:46 repeater soundsync[13103]:     at LocalDeviceSink.isDeviceAvailable (/opt/Soundsync/resources/app/audio/sinks/localdevice_sink.js:19:61)
Jan 08 03:13:46 repeater soundsync[13103]:     at LocalDeviceSink.updateDeviceInfo (/opt/Soundsync/resources/app/audio/sinks/localdevice_sink.js:22:33)
Jan 08 03:13:46 repeater soundsync[13103]:     at new LocalDeviceSink (/opt/Soundsync/resources/app/audio/sinks/localdevice_sink.js:81:14)
Jan 08 03:13:46 repeater soundsync[13103]:     at AudioSourcesSinksManager.addSink (/opt/Soundsync/resources/app/audio/audio_sources_sinks_manager.js:204:20)
Jan 08 03:13:46 repeater soundsync[13103]:     at /opt/Soundsync/resources/app/audio/audio_sources_sinks_manager.js:253:18
Jan 08 03:13:46 repeater soundsync[13103]:     at Array.forEach (<anonymous>)
Jan 08 03:13:46 repeater soundsync[13103]:     at AudioSourcesSinksManager.addFromConfig (/opt/Soundsync/resources/app/audio/audio_sources_sinks_manager.js:252:15)
Jan 08 03:13:46 repeater soundsync[13103]:     at main (/opt/Soundsync/resources/app/index.js:96:30)
Jan 08 03:13:46 repeater soundsync[13103]:     at Object.<anonymous> (/opt/Soundsync/resources/app/index.js:151:1)
Jan 08 03:13:46 repeater soundsync[13103]:     at Module._compile (node:internal/modules/cjs/loader:1110:14)
Jan 08 03:13:46 repeater soundsync[13103]:     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1140:10)
Jan 08 03:13:46 repeater soundsync[13103]:     at Module.load (node:internal/modules/cjs/loader:982:32)
Jan 08 03:13:46 repeater soundsync[13103]:     at Module._load (node:internal/modules/cjs/loader:823:12)
Jan 08 03:13:46 repeater soundsync[13103]:     at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
Jan 08 03:13:47 repeater soundsync[13103]: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Jan 08 03:13:47 repeater soundsync[13103]: Error: Error while enumerating devices
Jan 08 03:13:47 repeater soundsync[13103]:     at Object.exports.getAudioDevices (/opt/Soundsync/resources/app/utils/audio/localAudioDevice.js:29:49)
Jan 08 03:13:47 repeater soundsync[13103]:     at Object.exports.getInputDeviceFromId (/opt/Soundsync/resources/app/utils/audio/localAudioDevice.js:45:20)
Jan 08 03:13:47 repeater soundsync[13103]:     at LocalDeviceSource.isDeviceAvailable (/opt/Soundsync/resources/app/audio/sources/localdevice_source.js:18:143)
Jan 08 03:13:47 repeater soundsync[13103]:     at LocalDeviceSource.updateDeviceInfo (/opt/Soundsync/resources/app/audio/sources/localdevice_source.js:21:33)
Jan 08 03:13:47 repeater soundsync[13103]:     at new LocalDeviceSource (/opt/Soundsync/resources/app/audio/sources/localdevice_source.js:73:14)
Jan 08 03:13:47 repeater soundsync[13103]:     at AudioSourcesSinksManager.addSource (/opt/Soundsync/resources/app/audio/audio_sources_sinks_manager.js:141:22)
Jan 08 03:13:47 repeater soundsync[13103]:     at /opt/Soundsync/resources/app/audio/audio_sources_sinks_manager.js:246:18
Jan 08 03:13:47 repeater soundsync[13103]:     at Array.forEach (<anonymous>)
Jan 08 03:13:47 repeater soundsync[13103]:     at AudioSourcesSinksManager.addFromConfig (/opt/Soundsync/resources/app/audio/audio_sources_sinks_manager.js:245:17)
Jan 08 03:13:47 repeater soundsync[13103]:     at main (/opt/Soundsync/resources/app/index.js:96:30)
Jan 08 03:13:47 repeater soundsync[13103]:     at Object.<anonymous> (/opt/Soundsync/resources/app/index.js:151:1)
Jan 08 03:13:47 repeater soundsync[13103]:     at Module._compile (node:internal/modules/cjs/loader:1110:14)
Jan 08 03:13:47 repeater soundsync[13103]:     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1140:10)
Jan 08 03:13:47 repeater soundsync[13103]:     at Module.load (node:internal/modules/cjs/loader:982:32)
Jan 08 03:13:47 repeater soundsync[13103]:     at Module._load (node:internal/modules/cjs/loader:823:12)
Jan 08 03:13:47 repeater soundsync[13103]:     at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
Jan 08 03:13:47 repeater soundsync[13103]: Error: Error while enumerating devices
Jan 08 03:13:47 repeater soundsync[13103]:     at Object.exports.getAudioDevices (/opt/Soundsync/resources/app/utils/audio/localAudioDevice.js:29:49)
Jan 08 03:13:47 repeater soundsync[13103]:     at Object.exports.getInputDeviceFromId (/opt/Soundsync/resources/app/utils/audio/localAudioDevice.js:45:20)
Jan 08 03:13:47 repeater soundsync[13103]:     at LocalDeviceSource.isDeviceAvailable (/opt/Soundsync/resources/app/audio/sources/localdevice_source.js:18:143)
Jan 08 03:13:47 repeater soundsync[13103]:     at LocalDeviceSource.updateDeviceInfo (/opt/Soundsync/resources/app/audio/sources/localdevice_source.js:21:33)
Jan 08 03:13:47 repeater soundsync[13103]:     at new LocalDeviceSource (/opt/Soundsync/resources/app/audio/sources/localdevice_source.js:73:14)
Jan 08 03:13:47 repeater soundsync[13103]:     at AudioSourcesSinksManager.addSource (/opt/Soundsync/resources/app/audio/audio_sources_sinks_manager.js:141:22)
Jan 08 03:13:47 repeater soundsync[13103]:     at /opt/Soundsync/resources/app/audio/audio_sources_sinks_manager.js:246:18
Jan 08 03:13:47 repeater soundsync[13103]:     at Array.forEach (<anonymous>)
Jan 08 03:13:47 repeater soundsync[13103]:     at AudioSourcesSinksManager.addFromConfig (/opt/Soundsync/resources/app/audio/audio_sources_sinks_manager.js:245:17)
Jan 08 03:13:47 repeater soundsync[13103]:     at main (/opt/Soundsync/resources/app/index.js:96:30)
Jan 08 03:13:47 repeater soundsync[13103]:     at Object.<anonymous> (/opt/Soundsync/resources/app/index.js:151:1)
Jan 08 03:13:47 repeater soundsync[13103]:     at Module._compile (node:internal/modules/cjs/loader:1110:14)
Jan 08 03:13:47 repeater soundsync[13103]:     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1140:10)
Jan 08 03:13:47 repeater soundsync[13103]:     at Module.load (node:internal/modules/cjs/loader:982:32)
Jan 08 03:13:47 repeater soundsync[13103]:     at Module._load (node:internal/modules/cjs/loader:823:12)
Jan 08 03:13:47 repeater soundsync[13103]:     at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
Jan 08 03:13:47 repeater soundsync[13103]: 2023-01-08T03:13:47.135Z soundsync:peer:a13e18dd-8e47-45fc-b57b-2e686eba1eca:disconnect Received controller message { type: 'disconnect' }
Jan 08 03:13:47 repeater soundsync[13103]: 2023-01-08T03:13:47.136Z soundsync:peer:a13e18dd-8e47-45fc-b57b-2e686eba1eca Destroying peer, reason: exiting
Jan 08 03:13:47 repeater systemd[1]: soundsync.service: Main process exited, code=exited, status=1/FAILURE

However, if I run Soundsync directly from the command line using the following command /opt/Soundsync/soundsync --no-sandbox --configDir /etc/soundsync it starts up correctly.

I don't see any GH issues mentioning the error message "Error while enumerating devices" so I'm guessing this is not a common problem. Any suggestions on what might be happening and how I can fix it?