SCStream.startCapture fails with Error received from the remote queue -16665

Trying to integrate the new screencapturekit into our application.

The stand alone test we made works fine, however when integrated, when we start the stream capture we get this error in the logs

(ScreenCaptureKit)  [ERROR] _SCStream_RemoteAudioQueueOperationHandlerWithError:1032 Error received from the remote queue -16665

Any insights what might be causing this?

this is what we're passing addStreamOutput

private let sampleQueue = DispatchQueue(label: Bundle.main.bundleIdentifier! + ".SampleQueue")

self.stream = SCStream(filter: filter, configuration: self.streamConfig, delegate: self)       
do {
      try self.stream?.addStreamOutput(self, type: .screen, sampleHandlerQueue: self.sampleQueue)
}

We have the whole handlers and what not, pretty much verbatim from the apple provided sample