Sporadically do not receive messages

I just downloaded Jami, and after chatting for only half an hour, I stopped receiving messages from my contact, although they continued receiving messages from me. Default settings. We’re both using Android and only Android. I don’t know what to do about this or how to fix it if it needs fixing.

1 Like

Hi.
This is what i understand of it;

When closing Jami, and removing it from the Running Apps overview(which Android can also do automatically), then Jami is not able to communicate.
To overcome this,

(Huawei P8/Android 6)
go to Settings,

  • Apps, Advanced, Ignore Optimizations, and there, allow Jami to ‘ignore optimizations’.
  • Advanced settings, Battery Manager, Protected Apps, Jami, enable it as “protected app”.

(Samsung A71/Android 11)
go to Settings, Apps, Jami,

  • Mobile Data, “allow data when data usage saving is on”(loosely translated)
  • Battery , “allow background activity”

Also,
(Under Jami settings)

  • allow ‘Run in background’

(Under Jami Account - multiple options which can be used separately)

  • DHT-Proxy is useful when changing (mobile networks often), so that the DHT-Proxy is the stable ‘connection point’ to the DHT network, for others to see. (But negates the ‘decentralized’ aspect. unless you host your own ‘DHT-Proxy’
  • TURN-server is useful when you’re behind a firewall. This however is a ‘fixed central server’ which acts as a man in the middle (as far as i know).
  • UPnP is useful when your router/firewall has UPnP enabled. That way your App can communicate with the router/firewall what ports is should allow to pass through

ps. For a communication to succeed through firewalls, When using a TURN server, it is enough for one party to succeed to pass through the firewall.

1 Like

What would cause the other person’s app to function normally without doing any of this?

i.m.o. most likely,
a powerful phone, which doesn’t stop non-focus apps. and thus jami keeps running

i’m actually not sure if UPnP or DHT-Proxy and TURN are enabled by default, so which one of these settings would make theirs work out of the box, i can’t tell…

Well again, both apps are on default settings, as both are freshly installed. Furthermore, this continued to occur without me closing the app. We tested texting each other back and forth with the app in focus, because it’s the only thing we were doing, and I received no messages, while they received all of mine.

Also UPnP, and TURN are enabled by default. Not sure about DHT

if you can reproduce, then could you fill in a bug report?
(please also find out if both of your firewalls can handle UPnP and have its support enabled.)

Or maybe, if you don’t have a GitLab account yourself, i can do it for you.
The bug report template is as below. Can you prepare the document?
It is quite difficult for developers to reproduce such scenario’s as yours, so please include as many details as you can. Maybe check some other filled issues to get a feeling of how many details should be included to aid the developers in reproducing.
(Next is the template)


How to report a bug
-------------------

## One bug = one bug report

If you have multiple issues, please file separate bug reports. It will be much easier to track bugs that way.

## Avoid duplicates

Search for similar problem - update existing issue instead of creating new one.


Bug report form
---------------

## Describe your environment

Please specify the following:

-   Ring version: 
-   Device model: 
-   Android version: 
-   What build you are using: [jami.net | F-droid | Play Store | App store | your own (please specify commit id + ring daemon version or commit id)...]

## Steps to reproduce

-   Can you reproduce the bug: [at will | occasionally | not at all]
-   Steps:
	1.
        2.
        ...
-   Actual result: 
-   Expected result: 

## Additional information

Sorry to add to this thread

I have one Android device 7.1 Another Android device 9. Both of them have Jami running under two different accounts. Both devices have Jami running in background. Battery optimisation allows background activity for Jami on both devices.

Both devices have PUSH notification disabled.

DHT enabled, TURN and SIP Enabled, local peer discovery enabled, UPnP enabled.

Initially both devices A (7.1) and B (Android 9) can exchange messages - no issue.

After 5 or 10 minutes when A tries to send a message to B - the message never gets delivered.

At the same time when B sends a message to A - it gets delivered.

This is happening consistently with the device B which runs Android 9 version - I have checked it multiple times, Jami is allowed to maintain background activity.

The only way for B to receive messages from A is by making Jami on device B go offline in the accounts tab and come back online.

The issue seems to be so far affecting only this particular device B running Android 9. This is very similar to the original posters problem. Can the OP let me know the Android version of the two devices.