Search Issue Tracker

Fixed in 2021.2.X

Fixed in 2018.4.X, 2019.4.X, 2020.2.X, 2021.1.X

Votes

32

Found in

2019.4

2019.4.9f1

2020.2

2021.1

2021.2

Issue ID

1299873

Regression

No

[iOS] UnityWebRequest doesn't work when using a 14.2+ iOS device

iOS

-

Reproduction steps:
1. Download and open the user's attached "ARFoundation2020Test.zip" project
2. Build and deploy the app to an iOS device
3. Press the "Test UnityWebRequest" button multiple times

Expected result: The web request completes
Actual result: The web request fails with an "NSErrorFailingURLKey" console error

Reproducible with: 2019.4.17f1, 2020.2.1f1, 2021.1.0b1, 2021.2.0a1
Could not test with: 2018.4 (Build fails/"missing scripts" warnings)

Reproduced with: iPhone Pro (iOS 14.2.1)

Comments (9)

  1. apiotuch_unity

    Mar 05, 2021 18:28

    2019.4.21f1 has the official fix.

  2. RyanTexture

    Feb 24, 2021 14:38

    Hey there, thank for updating the fix for 2019.4.

    Can i check which version of 2019.4 will the fix be added to? surely not 2019.20f1 is it?

  3. Midnight-Walker

    Feb 16, 2021 09:01

    Works with 2019.4.19f1 but broken with 2019.4.20f1

  4. apiotuch_unity

    Feb 11, 2021 18:33

    Looks like there is a similar issue with iPadOS 14.4 that requires a different solution than the hack I shared earlier. I have not tested this solution myself but others say it does fix the issue. See https://forum.unity.com/threads/unitywebrequests-on-ios-sometimes-get-stuck-indefinitely-even-with-timeout-set.1012276/page-3#post-6826043

  5. unity_AP5fP-ZGMRZXvA

    Feb 09, 2021 07:26

    Hello!
    Do you plan to make fix for Unity 2018?
    Thanks in advance.

  6. MikePanoff

    Jan 22, 2021 09:48

    Thanks @APIOTUCH_UNITY!!!

    I can confirm that your hack fixed it for us:

    webOperationQueue.qualityOfService = NSQualityOfServiceUserInteractive;

    added to line 284 or ...\Classes\Unity\UnityWebRequest.mm

  7. apiotuch_unity

    Jan 15, 2021 23:18

    For anyone else looking for a quick fix, this seems to work.

    In post unity build, open the UnityWebRequest.mm. At UnityCreateWebRequestBackend method

    after:

    webOperationQueue = [[NSOperationQueue alloc] init];
    webOperationQueue.name = @"com.unity3d.WebOperationQueue";

    add:

    webOperationQueue.qualityOfService = NSQualityOfServiceUserInteractive;

  8. apiotuch_unity

    Jan 14, 2021 21:37

    This occurs with iOS 14.2 and 14.3 on 7, XR, XS Max, iPad, possibly more (these are all the devices we tested with). It stops our app from working 100% of the time. We are Using 2019.4.5f1. We are unable to use addressable assets because of this issue. We are unable to download textures at runtime. It always breaks the app after a couple minutes of play.

  9. nilsdr

    Jan 13, 2021 18:23

    Happens when running ARKit either through arfoundation or vuforia fusion

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.