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
in reverse to #316 and in similar spirit, I found this testing what happens when go-ssb creates the group and invites a JS side.
Somehow I'm getting this error around 20% of the times, even with a huge setTimeout after the sync is done and the go-bot disconnected. The full code is here but let me quote the relevant JS sbot code, too:
letinviteMsg=%q// passed from the go-sidesbot.replicate.request(testBob,true)run()// connect to the go side (which already published it's group messages)// check if we got the stuff once bob disconnectssbot.on('rpc:connect',rpc=>rpc.on('closed',()=>{setTimeout(()=>{sbot.get({private: true,id: inviteMsg},(err,msg)=>{t.error(err,"got hello group msg")t.true(msg.meta.private,'did decrypt')t.equal("what's up alice?",msg.content.text,'has the right welcome text')// console.warn(JSON.stringify(msg, null, 2))exit()})},5000)// was getting the error below}))
not ok 3 got hello group msg
---
operator: error
at: <anonymous> (/home/cryptix/go-repos/ssb/tests/node_modules/ssb-db/create.js:70:25)
stack: |-
TypeError: flumeview-level.get: index for: %x+5CduWrrxQFvNoViY7v8r2In/9v9aIOR1Q97/7pcNM=.sha256pointed at:18247but log error
at /home/cryptix/go-repos/ssb/tests/node_modules/flumeview-level/index.js:170:17
at /home/cryptix/go-repos/ssb/tests/node_modules/ssb-db/minimal.js:54:7
at /home/cryptix/go-repos/ssb/tests/node_modules/flumelog-offset/frame/recoverable.js:48:11
TypeError: Cannot read property 'private' of undefined
at eval (eval at <anonymous> (/home/cryptix/go-repos/ssb/tests/sbot.js:98:3), <anonymous>:11:20)
at /home/cryptix/go-repos/ssb/tests/node_modules/ssb-db/create.js:85:14
at /home/cryptix/go-repos/ssb/tests/node_modules/flumeview-level/index.js:180:15
at /home/cryptix/go-repos/ssb/tests/node_modules/ssb-db/minimal.js:52:7
at /home/cryptix/go-repos/ssb/tests/node_modules/ssb-db/minimal.js:41:35
at AsyncJobQueue.runAll (/home/cryptix/go-repos/ssb/tests/node_modules/ssb-db/util.js:197:32)
at Array.<anonymous> (/home/cryptix/go-repos/ssb/tests/node_modules/ssb-db/minimal.js:41:22)
at chainMaps (/home/cryptix/go-repos/ssb/tests/node_modules/ssb-db/minimal.js:61:14)
at /home/cryptix/go-repos/ssb/tests/node_modules/flumedb/index.js:119:14
at /home/cryptix/go-repos/ssb/tests/node_modules/flumelog-offset/inject.js:93:9
...
I find this concerning because sbot.get should (IMHO) either return the still encrypted or readable message. It feels like poking in there while the decryption updating is happening is dragon territory.
Here are the reproduction steps, similar to the other issue. If you checked that out already, just a pass -run GroupsGoCreate instead for this test case:
git clone https://github.com/cryptoscope/ssb go-ssb
cd go-ssb/tests
git checkout private-groups-4
npm ci
go test -run GroupsGoCreate -count 30 -failfast
Increasing the setTimeout befor the sbot.get from 5 to 10 seconds seems to help a bit.
The text was updated successfully, but these errors were encountered:
Weird. The get method actually uses a flume view-level, as you can see.
After being added to a group your sbot triggers a reindex. This includes that view which feeds get. I would have thought that that view would not respond until it had indexed (might be interesting to look at sbot.progress() or sbot.status())
But it sounds like it knows what the log offset is (it quotes the offset) but then it can't access that? Weird. Need to get into it to debug it. Sigh
in reverse to #316 and in similar spirit, I found this testing what happens when go-ssb creates the group and invites a JS side.
Somehow I'm getting this error around 20% of the times, even with a huge
setTimeout
after the sync is done and the go-bot disconnected. The full code is here but let me quote the relevant JS sbot code, too:I find this concerning because
sbot.get
should (IMHO) either return the still encrypted or readable message. It feels like poking in there while the decryption updating is happening is dragon territory.Here are the reproduction steps, similar to the other issue. If you checked that out already, just a pass
-run GroupsGoCreate
instead for this test case:Increasing the
setTimeout
befor thesbot.get
from 5 to 10 seconds seems to help a bit.The text was updated successfully, but these errors were encountered: