Both setUserId and setEmail throw when they call localStorage properties in browsers without localStorage access. This includes mobile webview browsers inside of mobile applications and private browsing sessions.
Would it be possible to add some lightweight feature detection that localStorage is accessible before making these calls?