"com.unity3d.WebOperationQueue (QOS: UNSPECIFIED)" Crash on iOS13

The same build for my game worked fine on iOS11 - 12, but users on iOS13 are getting tons of these:

Thread 10 Queue : com.unity3d.WebOperationQueue (QOS: UNSPECIFIED) (concurrent)

When testing on Xcode, this is the result within the console

2019-10-01 14:23:41.794752-0700 reloaded[1788:398162] -[NSURLResponse statusCode]: unrecognized selector sent to instance 0x282b979a0

2019-10-01 14:23:41.853064-0700 reloaded[1788:398162] Uncaught exception: NSInvalidArgumentException: -[NSURLResponse statusCode]: unrecognized selector sent to instance 0x282b979a0

(

    0   CoreFoundation                      0x00000001bd765c44 97285ACB-7B21-393A-ABF6-03F1DBB5D2A2 + 1256516

    1   libobjc.A.dylib                     0x00000001bd4800c8 objc_exception_throw + 60

    2   CoreFoundation                      0x00000001bd663fc0 97285ACB-7B21-393A-ABF6-03F1DBB5D2A2 + 200640

    3   CoreFoundation                      0x00000001bd76a3d4 97285ACB-7B21-393A-ABF6-03F1DBB5D2A2 + 1274836

    4   CoreFoundation                      0x00000001bd76c570 _CF_forwarding_prep_0 + 96

    5   reloaded                      0x0000000104cf33d8 -[UnityWebRequestDelegate handleResponse:] + 124

    6   reloaded                      0x0000000104cf3310 -[UnityWebRequestDelegate URLSession:dataTask:didReceiveResponse:completionHandler:] + 68

    7   CFNetwork                           0x00000001c0b551b8 _CFNetworkHTTPConnectionCacheSetLimit + 194852

    8   Foundation                          0x00000001bdb35c60 672CF0CB-4951-3B91-89DF-55E953AEA00F + 1170528

    9   Foundation                          0x00000001bda377e8 672CF0CB-4951-3B91-89DF-55E953AEA00F + 129000

    10  Foundation                          0x00000001bdb37fbc 672CF0CB-4951-3B91-89DF-55E953AEA00F + 1179580

    11  Foundation                          0x00000001bda37464 672CF0CB-4951-3B91-89DF-55E953AEA00F + 128100

    12  Foundation                          0x00000001bdb389e8 672CF0CB-4951-3B91-89DF-55E953AEA00F + 1182184

    13  Foundation                          0x00000001bdb384a8 672CF0CB-4951-3B91-89DF-55E953AEA00F + 1180840

    14  libdispatch.dylib                   0x00000001bd4193ac ED0789CD-8D80-39F4-9651-D8707D9C0337 + 62380

    15  libdispatch.dylib                   0x00000001bd40d00c ED0789CD-8D80-39F4-9651-D8707D9C0337 + 12300

    16  libdispatch.dylib                   0x00000001bd40f78c ED0789CD-8D80-39F4-9651-D8707D9C0337 + 22412

    17  libdispatch.dylib                   0x00000001bd40eeec ED0789CD-8D80-39F4-9651-D8707D9C0337 + 20204

    18  libdispatch.dylib                   0x00000001bd41bbd4 ED0789CD-8D80-39F4-9651-D8707D9C0337 + 72660

    19  libdispatch.dylib                   0x00000001bd41c384 ED0789CD-8D80-39F4-9651-D8707D9C0337 + 74628

    20  libsystem_pthread.dylib             0x00000001bd472a60 _pthread_wqthread + 216

    21  libsystem_pthread.dylib             0x00000001bd478c78 start_wqthread + 8

)

(lldb)

Symbolicated crash log

Thread 3 name:  Dispatch queue: com.unity3d.WebOperationQueue (QOS: UNSPECIFIED)
Thread 3 Crashed:
0   libsystem_kernel.dylib            0x00000001bd550ef4 __pthread_kill + 8
1   libsystem_pthread.dylib           0x00000001bd471d1c pthread_kill + 196
2   libsystem_c.dylib                 0x00000001bd401a54 abort + 104
3   taptapreloaded                    0x00000001033f8f84 0x1025e0000 + 14782340
4   taptapreloaded                    0x000000010260ae14 0x1025e0000 + 175636
5   CoreFoundation                    0x00000001bd765f40 __handleUncaughtException + 640
6   libobjc.A.dylib                   0x00000001bd48039c _objc_terminate+ 25500 () + 112
7   libc++abi.dylib                   0x00000001bd525634 std::__terminate(void (*)+ 58932 ()) + 20
8   libc++abi.dylib                   0x00000001bd5255c0 std::terminate+ 58816 () + 44
9   libdispatch.dylib                 0x00000001bd40d020 _dispatch_client_callout + 40
10  libdispatch.dylib                 0x00000001bd40f78c _dispatch_continuation_pop + 408
11  libdispatch.dylib                 0x00000001bd40eeec _dispatch_async_redirect_invoke + 596
12  libdispatch.dylib                 0x00000001bd41bbd4 _dispatch_root_queue_drain + 348
13  libdispatch.dylib                 0x00000001bd41c384 _dispatch_worker_thread2 + 120
14  libsystem_pthread.dylib           0x00000001bd472a60 _pthread_wqthread + 216
15  libsystem_pthread.dylib           0x00000001bd478c78 start_wqthread + 8

5021294–491744–crashlog.txt (99.2 KB)

We are having the same issue. App crashes on iOS13 with

2019-10-02 10:00:24.063549+0200 scoryteller[1010:219347] -[NSURLResponse statusCode]: unrecognized selector sent to instance 0x283dfc960

5 scoryteller 0x0000000104fd6d7c -[UnityWebRequestDelegate handleResponse:] + 156
6 scoryteller 0x0000000104fd6c1c -[UnityWebRequestDelegate URLSession:dataTask:didReceiveResponse:completionHandler:] + 140

I haven’t been able to resolve it yet. I don’t even know if UnityWebRequestDelegate is a Unity native thing or from a plugin…?

The fix for this issue is in progress.
One interesting thing: what URI are you using?
I’m aware of this issue when using malformed file:// uris, but I’m interested in potential others.

In my case it’s file:/// uri, the problem was file://// and caused crash with UnityWebRequestTexture.GetTexture. The strange thing is that when moving to file:/// instead (the correct syntax) iOS don’t find the file. Android works with both file://// and file:/// though.

URI has to be file:// followed by absolute path in Unix format (which starts with /, that’s why you see 3 slashes).
Try reading the same file using File class, does it find it?

@Aurimas-Cernius when we did iterative tests, we couldn’t get the file:/// to deliver a texture on iOS 13 using UnityWebRequestTexture, while the exact same path reported true for FileSystem exists check and we can load it using Texture (code below).

                            var fileData = File.ReadAllBytes(ct.fileName);
                            ct.texture = new Texture2D(2, 2);
                            ct.texture.LoadImage(fileData);

Though when using the correct format file:/// the game doesn’t crash on iOS13, it just doesn’t show the textures.

(and to avoid any confusion, the in this case is a path without the first leading slash)

Could you report this?
UWR should load textures when File can read the same file.

Sure. But first I want to verify the behavior by sitting together with my apple-colleague (he’s the designer, I’m the programming geek :slight_smile: ) and see this for myself (we have only tested this by me checking in code for him to build for now), which might take a few weeks. After that I will report.