Signal-android: APK-release: Frequent crashes and no update notifications

Created on 9 Feb 2018  路  10Comments  路  Source: signalapp/Signal-Android

The exception below occured with signal 4.14.10 (i think). Signal kept crashing all the time and so I eventually checked the web page. I don't know when the version mentioned above was released, but I have not received any update notifications ever since. I then saw that 4.15.5 is the current version so I updated immediately (and then copied the log, so the app version indicated there is not accurate). I thought that I should submit the crashlog since this error obviously swallowed all update notifications.

While searching for similar issues I only found #7234. Please let me know if I can somehow provide better information.

I'm on a recent LineageOS system with no GApps installed, see info below.

Device  : samsung GT-I9505 (jgedlteue)
Android : 7.1.2 (c59ce246a7, lineage_jfltexx-userdebug 7.1.2 NJH47F c59ce246a7)
Memory  : 14M (3.28% free, 512M max)
Memclass: 192
OS Host : iktinos.acc.umu.se
App     : Signal 4.15.5

--------- beginning of crash
02-09 10:55:08.369  2216  2238 E AndroidRuntime: FATAL EXCEPTION: JobConsumer-4
02-09 10:55:08.369  2216  2238 E AndroidRuntime: Process: org.thoughtcrime.securesms, PID: 2216
02-09 10:55:08.369  2216  2238 E AndroidRuntime: android.os.FileUriExposedException: file:///storage/emulated/0/Android/data/org.thoughtcrime.securesms/files/signal-update-1.apk exposed beyond app through Intent.getData()
02-09 10:55:08.369  2216  2238 E AndroidRuntime:    at android.os.StrictMode.onFileUriExposed(StrictMode.java:1796)
02-09 10:55:08.369  2216  2238 E AndroidRuntime:    at android.net.Uri.checkFileUriExposed(Uri.java:2346)
02-09 10:55:08.369  2216  2238 E AndroidRuntime:    at android.content.Intent.prepareToLeaveProcess(Intent.java:8981)
02-09 10:55:08.369  2216  2238 E AndroidRuntime:    at android.content.Intent.prepareToLeaveProcess(Intent.java:8942)
02-09 10:55:08.369  2216  2238 E AndroidRuntime:    at android.app.PendingIntent.getActivity(PendingIntent.java:340)
02-09 10:55:08.369  2216  2238 E AndroidRuntime:    at android.app.PendingIntent.getActivity(PendingIntent.java:302)
02-09 10:55:08.369  2216  2238 E AndroidRuntime:    at org.thoughtcrime.securesms.service.UpdateApkReadyListener.displayInstallNotification(UpdateApkReadyListener.java:61)
02-09 10:55:08.369  2216  2238 E AndroidRuntime:    at org.thoughtcrime.securesms.service.UpdateApkReadyListener.onReceive(UpdateApkReadyListener.java:48)
02-09 10:55:08.369  2216  2238 E AndroidRuntime:    at org.thoughtcrime.securesms.jobs.UpdateApkJob.handleDownloadNotify(UpdateApkJob.java:165)
02-09 10:55:08.369  2216  2238 E AndroidRuntime:    at org.thoughtcrime.securesms.jobs.UpdateApkJob.onRun(UpdateApkJob.java:78)
02-09 10:55:08.369  2216  2238 E AndroidRuntime:    at org.whispersystems.jobqueue.JobConsumer.runJob(JobConsumer.java:76)
02-09 10:55:08.369  2216  2238 E AndroidRuntime:    at org.whispersystems.jobqueue.JobConsumer.run(JobConsumer.java:46)
02-09 16:59:10.533 11529 11578 E AndroidRuntime: FATAL EXCEPTION: JobConsumer-4
02-09 16:59:10.533 11529 11578 E AndroidRuntime: Process: org.thoughtcrime.securesms, PID: 11529
02-09 16:59:10.533 11529 11578 E AndroidRuntime: android.os.FileUriExposedException: file:///storage/emulated/0/Android/data/org.thoughtcrime.securesms/files/signal-update-1.apk exposed beyond app through Intent.getData()
02-09 16:59:10.533 11529 11578 E AndroidRuntime:    at android.os.StrictMode.onFileUriExposed(StrictMode.java:1796)
02-09 16:59:10.533 11529 11578 E AndroidRuntime:    at android.net.Uri.checkFileUriExposed(Uri.java:2346)
02-09 16:59:10.533 11529 11578 E AndroidRuntime:    at android.content.Intent.prepareToLeaveProcess(Intent.java:8981)
02-09 16:59:10.533 11529 11578 E AndroidRuntime:    at android.content.Intent.prepareToLeaveProcess(Intent.java:8942)
02-09 16:59:10.533 11529 11578 E AndroidRuntime:    at android.app.PendingIntent.getActivity(PendingIntent.java:340)
02-09 16:59:10.533 11529 11578 E AndroidRuntime:    at android.app.PendingIntent.getActivity(PendingIntent.java:302)
02-09 16:59:10.533 11529 11578 E AndroidRuntime:    at org.thoughtcrime.securesms.service.UpdateApkReadyListener.displayInstallNotification(UpdateApkReadyListener.java:61)
02-09 16:59:10.533 11529 11578 E AndroidRuntime:    at org.thoughtcrime.securesms.service.UpdateApkReadyListener.onReceive(UpdateApkReadyListener.java:48)
02-09 16:59:10.533 11529 11578 E AndroidRuntime:    at org.thoughtcrime.securesms.jobs.UpdateApkJob.handleDownloadNotify(UpdateApkJob.java:165)
02-09 16:59:10.533 11529 11578 E AndroidRuntime:    at org.thoughtcrime.securesms.jobs.UpdateApkJob.onRun(UpdateApkJob.java:78)
02-09 16:59:10.533 11529 11578 E AndroidRuntime:    at org.whispersystems.jobqueue.JobConsumer.runJob(JobConsumer.java:76)
02-09 16:59:10.533 11529 11578 E AndroidRuntime:    at org.whispersystems.jobqueue.JobConsumer.run(JobConsumer.java:46)
crash help wanted

Most helpful comment

@artoborty simply download the latest APK from signal.org and install it over. Android will take care of a proper update. After that the problem will be gone - Signal is not crashing anymore since I did so.

All 10 comments

Different device
Same OS (Lineage 7.1.2. with no GApps installed)
Same signal version 4.14.10
Same problem

I'm still waiting for the upload notification and meanwhile there are frequent interruptions.
I've been using signal for a long time and I've never had these problems. If the notification does not arrives, how can I manually update without messing up my smartphone?
Thank you in advance.

@artoborty simply download the latest APK from signal.org and install it over. Android will take care of a proper update. After that the problem will be gone - Signal is not crashing anymore since I did so.

@charlydelta That'll work for now, but you'll probably have the same problem after the next update becomes available. This is an Android O issue where they are no longer File URIs, so we'd have to do something with a FileProvider to make it work. If someone who believes in the dream of Free Software could look into it it'd be great.

This is an Android O issue [...]

@moxie0 both me and @artoborty run Android N, so I doubt that it's an "Android O issue", or am I missing something?

i can confirm this issue which describe charlydelta. I have also Android N. I can confirm this on two different devices (Lineage 7.1.2. with no gApps installed)

@charlydelta Thanks I installed the new version!

So the only option for now is the manual update?

Apparently... Signal will most probably start crashing all the time again when therre's a new update. Just download the new APK in that case and update manually.

@moxie0 I see the codebase already provides a FileProviderUtil for handling URIs for API 21 and above, though its only used in a couple of places and URI.fromFile is still widespread. Would your recommended fix for this be to update the URI retrieval in the UpdateAPKReadyListener class? Should all other URI retrievals be switched over to using the file provider as well?

@charlydelta perhaps he meant Android N as that is the version that introduced the FileUriExposedException?

I get it working on Android 25 with this attached changes: Signal-diff.txt

All the above changes didn't work on Android 21 and 22 though. The notification come up, but when I clicked the notification, it doesn't trigger the installation process. Maybe I'm missing some permissions on lower Android? I don't see anything in the logcat though. It's just printing starting Activity for the intent, but nothing happened (not even error message).

GitHub Issue Cleanup:
See #7598 for more information.

Was this page helpful?
0 / 5 - 0 ratings