throneless-tech / libsignal-service-javascript

A javascript library for basic interaction with the Signal messaging service, adapted from Signal-Desktop.
GNU General Public License v3.0
57 stars 21 forks source link

V1 session storage migration error: registrationId undefined for open session version undefined #15

Closed michaelkebe closed 3 years ago

michaelkebe commented 3 years ago

I am using the example client.js. Sometimes I get this:

$ node client.js receive
V1 session storage migration error: registrationId undefined for open session version undefined
V1 session storage migration error: registrationId undefined for open session version undefined
Message read on +55555555555 at timestamp 1610319102231
Message successfully delivered to number +491785647138 and device 2 at timestamp 1610319102231
Message successfully delivered to number +491785647138 and device 1 at timestamp 1610319102231
V1 session storage migration error: registrationId undefined for open session version undefined
V1 session storage migration error: registrationId undefined for open session version undefined
Message read on +55555555555 at timestamp 1610319134206
Message successfully delivered to number +491785647138 and device 2 at timestamp 1610319134206
Message successfully delivered to number +491785647138 and device 1 at timestamp 1610319134206

But everything seems to work.

jheretic commented 3 years ago

Yeah, this seems to be an issue in the upstream wire-protocol library, libsignal-protocol-javascript. As far as I've been able to tell, it seems like it's giving that error because it's trying to migrate to a newer version of the session protocol, but it's already receiving messages in the newer format. I think it's just skipping the migration rather ungracefully, since it doesn't seem to cause any problems. It looks like Signal is in the process of migrating their wire protocol library to use Rust (I imagine cross-compiling to wasm and other formats for platforms like this), so I imagine libsignal-protocol-javascript (which hasn't been significantly updated in some years) will go away eventually anyway.

That said, if anyone can find something I'm doing wrong that's causing this error, I'd be happy to fix it! But this is what I've been able to tell from my own investigations, I don't think it's a problem and it's not worth fixing since the library in question will likely be replaced soon. Going to close out this issue for now, but lmk if you have any other thoughts on this error message.