Expand my Community achievements bar.

Error: The stream cannot be created because it already exists.

Avatar

Level 3

I had everything working but now I get a


Error: The stream cannot be created because it already exists.
    at com.adobe.rtc.sharedManagers::StreamManager/createStream()
    at com.adobe.rtc.collaboration::AudioPublisher/createStream()
    at com.adobe.rtc.collaboration::AudioPublisher/publish()
    at SimpleChat/startAudio()
    at SimpleChat/startAV()
    at SimpleChat/onItemReceive()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at com.adobe.rtc.sharedModel::CollectionNode/http://www.adobe.com/2006/connect/cocomo/messaging/internal::receiveItem()
    at com.adobe.rtc.messaging.manager::MessageManager/http://www.adobe.com/2006/connect/cocomo/messaging/internal::receiveItem()
    at com.adobe.rtc.session.managers::SessionManagerBase/receiveItem()

when I call publish(); the first time.


        protected function startAudio(buddyID:String):void
        {
            if ( this.audioPub.isPublishing ) {
                return;
            }
            var aIDs:Array = new Array(buddyID);

            this.audioPub.publish();
            this.audioPub.recipientIDs = aIDs;
           
             this.audioSub.subscribe();
             this.audioSub.publisherIDs = aIDs;
        }

I'm cleaning up with

            this.audioPub.stop();
            this.audioSub.close();

6 Replies

Avatar

Employee

Hi Hinne,

Can you share other piece of code if its possible ?

Also are you using ScreenSharing in your app by any chance ?

Thanks

Arun

Avatar

Level 3

there is nothing much to it:


        protected var audioPub:AudioPublisher = new AudioPublisher();


        protected function onLogin(p_evt:SessionEvent):void
        {   
            audioPub.connectSession = _cSession;
            audioPub.sharedID = SHARED_ID_VOIP;
            audioPub.addEventListener(StreamEvent.STREAM_RECEIVE, onStreamReceive);
            audioPub.addEventListener(StreamEvent.STREAM_DELETE, onStreamDelete);
            audioPub.gain = this.audioPub.gain;
            audioPub.useEchoSuppression = true;
        }

no ScreenSharing

Avatar

Employee

I dont see anything crazy in your code, and just verified that nothing broke with the new SDK release. Can you check you dev console and see if the stream exits even after quitting your app.

Thanks

Arun

Avatar

Level 2

Make sure to re-start the console and reopen just to be sure. We had issue creating rooms where we thought they were not being created and they were but the console would not update until we actually close it and re-open it.

Cheers.

+LA

Avatar

Level 3

this is really strange. the problem disapeared. I just messed around in the console. I think this comes from disconnecting using debugger.

Avatar

Level 3

I had this problem again after changing my code.

I mooved


            _audioPub = new AudioPublisher();

               ...
             _audioSub = new AudioSubscriber();

               ...

from

             onLogin(p_evt:SessionEvent)

to a Button MouseEvent.CLICK proc.

If I null the AudioPublisher and AudioSubscriber when closing audio connection


            _audioPub = null ;
             _audioSub = null ;

the problem persist till next day.