# PulseAudio connection error in unit test on Linux

**URL:** https://qa.fmod.com/t/pulseaudio-connection-error-in-unit-test-on-linux/21927
**Category:** Unity
**Created:** [July 25, 2024, 12:41pm UTC](https://qa.fmod.com/t/pulseaudio-connection-error-in-unit-test-on-linux/21927 "2024-07-25T12:41:26Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![JulianKlang](https://avatars.discourse-cdn.com/v4/letter/j/a4c791/32.png) [@JulianKlang](https://qa.fmod.com/u/JulianKlang)
#### Post date: [July 25, 2024, 12:41pm UTC](https://qa.fmod.com/t/pulseaudio-connection-error-in-unit-test-on-linux/21927/1 "2024-07-25T12:41:26Z")

</div>

Hey there,

An automated unit test (that is for Linux I think) on our Github / CI page fails with the following error:

```auto
SetUp : Unhandled log message: '[Error] [FMOD] FMOD_PulseAudio_CheckOutputSupport : pa_context_connect returned -1.
'. Use UnityEngine.TestTools.LogAssert.Expect
FMODUnity.RuntimeUtils:DebugLogError (string) (at /project/subprojects/packages/seed-audio-fmod/Plugins/FMOD/src/RuntimeUtils.cs:582)
FMODUnity.RuntimeManager:DEBUG_CALLBACK (FMOD.DEBUG_FLAGS,intptr,int,intptr,intptr) (at /project/subprojects/packages/seed-audio-fmod/Plugins/FMOD/src/RuntimeManager.cs:104)
FMOD.System:setOutput (FMOD.OUTPUTTYPE) (at /project/subprojects/packages/seed-audio-fmod/Plugins/FMOD/src/fmod.cs:1048)
FMODUnity.RuntimeManager:Initialize () (at /project/subprojects/packages/seed-audio-fmod/Plugins/FMOD/src/RuntimeManager.cs:330)
FMODUnity.RuntimeManager:get_Instance () (at /project/subprojects/packages/seed-audio-fmod/Plugins/FMOD/src/RuntimeManager.cs:207)
FMODUnity.RuntimeManager:get_StudioSystem () (at /project/subprojects/packages/seed-audio-fmod/Plugins/FMOD/src/RuntimeManager.cs:225)
FMODUnity.StudioListener:AddListener (FMODUnity.StudioListener) (at /project/subprojects/packages/seed-audio-fmod/Plugins/FMOD/src/StudioListener.cs:72)
FMODUnity.StudioListener:OnEnable () (at /project/subprojects/packages/seed-audio-fmod/Plugins/FMOD/src/StudioListener.cs:90)
UnityEngine.GameObject:AddComponent<FMODUnity.StudioListener> ()
Klang.Seed.AudioFMod.AudioFmodWrapper:.ctor (Klang.Seed.AudioFMod.IAudioFmodDataProvider) (at /project/subprojects/packages/seed-audio-fmod/Runtime/AudioFmodWrapper.cs:145)
...

```

I didn’t have that error before, I just updated the FMOD Unity plugin (from 2.02.03 or sth to 2.02.23), matching the right FMOD Studio version. The plugin is part of a package in Unity being used in multiple projects.

Unity is 2022.3.24f1.

ChatGPT told me that PulseAudio might not be running or is not properly configured on the system where the test is running, or that the test environment might lack necessary permissions, dependencies, or it might be running in an environment where audio is not properly set. How could I do any of these?

What error cause/solution would you see?

I don’t have a Linux computer to test it locally unfortunately. It runs fine locally on Windows and Mac without any errors.

Best,

Julian

---

<div class="post-metadata">

### Author: ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)
#### Post date: [July 30, 2024, 2:38am UTC](https://qa.fmod.com/t/pulseaudio-connection-error-in-unit-test-on-linux/21927/2 "2024-07-30T02:38:31Z")

</div>

Hi,

You appear to be running into a known issue with running FMOD on Linux systems with reduced audio services, which has already been passed on to the development team for further investigation. Another user who ran into the has posted a workaround here: [Getting PulseAudio dependency to work in Ubuntu Docker image - #2 by joeanderson](https://qa.fmod.com/t/getting-pulseaudio-dependency-to-work-in-ubuntu-docker-image/21897/2)

As well as a GitHub repo demonstrating the error and the workaround: [Getting PulseAudio dependency to work in Ubuntu Docker image - #4 by joeanderson](https://qa.fmod.com/t/getting-pulseaudio-dependency-to-work-in-ubuntu-docker-image/21897/4)

I would recommend giving that user’s workaround a try and seeing whether it resolves the issue for you.
