Browser refresh: StateError: There is no upstream conduit

0

Hi, I have embeddedthe Streams API in an angular project. I have made a custom UI for messaging using amazon connect and amazon chat-js. It works perfectly good untill i refresh the browser. When i refresh my browser i check the

getContact details in connect.EventType.INIT, as you can see in code snippet,
  connect.core.getEventBus().subscribe(connect.EventType.INIT, ()=>{
      this.connectService.getAgent((agent)=>{
        let agentActiveContacts = agent.getContacts();

        if(agentActiveContacts.length != 0){

            agentActiveContacts.map(async (contact: any) => {
              if(contact.getType() == 'chat'){
                try {
                  const mediaController = await contact.getAgentConnection().getMediaController();
                  console.log("Media controller obtained successfully:", mediaController);
                } catch (err) {
                  console.log("Error obtaining media controller:", err);
                }
                
              }
            })
          }
      })
    })

According to documentation promise resolve to a ChatSession.

Gets a Promise with the media controller associated with this connection. The promise resolves to a ChatSession object from amazon-connect-chatjs library.

But i got the error here that

Uncaught (in promise): StateError: There is no upstream conduit! StateError: There is no upstream conduit!

Can you please help me to findout the problem that where i got wrong?

S_Ali
질문됨 3달 전139회 조회
1개 답변
0

Hello,

From the error, I believe it is happening when try to fetch some information from the code. Kindly check the HAR file to find more information for the error and further troubleshoot the issue.

[+] https://github.com/amazon-connect/amazon-connect-streams/blob/master/src/index.d.ts

AWS
답변함 3달 전
profile picture
전문가
검토됨 2달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠