Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

BoringSSL error

Discussion in 'iOS and tvOS' started by Christopher-Anderson-GISP, Jan 15, 2019.

  1. Christopher-Anderson-GISP

    Christopher-Anderson-GISP

    Joined:
    Mar 5, 2015
    Posts:
    15
    i only noticed this when my app needs to suspend and then get reopened. i have tried multiple Unity versions with the same problem. the xCode version i am using is 10.1

    Below are the log messages starting with the one that occurs when the app is suspended. I can't seem to find anything online that removes/fixes this error. This error is preventing Deep Links from working but doesn't seem to have any other effect on the running of the app. Any Thoughts? Is it a configuration error in the Unity Player settings? In xCode? I've tried messing with the pList attribute App Transport Security Settings as well as verify that in the Unity Player settings that use HTTP is checked (which is required for my app to work with some REST API's). But so far nothing has worked.

    applicationWillResignActive()
    -> applicationDidEnterBackground()
    -> applicationWillEnterForeground()
    2019-01-14 20:20:45.979654-0600 lens[2561:1720334] [BoringSSL] nw_protocol_boringssl_error(1584) [C2.1:2][0x111134860] Lower protocol stack error: 53



    2019-01-14 20:20:45.984535-0600 lens[2561:1720334] [BoringSSL] nw_protocol_boringssl_error(1584) [C1.1:2][0x107b9db20] Lower protocol stack error: 53
    2019-01-14 20:20:45.984632-0600 lens[2561:1720334] TIC Read Status [2:0x2827d40c0]: 1:53
    2019-01-14 20:20:45.985401-0600 lens[2561:1720334] Task <7A26AA5E-BBCB-4065-B680-A1F956AE02BE>.<0> HTTP load failed (error code: 53 [1:53])
    2019-01-14 20:20:45.993279-0600 lens[2561:1720648] NSURLConnection finished with error - code 53
    -> applicationDidBecomeActive()
     
    Matt_khorsand likes this.
  2. shochet

    shochet

    Joined:
    Dec 17, 2013
    Posts:
    30
    Hi - I'm curious if you found a solution/cause/work-around? I'm seeing the same symptom trying to connect AppsFlyer attribution and deep linking to our iOS app. Sometimes it works fine, and sometimes I get the BoringSSL errors that seem to prevent the incoming URL to be processed as a deep link.

    Xcode 10.1
    Unity 2018.3.6
     
  3. Christopher-Anderson-GISP

    Christopher-Anderson-GISP

    Joined:
    Mar 5, 2015
    Posts:
    15
    No. But I haven't been seeing our hearing of any issues occurring in production so I'm leaving it alone for now and waiting to hear if anyone else has discovered the cause and solution for it.
     
  4. bphillips09

    bphillips09

    Joined:
    Aug 31, 2014
    Posts:
    36
    We have this same issue. We use firebase for dynamic (deep) links, and 50% of the time they work, but 50% of the time there is the "HTTP Load Failed" error that prevents the link from being processed.

    Was this ever resolved?

    EDIT: I was able to figure out a solution. It turns out this is a bug in iOS 12 that Apple is aware of, but it doesn't look like it will be fixed until iOS 13 is released.

    However, there are two ways around it from what I've gathered.

    The first is to wrap the task as a background task so it finishes its execution when the app is suspended. This solution is a little more involved but may be more reliable. For more information see here: https://developer.apple.com/library.../BackgroundExecution/BackgroundExecution.html

    The second solution is the one that I used and it has worked 100% of the time for me. If you find in your native code where 'handleUniversalLink : (NSURL)' is called, allow the method to sleep for at least 50ms (I do 500ms just to be sure that it will still invoke) before trying to process the universal link.

    I'm using Firebase, so for me it was in [iOS Project Path]/Pods/FirebaseDynamicLinks/FIRDynamicLinks.m, which now looks like this:

    Code (Objective-C):
    1. - (BOOL)handleUniversalLink:(NSURL *)universalLinkURL
    2.                  completion:(FIRDynamicLinkUniversalLinkHandler)completion {
    3.     usleep(500000);
    4.     if ([self matchesShortLinkFormat:universalLinkURL]) {
    5.         __weak __typeof__(self) weakSelf = self;
    6.         [self resolveShortLink:universalLinkURL
    7.                 completion:^(NSURL *url, NSError *error) {
    8.                   __typeof__(self) strongSelf = weakSelf;
    9.                   if (strongSelf) {
    10.                     FIRDynamicLink *dynamicLink = [strongSelf dynamicLinkFromCustomSchemeURL:url];
    11.                     dispatch_async(dispatch_get_main_queue(), ^{
    12.                       completion(dynamicLink, error);
    13.                     });
    14.                   } else {
    15.                     completion(nil, nil);
    16.                   }
    17.                 }];
    18.     return YES;
    19.   } else {
    20.     FIRDynamicLink *dynamicLink = [self dynamicLinkFromUniversalLinkURL:universalLinkURL];
    21.     if (dynamicLink) {
    22.       completion(dynamicLink, nil);
    23.       return YES;
    24.     }
    25.   }
    If you use Cloud Build or just want to ensure that it gets added in every time Unity builds your project, you can override OnPostprocessBuild(BuildReport) and append the file once the build is processed.
     
    Last edited: Mar 20, 2019
    oguro1021 likes this.
  5. Neozman

    Neozman

    Joined:
    Sep 29, 2016
    Posts:
    56
    I struggled with this bug also. I am using UnityWebRequest to download asset bundles. But folding and unfolding my game is causing the same error. What would you suggest to solve it?

    p.s. Actually i couldn't get through solution mentionrf above. :(

    I am using Unity 2018.4.0f1
     
  6. Neozman

    Neozman

    Joined:
    Sep 29, 2016
    Posts:
    56
    Same thing is on 7, 8, X, Xr iphone models

    All ios ver > 11
     
  7. Neozman

    Neozman

    Joined:
    Sep 29, 2016
    Posts:
    56
    Up! Still lookig for answer
     
  8. keninger

    keninger

    Joined:
    Mar 29, 2014
    Posts:
    17
    I have this very similar issue, where I try to send the a file location to my app, so the app knows which file opened the app so I can edit it right away

    Code (CSharp):
    1. #import "UnityAppController.h"
    2. @interface OverrideAppDelegate : UnityAppController
    3. @end
    4. IMPL_APP_CONTROLLER_SUBCLASS(OverrideAppDelegate)
    5. @implementation OverrideAppDelegate
    6.  
    7.  
    8. -(BOOL)application:(UIApplication*) application didFinishLaunchingWithOptions:(NSDictionary*) options
    9. {
    10.     NSLog(@"[OverrideAppDelegate application:%@ didFinishLaunchingWithOptions:%@]", application, options);
    11.     return [super application:application didFinishLaunchingWithOptions:options];
    12. }
    13.  
    14. - (BOOL)application:(UIApplication*)application openURL:(NSURL*)url sourceApplication:(NSString*)sourceApplication annotation:(id)annotation
    15.  
    16. {
    17.     usleep(500000);
    18.     NSString *myString = url.absoluteString;
    19.  
    20.     if ([url isFileURL])
    21.  
    22.     {
    23.  
    24.         UnitySendMessage("FileThatOpenedTheApp", "SetPath", [myString UTF8String] );
    25.  
    26.     }
    27.  
    28.     else
    29.  
    30.     {
    31.  
    32.         // Handle custom URL scheme
    33.  
    34.     }
    35.  
    36.  
    37.  
    38. }
    39.  
    40.  
    41. @end
    42.  
    This was my code which was working in unity 5 but I am currently on Unity 2018.3.4 and it isn't working now. I can't downgrade though.
     
  9. neozmin

    neozmin

    Joined:
    Jun 15, 2018
    Posts:
    10
    Still looking for answer. My researches show that any UnityWebRequest with long duration will crash on folding-unfolding the app. :(
     
  10. Neozman

    Neozman

    Joined:
    Sep 29, 2016
    Posts:
    56
    Up! Still looking for answer
     
  11. BigRedGames

    BigRedGames

    Joined:
    Jun 25, 2016
    Posts:
    48
    Same error here, Unity 2018.2.21f. When user tries sing in with facebook.

    Please, anyone from Unity Team can help us?
     
  12. Neozman

    Neozman

    Joined:
    Sep 29, 2016
    Posts:
    56
    Up! Unsucceed to solve it by myself(
     
  13. AurimasA

    AurimasA

    Unity Technologies

    Joined:
    Apr 24, 2017
    Posts:
    24
    Hello everyone, I have found @Christopher-Anderson-GISP original bug report and in it, our tester has suggested that after installing all the packages you need, close the project, go to the project folder on your computer and delete the Library folder. Run the project again, build for iOS and deploy the Xcode project to the iOS device.
    Not sure if this fixes the issue, but if it still reproduces please submit a new bug report with a minimal project that showcases the issue and reply the bug ID here.
     
  14. kyou_unity

    kyou_unity

    Joined:
    May 7, 2019
    Posts:
    4
    Is there any solution for this issue?
    I am using Unity2018.3.3 and this happens in Twitter Kit for unity.You can start a new project and import Twitter Kit for Unity (3.2.1),and then run the sample scene it will reproduces.(needs twitter cunsumer key and secret set).
     
  15. kyou_unity

    kyou_unity

    Joined:
    May 7, 2019
    Posts:
    4
    Code (CSharp):
    1. - (void)applicationDidEnterBackground:(UIApplication*)application
    2. {
    3.     ::printf("-> applicationDidEnterBackground()\n");
    4.     [self startBgTask];
    5. }
    6. - (void)startBgTask{
    7.     UIApplication *application = [UIApplication sharedApplication];
    8.     __block    UIBackgroundTaskIdentifier bgTask;
    9.     bgTask = [application beginBackgroundTaskWithExpirationHandler:^{
    10.         [application endBackgroundTask:bgTask];
    11.         NSLog(@"%f",application.backgroundTimeRemaining);
    12.     }];
    13.  
    14. }
    -------------------
    ↑Add this to UnityAppController.mm works for me