Closed ff0255 closed 2 months ago
06-12 23:29:18.865 E/AndroidRuntime( 3580): FATAL EXCEPTION: AsyncTask #1
06-12 23:29:18.865 E/AndroidRuntime( 3580): Process: org.openobservatory.ooniprobe, PID: 3580
06-12 23:29:18.865 E/AndroidRuntime( 3580): java.lang.RuntimeException: An error occurred while executing doInBackground()
06-12 23:29:18.865 E/AndroidRuntime( 3580): at android.os.AsyncTask$3.done(AsyncTask.java:325)
06-12 23:29:18.865 E/AndroidRuntime( 3580): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
06-12 23:29:18.865 E/AndroidRuntime( 3580): at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
06-12 23:29:18.865 E/AndroidRuntime( 3580): at java.util.concurrent.FutureTask.run(FutureTask.java:242)
06-12 23:29:18.865 E/AndroidRuntime( 3580): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
06-12 23:29:18.865 E/AndroidRuntime( 3580): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
06-12 23:29:18.865 E/AndroidRuntime( 3580): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
06-12 23:29:18.865 E/AndroidRuntime( 3580): at java.lang.Thread.run(Thread.java:761)
06-12 23:29:18.865 E/AndroidRuntime( 3580): Caused by: java.lang.NoSuchMethodError: No virtual method toPath()Ljava/nio/file/Path; in class Ljava/io/File; or its super classes (declaration of 'java.io.File' appears in /system/framework/core-oj.jar)
06-12 23:29:18.865 E/AndroidRuntime( 3580): at okhttp3.Headers$$ExternalSyntheticApiModelOutline0.m(D8$$SyntheticClass:0)
06-12 23:29:18.865 E/AndroidRuntime( 3580): at org.apache.commons.io.FileUtils.newOutputStream(FileUtils.java:2552)
06-12 23:29:18.865 E/AndroidRuntime( 3580): at org.apache.commons.io.FileUtils.writeStringToFile(FileUtils.java:3467)
06-12 23:29:18.865 E/AndroidRuntime( 3580): at org.openobservatory.ooniprobe.test.test.AbstractTest.run(AbstractTest.java:158)
06-12 23:29:18.865 E/AndroidRuntime( 3580): at org.openobservatory.ooniprobe.test.test.WebConnectivity.run(WebConnectivity.java:31)
06-12 23:29:18.865 E/AndroidRuntime( 3580): at org.openobservatory.ooniprobe.test.TestAsyncTask.runTest(TestAsyncTask.java:151)
06-12 23:29:18.865 E/AndroidRuntime( 3580): at org.openobservatory.ooniprobe.test.TestAsyncTask.doInBackground(TestAsyncTask.java:133)
06-12 23:29:18.865 E/AndroidRuntime( 3580): at org.openobservatory.ooniprobe.test.TestAsyncTask.doInBackground(TestAsyncTask.java:44)
06-12 23:29:18.865 E/AndroidRuntime( 3580): at android.os.AsyncTask$2.call(AsyncTask.java:305)
06-12 23:29:18.865 E/AndroidRuntime( 3580): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
06-12 23:29:18.865 E/AndroidRuntime( 3580): ... 4 more
06-12 23:29:18.867 W/ActivityManager( 865): Force finishing activity org.openobservatory.ooniprobe/.activity.MainActivity
java.io.File.toPath()
is available since Android 8.0 .
https://developer.android.com/reference/java/io/File#toPath()
API desugaring may help.
@aanorbel
This seems to be cause by the change in version of commons.io
. I would not want to introduce the change in https://github.com/ooni/probe-android/pull/767 to fix this if there is another solution.
@aanorbel 🤔
FileOutputStream(file, true).bufferedWriter(charset).use{
…
}
Hi @Lanius-collaris , sorry for the late reply. Do you have any instructions to reproduce this error?
I am open to setting up LineageOS in an emulator to provide better support in the future.
@aanorbel Just run a web_connectivity test.
I was able to reproduce the issue in android API 5.0, I added this PR to ooni/probe-android#789 to fix the issue and also run all tests on the android version.
Describe the bug
The app ooniprobe-android 3.8.8 crashes on starting any test. (crashes began from version 3.8.7)
Start app, push "start" button at any of the "tests".
Expected behavior
The app completes the test(s).
System information (please complete the following information):
Additional context
Output of
adb -d logcat -v time
https://gist.github.com/ff0255/f65487a615fe9e1d00633c097862859c github don't allow long logcat (body is too long (maximum is 65536 characters))
Let me know if you need additional info. Maybe it's somehow related to censored Internet in my country...