question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Malformed UTF-8 data

See original GitHub issue

When trying to get a value from localStorage using the get() method, I receive an error stating

Error: Malformed UTF-8 data

This only happens when using non-Base64 encoding.

The stack trace shows:

Error: Malformed UTF-8 data
    at Object.stringify (secure-ls.js:1845)
    at init.toString (secure-ls.js:957)
    at SecureLS.get (secure-ls.js:248)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
softvarcommented, Aug 11, 2018

Can you guys please clean the localStorage once and try it? If you were on older version, the way data was stored was using a different method than in the latest version i.e. v1.2.1. So, you need to clean the localStorage once before using the latest version

1reaction
mohitrth26commented, Nov 27, 2020

I met the same problem, I resolved it when I clear the local storage

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why I get Malformed UTF-8 data error on crypto-js?
I encrypt a name and pass it as URL parameter. I was supprised, that the decrypt code did not work It was because...
Read more >
Malformed UTF-8 data · Issue #271 · brix/crypto-js - GitHub
Error : Malformed UTF-8 data. But when I try this encrypt(data, '123') and decrypt(data, '123'), it is successful. and why? How to fix...
Read more >
Malformed Utf data : r/CodingHelp - Reddit
I am using cryptojs modules to decrypt a encrypted string using key and iv. I am getting the error Malformed utf data error....
Read more >
Javascript – Why I get Malformed UTF-8 data error on crypto-js
I try to encrypt and decrypt this string using crypto-js : const str = `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
Read more >
How can I fix the UTF-8 error when bulk uploading users?
Question. When I tried to bulk upload users, I received the following error message: For some reason, the data to import was not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found