Bugs

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

há 2 mesesConcluído

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 comentários

  1. Davidhá 2 meses

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

  2. Shayan Taslim marcou como Concluídohá 2 meses
  3. Shayan Taslimhá 2 meses

    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 Taslimhá 2 meses

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

  5. Shayan Taslim marcou como Em andamentohá 2 meses