ooni / probe

OONI Probe network measurement tool for detecting internet censorship
https://ooni.org/install
BSD 3-Clause "New" or "Revised" License
751 stars 142 forks source link

ios: app crashes when disabling all categories #2513

Closed bassosimone closed 11 months ago

bassosimone commented 11 months ago

Describe the bug

When disabling all website categories, the app crashes.

To Reproduce

Disable all the website categories, then run the websites suite.

Expected behavior

The app should not crash. It's probably okay and acceptable to have no results like we do on Android.

Screenshots

N/A

System information (please complete the following information):

Additional context

Here are the logs captured by the debugger:

2023-07-25 13:47:57.587566+0200 ooniprobe[17698:2809380] /var/mobile/Containers/Data/Application/FF7EF68C-8E05-4BCC-92D4-69CA1BA4E8D1/Documents/OONIProbe.db
2023-07-25 13:47:57.599817+0200 ooniprobe[17698:2809380] [Countly] SDK should be started first!
2023-07-25 13:49:29.620645+0200 ooniprobe[17698:2809380] Reachability Flag Status: WR t------ networkStatusForFlags
2023-07-25 13:49:29.628173+0200 ooniprobe[17698:2809380] Reachability Flag Status: WR t------ networkStatusForFlags
2023-07-25 13:49:29.630766+0200 ooniprobe[17698:2810414] engine: info: ooniprobe-engine/v3.18.1  dirty= go1.20.6
2023-07-25 13:49:29.631351+0200 ooniprobe[17698:2810414] Reachability Flag Status: WR t------ networkStatusForFlags
2023-07-25 13:49:29.631763+0200 ooniprobe[17698:2810414] engine: info: iplookup: using cloudflare
2023-07-25 13:49:29.871094+0200 ooniprobe[17698:2809705] engine: info: sessionresolver: lookup www.cloudflare.com using http3://dns.google/dns-query... ok
2023-07-25 13:49:30.984513+0200 ooniprobe[17698:2810441] engine: info: sessionresolver: lookup api.ooni.io using http3://cloudflare-dns.com/dns-query... ok
2023-07-25 13:49:31.246651+0200 ooniprobe[17698:2810414] engine: info: session: using probe services: {Address:https://api.ooni.io Type:https Front:}
2023-07-25 13:49:31.247011+0200 ooniprobe[17698:2810414] engine: info: iplookup: using stun_google
2023-07-25 13:49:31.525272+0200 ooniprobe[17698:2810414] engine: info: sessionresolver: lookup stun.l.google.com using https://dns.google/dns-query... ok
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState]
PID: 17698, TID: 2810414, Thread name: (none), Queue name: org.openobservatory.queue, QoS: 0
Backtrace:
4   ooniprobe                           0x0000000104a9b954 -[AbstractSuite testEnded:] + 416
5   ooniprobe                           0x0000000104a72604 -[AbstractTest testEnded] + 56
6   ooniprobe                           0x0000000104aae09c __26-[WebConnectivity runTest]_block_invoke.13 + 276
7   ooniprobe                           0x0000000104a846f4 +[OONIApi checkIn:onSuccess:onError:] + 724
8   ooniprobe                           0x0000000104aade08 __26-[WebConnectivity runTest]_block_invoke + 468
9   libdispatch.dylib                   0x0000000108934520 _dispatch_call_block_and_release + 32
10  libdispatch.dylib                   0x0000000108936038 _dispatch_client_callout + 20
11  libdispatch.dylib                   0x000000010893e0b0 _dispatch_lane_serial_drain + 984
12  libdispatch.dylib                   0x000000010893edf4 _dispatch_lane_invoke + 412
13  libdispatch.dylib                   0x000000010894bc74 _dispatch_workloop_worker_thread + 736
14  libsystem_pthread.dylib             0x000000020d0a0ddc _pthread_wqthread + 288
15  libsystem_pthread.dylib             0x000000020d0a0b7c start_wqthread + 8
2023-07-25 13:49:31.704372+0200 ooniprobe[17698:2810414] [reports] Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState]
PID: 17698, TID: 2810414, Thread name: (none), Queue name: org.openobservatory.queue, QoS: 0
Backtrace:
4   ooniprobe                           0x0000000104a9b954 -[AbstractSuite testEnded:] + 416
5   ooniprobe                           0x0000000104a72604 -[AbstractTest testEnded] + 56
6   ooniprobe                           0x0000000104aae09c __26-[WebConnectivity runTest]_block_invoke.13 + 276
7   ooniprobe                           0x0000000104a846f4 +[OONIApi checkIn:onSuccess:onError:] + 724
8   ooniprobe                           0x0000000104aade08 __26-[WebConnectivity runTest]_block_invoke + 468
9   libdispatch.dylib                   0x0000000108934520 _dispatch_call_block_and_release + 32
10  libdispatch.dylib                   0x0000000108936038 _dispatch_client_callout + 20
11  libdispatch.dylib                   0x000000010893e0b0 _dispatch_lane_serial_drain + 984
12  libdispatch.dylib                   0x000000010893edf4 _dispatch_lane_invoke + 412
13  libdispatch.dylib                   0x000000010894bc74 _dispatch_workloop_worker_thread + 736
14  libsystem_pthread.dylib             0x000000020d0a0ddc _pthread_wqthread + 288
15  libsystem_pthread.dylib             0x000000020d0a0b7c start_wqthread + 8
2023-07-25 13:49:36.725973+0200 ooniprobe[17698:2810414] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Universeerror 0x28224e6a0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key ac_unrecoverableDatabaseError.'
*** First throw call stack:
(0x1ad324cb4 0x1a63cc3d0 0x1ad491c6c 0x1a7ae2a50 0x1a75e64e8 0x10826d370 0x10826cdc8 0x10826c0f4 0x104aadfd8 0x104a846f4 0x104aade08 0x108934520 0x108936038 0x10893e0b0 0x10893edf4 0x10894bc74 0x20d0a0ddc 0x20d0a0b7c)
libc++abi: terminating due to uncaught exception of type NSException
aanorbel commented 11 months ago

Looking at the logs, this crash has nothing to do with the categories. Its more related to the tests that were running.

bassosimone commented 11 months ago

I think we should keep in mind that disabling all categories passes empty input to Web Connectivity.