Service Failed Error when I try to start share the audio

I have got the Service Failed Error (ZoomSDKError_ServiceFailed) when select “Share Audio” option in the Sample App (with custom UI).
Even when the current user is host or co-host of the meaning.

    ZoomSDKError error = [asController startAudioShare]; // error == ZoomSDKError_ServiceFailed

Xcode 11.4
Mac OS Catalina 10.15.7

Hi @anton.yereshchenko, thanks for the post.

I noticed that you are using Xcode 11.4. Currently the Mac SDK only supports up to Xcode 10. Can you please try to reproduce this issue with a support version of Xcode?

Thanks!

Hi Jon,

Can you or anyone else provide an update on whether there is a potential SDK bug around this when using startAudioShare?

I know this is an old thread but it was the top hit I could find when searching for the error I’m encountering.

I’m noticing that when attempting to call startAudioShare, I reliably get a ZoomSDKError_ServiceFailed result.

All of the necessary system permissions would seem to be correctly added in my case, I can share my screen, camera, and microphone for example without any problems. It’s not entirely clear to me what the ZoomSDKError_ServiceFailed error represents in this case.

Zoom SDK Vers: 5.5.12511.0420
macOS Version: 11.4

Thank you,

Hi @matt.r.zoom,

I am not aware of any known bugs related to sharing your audio with the macOS SDK. Can you provide some context around when you are calling this method? Also, are you using default or custom UI?

Thanks!

Hi Jon,

Thanks for the reply. I’m not sure if there’s anything notable or unusual about the context in which we’re calling startAudioShare; we’re using it to provide a means to share the system audio during a meeting. We are using a custom UI.

Can you possibly provide some insight into what the ZoomSDKError_ServiceFailed actually indicates?

Thank you

Hi @matt.r.zoom,

I mostly wanted to ensure that this was not being called at an invalid time, but that does not seem to be the case. :slightly_smiling_face:

This error code is unfortunately a little on the vague side and could indicate a lot of different issues. It basically means that there was an error communicating with the back end service associated with the feature.

Can you double-check whether or not you are able to share the computer audio when using the default UI in the same meeting and as the same user as the one who is receiving the ZoomSDKError_ServiceFailed error? An easy way to test this side-by-side with the custom UI approach would be to call showMeetingComponent with a value of MeetingComponent_ShareOptionWindow, which will display a modal containing the default UI’s share menu.

Thanks!

Hi @jon.zoom ,

Can you double-check whether or not you are able to share the computer audio when using the default UI

Thank you for the suggestion, I will check that. I’m also noticing now that there is a more specific SDK error we’re seeing in this case which is ZoomSDKError_NoAudioData.

Any chance you could elaborate on what the NoAudioData indicates?

I thought perhaps it was due to an issue with the hardware audio sources, but I’ve verified that everything there is Ok (the Mac has valid audio sources chosen for both output and input. No other software seems to have a problem either playing or recording audio on the device.)

Thank you

Hi @matt.r.zoom,

Can you please clarify where exactly you are seeing this error returned? Also, are you on the same version of the SDK, or have you updated since your last post?

Thanks!

Hi Jon,

I believe we were receiving ZoomSDKError_NoAudioData (13) as the result for startAudioShare on the ZoomSDKASController, but when I double-checked just now, the past few attempts I’ve instead received a ZoomSDKError_ServiceFailed (3) error as the original post noted.

Regarding the SDK version, the particular app/codebase we’re working on can’t be upgraded to the latest Zoom SDK unfortunately, as the newer version introduced a breaking change for us (I believe it is related to MobileRTCMeetingUserInfo.customerKey which was previously participantID frequently returning nil in the current SDK version).

Hi @matt.r.zoom,

when I double-checked just now, the past few attempts I’ve instead received a ZoomSDKError_ServiceFailed (3) error as the original post noted.

Thanks for checking that. Have you had a chance to check this behavior against the default UI yet?

Regarding the SDK version, the particular app/codebase we’re working on can’t be upgraded to the latest Zoom SDK unfortunately, as the newer version introduced a breaking change for us (I believe it is related to MobileRTCMeetingUserInfo.customerKey which was previously participantID frequently returning nil in the current SDK version).

We should be resolving any issues related to the customerKey in the next SDK release. Are you saying that this completely breaks your implementation to the point that you are unable to verify whether or not the behavior you are seeing is still present? If that is not the case, it would be worth checking just to rule out variables in case we identify that this is something that must be fixed internally to the SDK.

Thanks!

Hi Jon,

Quick update re: above, I attempted to plug SDK version 5.7.1.644 into our app and re-test, and in the last few tests I’m still seeing the same consistent errors (in this case it was error code 3, ZoomSDKError_ServiceFailed). This is the result we’re getting when we call into startAudioShare.

Hi @matt.r.zoom,

Thanks for trying to update. Have you been able to test the behavior in the default UI yet in your implementation?

Thanks!

@jon.zoom

Hi. I am developer for a different app and ran into this same issue.

Context:

When attempting to share audio only, I received a ZoomSDKError_ServiceFailed error. This was while using the startAudioShare method in the ZoomSDKASController class. I am using the latest SDK v5.7.6.1333. The same issue occurred in 5.7.1.644.

After trying to debug it for quite some time, I tried to use the same functionality in the same meeting in the full Zoom app on the same machine.

In that app, while attempting to share audio only, I had a pop-up warning that stated that some audio service was missing, and it gave me an option to launch it.

After this, I was able to share audio only in our custom-UI application.

I also needed to un-mute the machine that was sharing audio.

How does one launch this service in a custom UI app? What exactly is it? Where does this service live in MacOS? I killed all Zoom processes but audio still works in our custom app.

Hi @KieranAC, thanks for using the dev forum.

Could you please provide the name of the audio service that was required, or a screenshot of the modal you saw when running the client? It seems like it may be possible that something was missing from the SDK when it was added to your project, so we’d need some additional information to confirm.

Thanks!

On my developer macbook I no longer get this message, and I can share audio fine. This has been working since I saw this message yesterday in the Zoom client. I confirmed that it still works even after a restart.

On a different macbook machine, on which I have never shared audio via zoom before, I was able to generate this message in the Zoom client.

It seems like there is a one-time service launch in the full Zoom client that our custom UI app is not doing.

This is the message I received in the Zoom client:

So the question is: How do we start this service in a custom UI app?

Hi @KieranAC,

I think the SDK should be capable of launching this service without the help of the client. Can you please provide a screenshot of how the SDK’s files have been setup in your project’s Build Phases tab?

Thanks!

I cross-checked the Zoom sample app and I noticed I was missing two files: zmLoader.bundle and zVideoUIEx.bundle.

However, I have added these files and tested the app on a device on which I have not installed this audio service (via zoom app), and I still receive error 3: ‘ServiceFailed’. The device on which I did install this audio service still works as expected.

The Build Phases / Copy Files section now looks identical to the sample app, as far as I can see.

Another realization: The machine that works has a ‘ZoomAudioDevice’ in the MacOS Preferences > Sound window. The device that does not work does not have this.

image

Hi @KieranAC,

I’m not sure why I’m not seeing the same behavior as you in both the client and SDK. What version of macOS are you running?

Also, can you please provide the SDK logs from a session where this behavior is reproducible so that we can investigate this further? Before retrieving them, first ensure that logs are enabled when initializing the SDK via ZoomSDKInitParams.enableLog. You can find the logs at ~/Library/Containers/${YOUR_PACKAGE_NAME}/data/Library/Logs. The correct log file will be encrypted.

Thanks!

@jon.zoom

I’m using MacOS 11.6

First of all, you can simulate this scenario by killing the Zoom Audio Device:
sudo rm -r /Library/Audio/Plug-Ins/HAL/ZoomAudioDevice.driver

I suspect your test machine has this service running which is why your environment works. This wouldn’t be the case for a new Zoom user which is the scenario I am concerned about.

Based on this thread: How to install the ZoomAudioDevice.driver? - #6 by jon.lieblich

I tried a few things. I added the ZoomAudioDevice.driver to my project and created a copy files phase like so:

image

This is successfully copying the file to the Content/Plugins directory of my app:

ls Bin/Release/MyApp.app/Contents/PlugIns
ZoomAudioDevice.driver

However, when I run this I still get the ‘Error 3’. The file is there, but nothing seems to be launching it when it’s needed.

I enabled logs via ZoomSDKInitParams.enableLog but I don’t see any output in the folder you mentioned.