meshenger-app / meshenger-android

P2P Voice/Video phone App for local networks.
GNU General Public License v3.0
698 stars 108 forks source link

Meshenger Version 4.3.8. Calling from Android 6.0 to Android 11.0 crashes the app on Android 11.0 #141

Closed barkoder closed 1 month ago

barkoder commented 5 months ago

To reproduce.

  1. Install Meshenger 4.2.8 on Android 6.0 device and Android 11.0 device and scan QR codes and Add to Contacts.

  2. Notice Green Circle indicator on both devices.

  3. Call from Android 6.0 to Android 11.0 .

  4. Meshenger on Android 11.0 exits immediately, and the Android 6.0 device throws an error.

barkoder commented 5 months ago

Also after it errors, when I reopen Meshenger on the Android 11.0 device, the indicator on both the Android 6.0 device and 11.0 device doesn't turn green automatically. I have to open the app switcher on the Android 6.0 device, click on Meshenger again to get the contact indicators on both devices to turn green.

barkoder commented 5 months ago

Also calling from Android 11.0 to the Android 6.0 device immediately crashes the app on the Android 11.0 device.

Also even after Meshenger crashes on the Android 11.0 device, the contact indicator(for the Android 11.0 device) on the Android 6.0 device continues to stay green, when it should turn red immediately.

mwarning commented 5 months ago

Hi, are you using a dedicated hotspot / access point? If one of the devices creates a hotspot, then it would be a known problem.

barkoder commented 5 months ago

I can confirm that hotspot is off on both devices. I'm using my Local Wifi to get the devices to see each other.

mwarning commented 4 months ago

The current problem is that I do not have an Android 6 phone for testing.

iddq commented 4 months ago

I got this error on Android 6 with 4.3.1

Caused by: java.lang.ClassNotFoundException: Didn't find class "java.util.Optional" on path: DexPathList[[zip file "/data/app/d.d.meshenger-1/base.apk"],nativeLibraryDirectories=[/data/app/d.d.meshenger-1/lib/arm64, /data/app/d.d.meshenger-1/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]

mwarning commented 4 months ago

@iddq what Meshenger release is this? Please also try Meshenger 4.3.0 and the 4.3.2-pre (from here https://github.com/meshenger-app/meshenger-android/releases/tag/v4.3.1)

iddq commented 4 months ago

4.3.2 is ok on Android 6. what was the solution? did you remove Optional class?

mwarning commented 4 months ago

@iddq 4.3.1 uses a self compile WebRTC, maybe other build flags are needed. In general I like to not have to compile WebRTC myself. That 4.3.2-pre package uses WebRTC compiled by some other open source project.

barkoder commented 1 month ago

Using 4.3.8 .

For the first time I got the app working. I can call between Android 6.0 and 8.1 successfully. Yay!

However calling from Android 11.0 still immediately crashes the app on Android 11.0. Calling from Android 6.0 to 11.0 also crashes the app on Android 11.0 .

No more errors on Android 6.0 like it was in 4.2.8

I'm willing to share any debug logs from the Android 11.0 device via email if that would help, @mwarning .

Thanks.

mwarning commented 1 month ago

@barkoder feel free to send the logs to moritzwarning@web.de. But you can also attach them here if that is OK for you.

barkoder commented 1 month ago

@mwarning

pass for the email I sent you

^:*PRPiN)4PgrtO>;t?G1A9k^Tioq0m*l^K;c[lto~0>G8V~%e2Hg2dG2U^7km.TMs\ZeRK<gfG1@@WId|@SuTZeQp8nl+GqR.UM

No Subject

Thanks.

mwarning commented 1 month ago

@barkoder thank you, I will check the logs later.

mwarning commented 1 month ago

The problem seems to be that RingtoneManager.getActualDefaultRingtoneUri() calls android.media.RingtoneManager.setRingtonesAsInitValue() on Samsung devices and throws a

java.lang.SecurityException: d.d.meshenger was not granted this permission: android.permission.WRITE_SETTINGS.

iddq commented 1 month ago

Is it in the initRinging function?

mwarning commented 1 month ago

Is it in the initRinging function?

yes

mwarning commented 1 month ago

Looks like this is a known problem for some samsung phones: https://stackoverflow.com/questions/74849517/calling-getactualdefaultringtoneuri-requires-write-settings-permission

mwarning commented 1 month ago

I pushed a fix that I came up with yesterday. In my opinion, Meshenger should not change the default ringtone. As such now a fallback ringtone is used ("Orion" from LineageOS) and a warning is displayed briefly.

mwarning commented 1 month ago

@barkoder thank you very much for the logs!

This issue might be fixed now with the latest release, please test.

barkoder commented 1 month ago

@mwarning

It works now. Thank you very much!