React-native-debugger: Could not read from localStorage. SyntaxError: Unexpected token C in JSON at position 0

Created on 29 Sep 2018  路  11Comments  路  Source: jhen0409/react-native-debugger

React Native Debugger app version: 0.8.0
React Native version: 0.55.1
Platform: iOS
Is real device of platform: Yes
Operating System: macOS

After the debugger updated to the latest version, I started getting this error (in console):

Could not read from localStorage

I'm using ejected react native and react native navigation, otherwise nothing out of the ordinary I guess

Most helpful comment

@smirea it's to clear the localStorage of Debugger, in Application tab.

All 11 comments

It鈥檚 from the new version of react-devtools, you can try to reset local storage and restart again.

It's now on the release note.

Worked, thanks

clearing AsyncStorage does not work for me (rn 0.42), any other workaround?

if not, is there a way to disable auto-updates?

@smirea it's to clear the localStorage of Debugger, in Application tab.

still no luck, I cleared Local Storage and a full "Clear Site Data".
Note: I'm getting the "Cannot parse JSON" message, but it's not prefixed by "Could not read from local storage"

screen shot 2018-10-01 at 3 51 41 pm

This is another error.

To make it clear for others, below is a screenshot showing where you need to go to clear local storage of React Native Debugger, which will fix this error. You do not need to clear the AsyncStorage of your app itself.

screen shot 2018-10-02 at 3 02 36 pm

@jordanmkoncz this doesn't fix the issue, I'm still getting an endless cycle of errors.

image

I'm running Xcode v9.3 (9E145) and React Native Debugger v0.8.0.

Btw, there's no option to ignore an upcoming Debugger update. Even if I install an older version, it updates itself on next app reboot.

Please open an another issue with details for tracking the JSON.parse error of WebSocket message.

@fronteed if you want a patch-work solution, you can download the source code for 7.10, open electron/update.js and put a return at the beginning of the function, you can then build it with scripts/package-macos.sh and just run that

sorry for the hack-job, but having your devtool force update in the middle of development is a cause for desperate measures

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghasemikasra39 picture ghasemikasra39  路  3Comments

buncis picture buncis  路  5Comments

Mathieuka picture Mathieuka  路  3Comments

JodiWarren picture JodiWarren  路  3Comments

khomyakov42 picture khomyakov42  路  4Comments