Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connect hangs after upgrading to version 2.7.1 #1335

Closed
nbrustein opened this issue Dec 3, 2024 · 3 comments
Closed

connect hangs after upgrading to version 2.7.1 #1335

nbrustein opened this issue Dec 3, 2024 · 3 comments

Comments

@nbrustein
Copy link

Describe the bug

I have the following component that launches a room.

When using version 2.7.0 of livekit-client, I see the behavior I'm expecting:

  1. Click "Start a Conversation"
  2. The ControlBar immediately appears
  3. After a few seconds, I hear the agent's voice, the bars start moving, and I can interact speak back to the agent.

In 2.7.1, the behavior is unexpected. See this screen capture.

  1. 0:03 I click "Start a Conversation"
  2. In the UI, the outside bars turn right, but they do not start moving. The control bar does not appear. I don't hear anything
  3. In the agent console, I can see that the worker is connected to the room and 2 conversation items are created.
  4. 0:20 In the agent console, I see "committed agent speech". I still don't hear anything
  5. 0:25 In the Browser console, I see "publishing track". The bars start flashing, but not moving up and down. I still don't hear anything
  6. 1:20 A message appears on the screen saying "It's quiet..." I dismiss it.
  7. 1:32 In the browser console, I see "Resuming signal connection, attempt 0" then "Resuming signal connection". The control bar appears, but my microphone is initially muted. I still don't hear anything.
  8. 1:35 In the broswr console, I see "Resumed signal connection"
  9. 1:39 I click in the UI to enable my microphone. In the browser console I see "publishing track".
  10. 1:46 I start talking. The bars next to the microphone move.
  11. 1:48 In the agent console, I can see conversation items created for user input_audio.
  12. 1:48 In the browser, the bars start moving and I can hear the agent talking.
function VoiceCoursePracticeRoom({ tokenAttributes }: { tokenAttributes: TokenAttributes }) {
    const [connectionDetails, unsetConnectionDetails, initializeConnectionDetails] = useConnectionDetails({
        tokenAttributes,
    });
    const [agentState, setAgentState] = useState<AgentState>('disconnected');

    return (
        <div data-lk-theme="default" className="grid h-full content-center bg-[var(--lk-bg)]">
            <LiveKitRoom
                token={connectionDetails?.participantToken}
                serverUrl={connectionDetails?.serverUrl}
                connect={!!connectionDetails}
                audio
                video={false}
                onMediaDeviceFailure={onDeviceFailure}
                onDisconnected={() => {
                    unsetConnectionDetails();
                }}
                className="grid grid-rows-[2fr_1fr] items-center"
            >
                <SimpleVoiceAssistant onStateChange={setAgentState} />
                <ControlBar onConnectButtonClicked={initializeConnectionDetails} agentState={agentState} />
                <RoomAudioRenderer />
                <NoAgentNotification state={agentState} />
            </LiveKitRoom>
        </div>
    );
}

Reproduction

For me, all I had to do was use LiveKitRoom with 2.7.1, but I imagine there's more to it than that that I don't understand.

Logs

No response

System Info

System:
    OS: macOS 14.6.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 587.91 MB / 64.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 21.7.3 - ~/.asdf/installs/nodejs/21.7.3/bin/node
    Yarn: 4.5.1 - ~/.asdf/installs/nodejs/21.7.3/bin/yarn
    npm: 10.8.3 - ~/.asdf/plugins/nodejs/shims/npm
  Browsers:
    Chrome: 131.0.6778.86

Severity

blocking an upgrade

Additional Information

No response

@lukasIO
Copy link
Contributor

lukasIO commented Dec 3, 2024

thanks for the report!

I'm able to reproduce an issue around the changes made in #1324 when used in combination with the components framework. Will investigate why this is happening.

@lukasIO
Copy link
Contributor

lukasIO commented Dec 3, 2024

this was a bug that got fixed in #1336 and got released just now as part of v2.7.2.

Thanks again for the detailed report!

@lukasIO lukasIO closed this as completed Dec 3, 2024
@nbrustein
Copy link
Author

Yup. Works for me. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants