Skip to content

Fix duplicated LiveKit modules in Metro bundle breaking useRoomContext - #38

Merged
MaxHeimbrock merged 1 commit into
mainfrom
max/fix-metro-dual-package-hazard
Aug 7, 2026
Merged

Fix duplicated LiveKit modules in Metro bundle breaking useRoomContext#38
MaxHeimbrock merged 1 commit into
mainfrom
max/fix-metro-dual-package-hazard

Conversation

@MaxHeimbrock

@MaxHeimbrock MaxHeimbrock commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Problem

On Expo SDK 53+ / React Native 0.79+, connecting to a room and rendering the assistant screen throws:

ERROR [Error: tried to access room context outside of livekit room component]

even though SessionProvider (via ConnectionProvider) is mounted above the screen.

Fix

Bump SDK to v2.11 or newer. In this case v2.12

@xianshijing-lk
xianshijing-lk requested a review from davidliu August 7, 2026 06:20
@davidliu

davidliu commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

@MaxHeimbrock I think this got fixed in @livekit/react-native v2.11

https://github.com/livekit/client-sdk-react-native/releases/tag/%40livekit%2Freact-native%402.11.0

Can you try updating the dependencies to latest?

@MaxHeimbrock

Copy link
Copy Markdown
Contributor Author

@MaxHeimbrock I think this got fixed in @livekit/react-native v2.11

https://github.com/livekit/client-sdk-react-native/releases/tag/%40livekit%2Freact-native%402.11.0

Can you try updating the dependencies to latest?

Seems like it, I will then change the PR to bump the SDK to a newer version. Thanks for the context.

@MaxHeimbrock
MaxHeimbrock force-pushed the max/fix-metro-dual-package-hazard branch from c37b5ed to 6ad2645 Compare August 7, 2026 10:25
@MaxHeimbrock
MaxHeimbrock force-pushed the max/fix-metro-dual-package-hazard branch from 6ad2645 to cb2db70 Compare August 7, 2026 10:28
@MaxHeimbrock
MaxHeimbrock merged commit cd5f813 into main Aug 7, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants