Search code examples
node.jsgun

Callback of gundb.once is called with errormessage: Error: No ACK received yet


I tried out gundb in node.js. Calling once after calling get two times results in an error. I did the following in the node console:

var Gun = require("gun/gun");
var gundb = Gun();
gundb.get('user').get('friends').put({name:"Joe"});
gundb.get('user').get('friends').once(function(data,key){ console.log(data);});

and I got the following error:

{ err: 'Error: No ACK received yet.', lack: true }

Solution

  • @Timbow require('gun/gun') in NodeJS includes only GUN core, no storage adapters.

    So after 9 seconds, the put timeouts with a warning/error that no ACK (acknowledgement) has been received that the data was saved to disk.

    If you require('gun/gun'); require('gun/lib/store'); you'll manually include the new NodeJS default storage engine - RAD (Radix storage engine).

    Does this answer your question, or are you wanting to know something else?