-
-
Notifications
You must be signed in to change notification settings - Fork 599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to get object from local datastore #773
Comments
I found out in localstorage of browser there is an installationId which is not JSON object. |
@fahamutech I can submit a PR. Can you post the exact payload that threw the error. |
Fixes: #773 Should we log key, values? Console.log vs warn vs error?
* LDS: Improve Error Handling Fixes: #773 Should we log key, values? Console.log vs warn vs error? * test fix * test debug * test mock localstorage * final test before I give up * remove mock * cleanup
Issue Description
When try to get pinned object from local datastore, results in JSON.parse error
Steps to reproduce
Expected Results
Expected list of object from local datastore
Actual Outcome
SyntaxError: Unexpected token b in JSON at position 0
at JSON.parse ()
at Object.getAllContents (LocalDatastoreController.browser.js:59)
at Object._getAllContents (LocalDatastore.js:61)
at Object. (LocalDatastore.js:313)
at tryCatch (runtime.js:62)
at Generator.invoke [as _invoke] (runtime.js:288)
at Generator.prototype.(:4200/anonymous function) [as next]
Environment Setup
Server
JS SDK
Logs/Trace
SyntaxError: Unexpected token b in JSON at position 0
at JSON.parse ()
at Object.getAllContents (LocalDatastoreController.browser.js:59)
at Object._getAllContents (LocalDatastore.js:61)
at Object. (LocalDatastore.js:313)
at tryCatch (runtime.js:62)
at Generator.invoke [as _invoke] (runtime.js:288)
at Generator.prototype.(:4200/anonymous function) [as next] (http://localhost:4200/vendor.js:142466:21)
at asyncGeneratorStep (asyncToGenerator.js:3)
at _next (asyncToGenerator.js:25)
at asyncToGenerator.js:32
The text was updated successfully, but these errors were encountered: