Bugs

identify() breaks for users with non-Latin-1 names

-2 мес.Готово

Hi,

The widget SDK throws whenever I identify a user whose name has a character above U+00FF:

Error writing localStorage key "uj_userId": InvalidCharacterError: The string contains invalid characters.

Repro:

window.uj.identify({ id: 'usr_0001', email: 'anna@example.com', firstName: 'Anna', lastName: 'Łukasiewicz' })

Swap in an ASCII surname and it's fine. The cutoff is U+00FF rather than "has an accent", which makes it look random — btoa('Márquez') is fine, btoa('Łukasiewicz') is not. So it hits Polish, Czech, Turkish, Hungarian names and anything non-Latin.

Looks like your localStorage helper does:

const s = JSON.stringify(n), l = btoa(s); localStorage.setItem(r, l)

No UTF-8 step before btoa. Your encodeClientToken in the same bundle already handles this properly with TextEncoder — same treatment here should do it.

Not urgent for us: it's caught, and identification still works since the client token uses the correct encoding path. Just console noise and a cache that never fills.

One other thing while I'm here — the widget iframe throws "Permission policy 'Fullscreen' check failed" for minto.userjot.com. Seems harmless, but flagging in case something's meant to go fullscreen and can't.

Thanks, David

3 комментария

  1. David-2 мес.

    yes, thanks, also thanks for the heads up, migrating to v3

  2. Shayan Taslim ставит статус «Готово»-2 мес.
  3. Shayan Taslim-2 мес.

    Hey! I pushed a fix for this to our widget! Please give it a try and let me know if its resolved for you. Additionally, I would suggest looking into our v3 widget! This is the new widget we have built from scratch.

  4. Shayan Taslim-2 мес.

    Thanks for reporting this to me! I'm looking into it now.

  5. Shayan Taslim ставит статус «В работе»-2 мес.