You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I detected a problem when trying to use gun in the browser with indexeddb.
Apparently, I cannot get data from a node after a browser refresh.
This is the localStorage implementation, which works fine:
// setup with localStorageconstgun=Gun();// rungun.get('something').val()// undefined as expectedgun.get('something').put({timestamp: Date.now()})gun.get('something').val()// timestamp as expected// refreshgun.get('something').val()// timestamp as expected
This is the indexeddb implementation, which has the problem:
(same thing with level-js and fruitdown)
// setup with indexedDBconstGun=require('gun-level');constlevelup=require('levelup');constleveldown=require('level-js');constdb=leveldown('my-big-db');db.status='unknown';// see https://github.com/Level/level.js/issues/59constgun=Gun({localStorage: false,level: levelup(db),});// rungun.get('something').val()// undefined as expectedgun.get('something').put({timestamp: Date.now()})gun.get('something').val()// timestamp as expected// refreshgun.get('something').val()// undefined !!// wait a lot of timegun.get('something').val()// still undefined !!// write again, then readgun.get('something').put({timestamp: Date.now()})gun.get('something').val()// timestamp as expected
The text was updated successfully, but these errors were encountered:
I detected a problem when trying to use gun in the browser with indexeddb.
Apparently, I cannot get data from a node after a browser refresh.
This is the localStorage implementation, which works fine:
This is the indexeddb implementation, which has the problem:
(same thing with level-js and fruitdown)
The text was updated successfully, but these errors were encountered: