Open spinningarrow opened 9 years ago
@spinningarrow could you show me the code with the .publish()
call? Can you make sure that it succeeds by doing something like
hoodie.store.add(<something>).publish()
.fail(function(error) {
console.log(error)
});
I did something similar:
hoodie.store.add(<something>).publish().then(function () { console.log('success'); }, function () { console.log('error'); })
and didn't see error
.
The funny thing is, if I run hoodie.global.sync()
in the devtools console, I suddenly see all the documents that I should have (and then the updating continues if new documents are created).
hmm odd. This should make sure that hoodie.global
listens to changes, but it seems that this doesn't work here from some reason. I'm a bit flooded with work right now, I wish I could help you better debugging this.
Could you try to put in another hoodie.global.connect()
call after the hoodie.global.on('add', callback)
line?
I had the same problem and got it fixed with hoodie.global.connect()
. Btw, hoodie.global('some-type').connect()
doesn't work
If I add a
hoodie.global.on('add', callback)
statement in my JS file, and then dohoodie.store.add(<something>).publish()
from a different browser session/user, thecallback
doesn't actually get called. What am I doing wrong?