loqui / im

Loqui IM allows you to use all your chat accounts in just one FirefoxOS or Ubuntu Touch app.
https://loqui.im
304 stars 112 forks source link

don't receive wa-message from groups when sent fom iphone #1053

Closed MartinSauer closed 8 years ago

MartinSauer commented 8 years ago

Messages from other groupmembers are coming in. Loqui 0.5.3 on ffos 2.2 (open c).

sagardahale commented 8 years ago

Wait fot 0.5.4.. Will be available soon

cmeerw commented 8 years ago

0.5.4 is unlikely to help...

Loqui doesn't yet support encrypted group messages - and some WhatsApp clients don't support fallback to plaintext messages...

jambolo1970 commented 8 years ago

same condition, i do not receive some users messages, both single and group chat indifferent.

ver. 0.5.4 in use on firefox 1.3 alcatel fire E

cmeerw commented 8 years ago

If it's for non-group messages then please provide debug log files.

jambolo1970 commented 8 years ago

2016-04-30_0.log.zip

cmeerw commented 8 years ago

That log mainly shows the group message issue.

There is only one non-group message being received in the log and that appears to have been received fine ("Ciao 2 capi...")

Can you please clarify what problem you are seeing?

sagardahale commented 8 years ago

Cmeerw what is mean of whatsapp 1.6 protocol?

jambolo1970 commented 8 years ago

In my case one of the two posts, had been sent by the sender Friday afternoon, but was only received today (Saturday) at 11:30 or so, the group instead seem to get messages with wrong timeline or not getting some messages.

I hope you do not mind if I keep you updated log files 2016-04-30_0.log.zip update

cmeerw commented 8 years ago

@jambolo1970 the first log only starts at 11:36... which message are you referring to? Anyway, please open a separate issue with a detailed description and matching log files.

cmeerw commented 8 years ago

I have just checked in some initial support for receiving encrypted group messages. Note that there is a chance that decryption will still continue to fail in existing groups as Loqui is missing the decryption keys and I am not sure how to recover from that situation. Situation should be better for newly created groups...

sagardahale commented 8 years ago

cmeerw when 0.5.4 will available on marketplace? My lroblem is still not solved.. Plz help

cmeerw commented 8 years ago

You have to ask the marketplace people, nothing I can do.

sagardahale commented 8 years ago

Normally how much time it takes?

cmeerw commented 8 years ago

And in case you are wondering... Decryption for group messasges will only be in 0.5.5, but I am still waiting for some test feedback on that one...

Folks, if people don't test development versions, it will take longer for new versions to be uploaded to the marketplace. And on top of that marketplace people always take a long time to review any updates anyway.

sagardahale commented 8 years ago

Mi fakt vicharla..bhadakto kay evdha!!

MartinSauer commented 8 years ago

How can i test the dev-version? Are there instructions?

cmeerw commented 8 years ago

https://github.com/loqui/im/wiki/Build-Loqui

janu2015 commented 8 years ago

@cmeerw I upgraded to latest sources. After (re-) connecting I get three DECRYPT ERROR log messages. The receipt receiver is a group admin, he's sending encrypted. Please check the attached log. 2016-05-04_6._14-51.log.txt

cmeerw commented 8 years ago

Ok, so the decryption error is kind of expected (I guess) as Loqui is missing encryption keys for the group (which were sent earlier). However, the "retry" message that Loqui sent in response to this wasn't correct. Might be better now... If not, leaving and re-joining the group could help as well...

janu2015 commented 8 years ago

At least one group message has been decrypted by retry :smiley: :+1: 2016-05-04_7-retry.log.txt

While testing I probably noticed two issues:

Some items (1462377719-1, 1462377654-0) related to message id 1462377855-2 are received from different participants: 49SSS (group founder and admin), 49AAA, 49BBB, 49CCC. All of them are repeatedly "unable to find". They seem to be older, at least created before I left and (was automatically :open_mouth: ?) rejoined (to) the group. 2016-05-04_7-UNABLE_TO_FIND_MESSAGE.log.txt

Loqui is not yet able to decrypt objects in group chat: 2016-05-04_7-encrypted-object.log.txt

Another (unrelated) issue: I selected group C to leave (the group I joined last), instead group B was removed (the group I joined first). Group A (I created it by myself before I joined B and C) was not affected.

cmeerw commented 8 years ago

@janu2015 Loqui is able to decrypt media/url messages in groups, the problem in your last log was that Loqui didn't have the session key for the group, so couldn't decrypt the message and the retry didn't work...

janu2015 commented 8 years ago

@cmeerw I left (<leave>) and re-joined (<create>) the groups. Now Loqui could not decrypt any group message ... If I send a group message, Loqui falls back to plaintext. Loqui version is 0.5.5.

Is it possible to "reset" group session key via WebIDE?

2016-05-05_0_leave_create_group.log.txt

cmeerw commented 8 years ago

@janu2015 that decryption error is strange and has nothing to do with group messages. The strange thing is that Loqui can find the pre-key, but not the signed pre-key in its local database. BTW, is this log from the same account than the previous logs you posted?

There is no other way I know of trying to reset group sessions than what Loqui already tries to do (i.e. sending receipt retry messages) - and this appears to be the same behaviour as an Android client.

janu2015 commented 8 years ago

Yes, it's the same account.

cmeerw commented 8 years ago

So why would the local registration id have changed (as is visible in the registration id sent back in the retry receipt messages)?

This id should never change, it is created the first time Loqui logs into the WhatsApp account and is persisted in the db, so it would only change when Loqui is reinstalled. BTW, this id is written to the log file as "LOCAL REGISTRATION ID" when connecting to WhatsApp...

janu2015 commented 8 years ago

Ok, it WAS reinstalled as I used a different computer for 0.5.5. I remember I was wondering that the "select account" screen appeared. Then I recognized that this was a second Loqui instance. I imported the previously exported data and removed the older instance. I checked "LOCAL REGISTRATION ID", it changed ... (How) can I bring the old id back to Loqui?

Honk2 commented 8 years ago

That is really strange behaviour. Sounds like issue #1058. As mentioned there, the key changed quite often for some time. It stopped when I started (funny coincidence for sure) permanent logging (0.5.4) and did not happen with 0.5.5 so far. BTW Everytime Loqui starts up there is the console message "asmCrypto seems to be load from an insecure origin; this may cause to MitM-attack vulnerability. Consider using secure transport protocol."

Could this be related to this?

Honk2 commented 8 years ago

@janu2015 I think you cant. This key is generated during installation. This key must change after every install. Otherwise you could pretend to be someone else which would make encryption useless. This is also written in the official FAQ that the key changes after (re)installing.

janu2015 commented 8 years ago

BTW Everytime Loqui starts up there is the console message "asmCrypto seems to be load from an insecure origin; this may cause to MitM-attack vulnerability. Consider using secure transport protocol."

Could this be related to this?

No, this message appears since encryption handling was implemented.

Maybe importing user data interferes with the new id?

cmeerw commented 8 years ago

It's not just the id, but all the private key data which is stored in the db (and these are currently not exported/imported).

The best way to recover from these things probably is to send messages to your contacts and they should update their crypto sessions with the new keys.

janu2015 commented 8 years ago

What would happen, if a WA account is created in a fresh Loqui instance and previously saved user data is imported? Same smartphone, same SIM card of course.

Honk2 commented 8 years ago

The keys generated are totally randomly. Otherwise encrytion would be useless if you can predict the identification keys

janu2015 commented 8 years ago

Well, in the meantime I'm facing several issues.

I'm thinking of re-installing Loqui and doing a new WA registration, without importing user data, instead manually adding my contacts and asking for new invitations to the groups ...

cmeerw commented 8 years ago

the audio message handling bug should be fixed now... stupid copy-and-paste bug...

janu2015 commented 8 years ago

@cmeerw Yes, basically it's working again :+1: There's one minor issue: The audio file (written to /loqui/files/ ) has extension "ogg codec=opus" (or the like). So, one cannot listen to it from Loqui. Instead it has to be renamed and opened by an audio player.

cmeerw commented 8 years ago

Closing as no known issues any more with 0.5.6