Trouble is, I can't duplicate it on my own phone, so all I can use is the crash log from the app from someone else's device.
Exception Type: EXC_BREAKPOINT (SIGTRAP)
If the Swift runtime encounters a programming error, the runtime catches the error and intentionally crashes the app.
This crash points to Thread 5 - some concurrency library:
Thread 5 Crashed:
0 libswiftCore.dylib 0x000000019200ab74 _assertionFailure(_:_:file:line:flags:) + 308 (AssertCommon.swift:132)
1 libswiftCore.dylib 0x000000019207232c swift_unexpectedError + 484 (ErrorType.swift:188)
2 libswift_Concurrency.dylib 0x000000020f5397cc swift::runJobInEstablishedExecutorContext(swift::Job*) + 244 (Task.h:282)
3 libswift_Concurrency.dylib 0x000000020f53a1e8 swift_job_runImpl(swift::Job*, swift::ExecutorRef) + 72 (Actor.cpp:1488)
4 libdispatch.dylib 0x000000018d212164 _dispatch_root_queue_drain + 396 (inline_internal.h:0)
5 libdispatch.dylib 0x000000018d21296c _dispatch_worker_thread2 + 164 (queue.c:6935)
6 libsystem_pthread.dylib 0x00000001feefd080 _pthread_wqthread + 228 (pthread.c:2612)
7 libsystem_pthread.dylib 0x00000001feefce5c start_wqthread + 8 (:-1)
Since this error happened async, how can I find deterministically know what code triggered it? And if the thread was running long enough, maybe the code lines are not even still in the log.
So my advice to myself is to wrap any async calls in its own function call so I can hopefully trace what may have happened.
You'd better focus on your code than trying to point finger to others.