Signal-Android icon indicating copy to clipboard operation
Signal-Android copied to clipboard

Signal crashing while receiving signal call.

Open silverflo opened this issue 6 years ago • 14 comments

  • [x] I have searched open and closed issues for duplicates
  • [x] I am submitting a bug report for existing functionality that does not work as intended
  • [x] I have read https://github.com/signalapp/Signal-Android/wiki/Submitting-useful-bug-reports
  • [x] This isn't a feature request or a discussion topic

this isn't time sync issue , also there's no missed call notification similar to some other issues :(

Bug description

firstly its a custom rom. Signal crashing while receiving signal call. it started a while back. for the last 1 year signal was working fine. i still can call others , chat message everything, all except receiving signal calls. Also I don't have google play services ...... . while someone calls me via signal at the moment in which it changes from dialling to ringing , signal crashes. ive got crash logs https://del.dog/grollegego

Steps to reproduce

  • someone call me on signal
  • signal crashes Actual result: - signal crashes Expected result: my phone should have started to ring

Device info

Device: xaoimi poco f1 - lineage os (custom rom) **Android version:**10 Signal version: 4.60.8 latest as of 29 may

Link to debug log

logs https://del.dog/grollegego

silverflo avatar May 29 '20 13:05 silverflo

and looking at the logs , shouldn't signal asks for android.permission.READ_PHONE_STATE instead of android.permission.READ_PRIVILEGED_PHONE_STATE

silverflo avatar May 29 '20 17:05 silverflo

Signal doesn't ask for it and, according to the docs, getDefaultOutgoingPhoneAccount() shouldn't require it. Maybe that's a bug with your custom OS.

haffenloher avatar May 29 '20 18:05 haffenloher

Same problem here on Android 10 OnePlus 5T crDroid ROM (LineageOS Base). I downgraded to 4.59.10 because that version is working fine on my wife phone. Its still the same.

sivuda avatar May 29 '20 22:05 sivuda

update, i have tries signal on havoc OS 3.5 and crdroid (AOSP based) 6.6( lineage base) on poco, both times it crashed on receiving a call. also a screen shot if it helps

with or without vpn , different dns , wifi mobile network ., nothing makes it work.

signal

i'm getting connecting notification for call but it fails to connect

silverflo avatar May 30 '20 15:05 silverflo

I've been having the same issue for quite a while too. Same situation as OP. MicroG and custom Rom (CrDroid android 10). The app works great except incoming signal calls where I don't even get a notification and the app crashes. Got the same crash log as OP. Signal 4.67.3

Tried granting the READ_PRIVILEGED_PHONE_STATE permission via: su pm grant org.thoughtcrime.securesms android.permission.READ_PRIVILEGED_PHONE_STATE

Got a SecurityException: Package org.thoughtcrime.securesms has not requested permission android.permission.READ_PRIVILEGED_PHONE_STATE

I was on Android 9 custom rom a couple months ago, Signal was working flawlessly. It seems that Android 10 has new guidelines for app permissions.

ceptonit avatar Jul 29 '20 03:07 ceptonit

Update

If you are rooted, open /data/system/users/0/runtime-permissions.xml find <pkg name="org.thoughtcrime.securesms"> under it, replace the following line: <item name="android.permission.READ_PHONE_STATE" granted="true" flags="300" /> with: <item name="android.permission.READ_PRIVILEGED_PHONE_STATE" granted="true" flags="300" /> Save and reboot.

I know it's a bit of a hack while we wait for a more permanent fix.

ceptonit avatar Jul 29 '20 15:07 ceptonit

Thankyou @ceptonit , your hack worked . Now i can receive calls for the first time in last 3 months. Waiting for some permenent fix :)

silverflo avatar Aug 02 '20 10:08 silverflo

Is this a Signal or ROM issue? I have the same issue on crDroid https://debuglogs.org/382d5af8151f7f19539f6366a1cb2686472f82b1e9f7681bb107ac64870a95c4 Thanks for the hack btw.

dkwo avatar Sep 18 '20 07:09 dkwo

Update

If you are rooted, open /data/system/users/0/runtime-permissions.xml find <pkg name="org.thoughtcrime.securesms"> under it, replace the following line: <item name="android.permission.READ_PHONE_STATE" granted="true" flags="300" /> with: <item name="android.permission.READ_PRIVILEGED_PHONE_STATE" granted="true" flags="300" /> Save and reboot.

I know it's a bit of a hack while we wait for a more permanent fix.

@ceptonit How do you open and change this? Using an app or via fastboot? I'm getting at the location with a file manager and root access, but how to open/change?

Update: Ok I got it via TWRP filemanager to copy on internal storage. There I could change it and afterwards I was able to move it back.

mawed avatar Feb 01 '21 16:02 mawed

Update

The issue is still present with A11 ( CrDroid 7.3) in Poco F1 and Poco X3. Location of runtime-permissions.xml file has changed in A11 to /data/misc_de/0/apexdata/com.android.permission/runtime-permissions.xml

silverflo avatar Mar 06 '21 06:03 silverflo

Hi,

Same issue here on Poco X3 with Arrow OS vanilla A11 and MicroG

Changing in the file /data/misc_de/0/apexdata/com.android.permission/runtime-permissions.xml

<item name="android.permission.READ_PHONE_STATE" granted="false" ... with <item name="android.permission.READ_PRIVILEGED_PHONE_STATE" granted="true" ...

fixed the issue, but I think haffenloher is probably right: it's probably a ROM issue: the logs show that the system requires READ_PRIVILEGED_PHONE_STATE privilege to access getUserSelectedOutgoingPhoneAccountget and DefaultOutgoingPhoneAccount (see below), but the doc says that the READ_PHONE_STATE is sufficient: ( https://developer.android.com/reference/android/telecom/TelecomManager#getDefaultOutgoingPhoneAccount(java.lang.String)

Log extract:

03-07 11:06:26.017  1477  2702 I Telecom : CallAudioRouteStateMachine: Message received: SPEAKER_ON=1006, arg1=0: CARSM.mSPCR->CARSM.pM_SPEAKER_ON@AQY
03-07 11:06:26.017  1477  2702 I Telecom : QuiescentEarpieceRoute: Processing message SPEAKER_ON: CARSM.mSPCR->CARSM.pM_SPEAKER_ON@AQY
03-07 11:06:26.021  1477  3412 E Telecom : : getUserSelectedOutgoingPhoneAccount: TSI.gUSOPA@AQc
03-07 11:06:26.021  1477  3412 E Telecom : java.lang.SecurityException: getDefaultOutgoingPhoneAccount: Neither user 10205 nor current process has android.permission.READ_PRIVILEGED_PHONE_STATE.
03-07 11:06:26.021  1477  3412 E Telecom : 	at android.app.ContextImpl.enforce(ContextImpl.java:2018)
03-07 11:06:26.021  1477  3412 E Telecom : 	at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:2046)
03-07 11:06:26.021  1477  3412 E Telecom : 	at android.content.ContextWrapper.enforceCallingOrSelfPermission(ContextWrapper.java:851)
03-07 11:06:26.021  1477  3412 E Telecom : 	at com.android.server.telecom.TelecomServiceImpl.isDialerOrPrivileged(TelecomServiceImpl.java:2242)
03-07 11:06:26.021  1477  3412 E Telecom : 	at com.android.server.telecom.TelecomServiceImpl.access$400(TelecomServiceImpl.java:75)
03-07 11:06:26.021  1477  3412 E Telecom : 	at com.android.server.telecom.TelecomServiceImpl$1.getUserSelectedOutgoingPhoneAccount(TelecomServiceImpl.java:150)
03-07 11:06:26.021  1477  3412 E Telecom : 	at com.android.internal.telecom.ITelecomService$Stub.onTransact(ITelecomService.java:762)
03-07 11:06:26.021  1477  3412 E Telecom : 	at android.os.Binder.execTransactInternal(Binder.java:1159)
03-07 11:06:26.021  1477  3412 E Telecom : 	at android.os.Binder.execTransact(Binder.java:1123)
--------- beginning of crash
03-07 11:06:26.024  6739  7723 E AndroidRuntime: FATAL EXCEPTION: pool-16-thread-1
03-07 11:06:26.024  6739  7723 E AndroidRuntime: Process: org.thoughtcrime.securesms, PID: 6739
03-07 11:06:26.024  6739  7723 E AndroidRuntime: java.lang.SecurityException: getDefaultOutgoingPhoneAccount: Neither user 10205 nor current process has android.permission.READ_PRIVILEGED_PHONE_STATE.
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at android.os.Parcel.createExceptionOrNull(Parcel.java:2373)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at android.os.Parcel.createException(Parcel.java:2357)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at android.os.Parcel.readException(Parcel.java:2340)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at android.os.Parcel.readException(Parcel.java:2282)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at com.android.internal.telecom.ITelecomService$Stub$Proxy.getUserSelectedOutgoingPhoneAccount(ITelecomService.java:1647)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at android.telecom.TelecomManager.getUserSelectedOutgoingPhoneAccount(TelecomManager.java:1026)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at android.media.RingtoneManager.getDefaultPhoneAccountHandle(RingtoneManager.java:892)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at android.media.RingtoneManager.getCacheForType(RingtoneManager.java:1053)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1066)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1005)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at org.thoughtcrime.securesms.webrtc.audio.IncomingRinger.createPlayer(IncomingRinger.java:112)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at org.thoughtcrime.securesms.webrtc.audio.IncomingRinger.start(IncomingRinger.java:41)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at org.thoughtcrime.securesms.webrtc.audio.SignalAudioManager.startIncomingRinger(SignalAudioManager.java:53)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at org.thoughtcrime.securesms.service.webrtc.WebRtcInteractor.startIncomingRinger(WebRtcInteractor.java:142)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at org.thoughtcrime.securesms.service.webrtc.IncomingCallActionProcessor.handleLocalRinging(IncomingCallActionProcessor.java:172)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at org.thoughtcrime.securesms.service.webrtc.WebRtcActionProcessor.processAction(WebRtcActionProcessor.java:193)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at org.thoughtcrime.securesms.service.WebRtcCallService.lambda$onStartCommand$0(WebRtcCallService.java:292)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at org.thoughtcrime.securesms.service.WebRtcCallService.lambda$onStartCommand$0$WebRtcCallService(Unknown Source:0)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at org.thoughtcrime.securesms.service.-$$Lambda$WebRtcCallService$Yh6A0UG5XRlf3T0gTOG7ZD8M4xo.run(Unknown Source:4)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:923)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: Caused by: android.os.RemoteException: Remote stack trace:
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at android.app.ContextImpl.enforce(ContextImpl.java:2018)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:2046)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at android.content.ContextWrapper.enforceCallingOrSelfPermission(ContextWrapper.java:851)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at com.android.server.telecom.TelecomServiceImpl.isDialerOrPrivileged(TelecomServiceImpl.java:2242)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 	at com.android.server.telecom.TelecomServiceImpl.access$400(TelecomServiceImpl.java:75)
03-07 11:06:26.024  6739  7723 E AndroidRuntime: 

GittyBob avatar Mar 07 '21 12:03 GittyBob

Update : simple fix found Change signal call ringtone signal app -> settings -> Notifications -> Ringtones(calls) , change it from default ringtone to any other in that list. No more crashing :)

silverflo avatar Mar 17 '21 12:03 silverflo

Changing the the ringtone did actually work on ArrowOs Vanilla on Poco X3. Thanks for the solution! But I won't close the issue, because it's not a real solution. Is the problem caused by Signal or the custom rom? Can Signal do something about it?

mo8it avatar Mar 18 '21 09:03 mo8it

LineageOS and its derivatives appear to do something special to handle multiple phone accounts on a device when trying to get the default ringer. The workaround provided by @silverflo will fix the issue as you'll no longer be using the default ringer but we've also added some fallback logic in 5.6 (an upcoming release) that will try to avoid the code path that triggers the exception but still use the system default ringer.

cody-signal avatar Mar 26 '21 17:03 cody-signal