Skip to content

Error restoring data [object Object] #16

@piotr-cz

Description

@piotr-cz

Reported by @bigfree:

I try, build is success but now there is an error in retrieving data from the DB 😢

redux-persist/getStoredState: Error restoring data [object Object] SyntaxError: Unexpected token o in JSON at position 1
    at JSON.parse (<anonymous>)
    at defaultDeserialize (getStoredState.js:39:1)
    at getStoredState.js:23:1

The data is stored in the database, but when the page is refreshed, it is no longer in the database. However, the structure of the database remains the same.

Store data:
image

After refresh:
image

My persist config:

const persistConfig: PersistConfig<any> = {
    key: 'root',
    version: 1,
    storage: createIdbStorage({
        name: 'craedit',
        storeName: 'craeditstore',
        version: 1
    }),
    timeout: 100,
    serialize: false,
    debug: true,
    blacklist: ['point']
};

Originally posted by @bigfree in #14 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions