Skip to content

fix: s.brands.find is not a function error#362

Open
evgmel wants to merge 1 commit intoversatica:v3from
evgmel:fix-brands-error
Open

fix: s.brands.find is not a function error#362
evgmel wants to merge 1 commit intoversatica:v3from
evgmel:fix-brands-error

Conversation

@evgmel
Copy link
Copy Markdown

@evgmel evgmel commented Apr 1, 2026

Details

Some browsers throw (s.brands ?? []).find is not a function error when a new Device is created.

That error prevents people with such browsers from starting any webrtc call.

The fix changes the way we check a browser brands, checking exactly that brands property is array, not only null/undefined.

@evgmel
Copy link
Copy Markdown
Author

evgmel commented Apr 7, 2026

Hi @ibc ! Could you please check the PR with the fix?

@ibc
Copy link
Copy Markdown
Member

ibc commented Apr 7, 2026

Hi @ibc ! Could you please check the PR with the fix?

Not really. I am on vacation.

@jmillan
Copy link
Copy Markdown
Member

jmillan commented Apr 7, 2026

@evgmel, just to get more context, can you provide the following info:

  • What device is suffering this issue.
  • What exactly is: userAgentData.brands on such device?

@evgmel
Copy link
Copy Markdown
Author

evgmel commented Apr 7, 2026

@jmillan Unfortunately, we do not gather the detailed values for brands on the devices, except user agents. According to the UA values it's just ordinary web browsers:

  • Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36
  • Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 Edg/146.0.0.0

Our guess is, may be some some browser extension can impact brands value to be of different format.
Most probably it's string (not undefined of null, because in this case the error text would be different).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants