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

Use AutoDiscovery.getRawClientConfig() instead of MatrixClient.getClientWellKnown() and wait for result #2906

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

hughns
Copy link
Member

@hughns hughns commented Dec 16, 2024

I'm very open to suggestions on what is sensible to test around this...

This is a second attempt at #2901

…entWellKnown()

I'm open to suggestions on what is sensible to test around this...
@fkwp
Copy link
Contributor

fkwp commented Dec 17, 2024

I tested it on EX iOS nightlies -- and it works

Copy link
Contributor

@toger5 toger5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is quiet a big issue and very much in conflict with the mission that users should use their own SFU configured on their home servers, I think we really should merge this asap.
Otherwise all our communication that users should not rely on the config in EC is wrong if it does not work atm.

So I will approve this and merge it. But Will also open an issue that this migh be fixable with a underling race condition.

Comment on lines +52 to +54
const wellKnownFoci = (await AutoDiscovery.getRawClientConfig(domain))?.[
FOCI_WK_KEY
];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we want to do a check if the client already knows about the well known? so we save the http request in that case. I suspect this is a race condition since it worked at some point.
So maybe at some point this works again.

I also think however that we might want to get to the root of where this race condition occurs. And when we find it, we can use the old logic again.

Suggested change
const wellKnownFoci = (await AutoDiscovery.getRawClientConfig(domain))?.[
FOCI_WK_KEY
];
const wellKnownFoci = rtcSession.room.client.getClientWellKnown()?.[FOCI_WK_KEY] ? (await AutoDiscovery.getRawClientConfig(domain))?.[
FOCI_WK_KEY
];

@toger5 toger5 merged commit 53fff37 into livekit Dec 17, 2024
7 checks passed
@hughns hughns deleted the hughns/well-known-auto-discovery branch December 17, 2024 18:53
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.

3 participants