Root cause identified: rtc-node FFI layer bug I...
# cloud
r
Root cause identified: rtc-node FFI layer bug I analyzed the LiveKit codebase and found the issue. All core RegionUrlProvider implementations correctly include Authorization: Bearer: | SDK | Auth Header | Code | |--------------|-------------|------------------------------------------------------------| | Rust | ✅ | headers.insert(AUTHORIZATION, format!("Bearer {}", token)) | | JavaScript | ✅ | headers: { authorization: 'Bearer token' } | | Android | ✅ | .header("Authorization", "Bearer $token") | | Flutter | ✅ | 'authorization': 'Bearer $token' | | rtc-node FFI | ❌ | Not passing token to Rust | The bug is in uniffi-bindgen-node - the FFI layer that bridges Node.js to Rust. The token exists (logs show "Token present: YES"), but the FFI binding isn't forwarding it to RegionUrlProvider::fetch_region_urls. Proof: # Without auth (what SDK does) - FAILS curl https://<project>.livekit.cloud/settings/regions → "unauthorized" # With auth (correct behavior) - WORKS curl -H "Authorization: Bearer $TOKEN" https://<project>.livekit.cloud/settings/regions → {"regions":[...]} Affected: @livekit/rtc-node 0.13.x, @livekit/agents 1.0.x Users impacted: 8+ in this Slack (Joshua Rayan, prathamesh, Rin Arakaki, Heorhi, Shane McDermed, Gaurav Jarwal, Maarten, myself) Can engineering check the token handling in livekit/uniffi-bindgen-node/templates/node.ts? @lively-winter-88668
r
Thanks for the detailed report. I shared with the client team.
Not sure I follow your analysis here.
@livekit/rtc-node
doesn't use UniFFI as the FFI layer
Also, we are not clear on how running curl with and without an auth header constitutes proof of a bug in the Node SDK
r
The LiveKit SDK (
@livekit/rtc-node
v0.13.22) fails to connect to LiveKit Cloud rooms because it makes an unauthenticated HTTP request to
/settings/regions
, which returns "unauthorized". - whats the issue then @refined-appointment-81829?
l
Hey @rhythmic-king-41914, I'm struggling to follow the detailed logic, how can I reproduce this for myself?