Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo stops working after offline message #7

Open
kolAflash opened this issue Jan 12, 2017 · 3 comments
Open

Demo stops working after offline message #7

kolAflash opened this issue Jan 12, 2017 · 3 comments
Assignees

Comments

@kolAflash
Copy link

Demo is working fine. Started demo program on my Linux notebook, send two messages from the Android Threema app on my smartphone and receiving answers from the bot.

Saving ID to threema.id
Using ID: 0A1B2C3D
Retrieving ZX9TZZ7P from directory server
Saving addressbook to address.book
Starting session
Sending initial message
Message [001000123456789a] has been acknowledged by the server.
Message [002000123456789] has been acknowledged by the server.

Closing and starting the demo again also worked fine and it continues to answer messages from my smartphone.

Loading ID from threema.id
Using ID: 0A1B2C3D
Loading addressbook from address.book
Starting session
Sending initial message
Message [003000123456789a] has been acknowledged by the server.
Message [004000123456789a] has been acknowledged by the server.

But then I send one message from my smartphone while the demo wasn't running on my computer.
An "offline message"!
After that, the demo did not receive or answer any more messages.

Loading ID from threema.id
Using ID: 0A1B2C3D
Loading addressbook from address.book
Starting session
Sending initial message

The demo also stopped answering to non-offline-messages.

Only fix/workaround was to delete the file threema.id on my computer and let it generate a new Threema ID.

@kolAflash
Copy link
Author

Threema ID is working again in the demo after using the Android Threema app to restore the ID from the threema.id file and receiving the offline-messages from the server.

So it looks like demo can't receive the waiting offline-messages and that - in some way - blocks the demo from receiving further messages.

@V-inz
Copy link
Contributor

V-inz commented Jan 20, 2017

I can confirm this -- sort of (on testing code, 2 days ago)

sometimes (rarely!) when starting the demo and there are more (4 for example) offline-messages waiting, there is no receivedMessage-"event" (no new entry in the channel).
You can not send and there are no new receivedMessages anymore.

When hard restarting the demo several times, you suddenly get one receivedMessage, which is the latest you sent to the demo. The other (first 3 for example) messages seem to be lost.
(On your mobilephone they don't have viewed-state, but the latest does).

@V-inz
Copy link
Contributor

V-inz commented Jan 21, 2017

I think this issue is the reason for what kolAflash describes here.
Issue #16 on o3ma/o3: you have to receive before you can send

kolAflash added a commit to kolAflash/o3demo that referenced this issue Feb 15, 2017
Also solved send-receive problem on startup.
See: o3ma#7
@kolAflash kolAflash mentioned this issue Feb 15, 2017
kolAflash added a commit to kolAflash/o3demo that referenced this issue Feb 16, 2017
sendMsgChan) and fixed
o3ma#7 by putting sendTestMsg into a
separate thread.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants