deltachat / deltachat-android

Email-based instant messaging for Android.
GNU General Public License v3.0
1.11k stars 144 forks source link

add support for RealtimeChannel API #3108

Closed adbenitez closed 3 months ago

adbenitez commented 4 months ago

close #3103

github-actions[bot] commented 4 months ago

To test the changes in this pull request, install this apk: 📦 app-preview.apk

adbenitez commented 4 months ago

currently core has an internal tokio crash when I try to call the RPC method send_webxdc_realtime_advertisement: image

cc @link2xt, @Septias

do I need to enable some flag during compilation of core to enable peer channels or otherwise some dynamic setting?

adbenitez commented 4 months ago

currently core has an internal tokio crash when I try to call the RPC method send_webxdc_realtime_advertisement:

update: this happens in a x68 emulator, but in my arm64 device works fine

github-actions[bot] commented 4 months ago

To test the changes in this pull request, install this apk: 📦 app-preview.apk

link2xt commented 4 months ago

currently core has an internal tokio crash when I try to call the RPC method send_webxdc_realtime_advertisement: image

cc @link2xt, @Septias

do I need to enable some flag during compilation of core to enable peer channels or otherwise some dynamic setting?

SYS_SECCOMP means the app tried to execute some system call that is prevented by seccomp sandbox: https://source.android.com/docs/core/tests/debug/native-crash#seccomp. Since it is a send_webxdc_realtime_advertisement, it is likely a problem with iroh stack (QUIC or something) trying to use system calls that are not allowed. Can you try to get system call number somehow? Maybe there is a "Cause:" line somewhere below?

adbenitez commented 4 months ago

On Desktop, we try to send realtime data to the frontend which might fail if the webxdc is closed.

in android data will be send to the webxdc ONLY if it is open, if it is closed we don't even listen to the realtime data event, and the channel is closed when the webxdc is closed,

a possible situation could be if the app is forcefully killed, but in that case will the peer channel connection not be lost anyway? can the sending data only fail if the realtime channel is closed? or could it happen that the channel is closed accidentally in another error situations?

(I also didn't full understand what is being said in the comment)

link2xt commented 4 months ago

In core 1.140.0 there is now a setting named webxdc_realtime_enabled, it should be exposed in the UI somewhere because it is off by default.

github-actions[bot] commented 3 months ago

To test the changes in this pull request, install this apk: 📦 app-preview.apk

github-actions[bot] commented 3 months ago

To test the changes in this pull request, install this apk: 📦 app-preview.apk

github-actions[bot] commented 3 months ago

To test the changes in this pull request, install this apk: 📦 app-preview.apk

link2xt commented 3 months ago

Calling leave in destructor of webxdc view is good enough if it works reliably.