Athorcis opened a new issue, #630: URL: https://github.com/apache/cordova-plugin-file/issues/630
# Bug Report ## Problem My app crashes at startup with a SIGABRT signal. It seems to happen only on some old iOS versions. So far it happened on iOS 12.5.7 and iOS 13.5.1. The issue seems to be some kind of conflict between Bugsnag and the plugin cordova-file-plugin. I also opened an issue on Bugsnag's support ### What is expected to happen? The app is supposted to start ### What does actually happen? The app crash at startup ## Information The stacktrace of the crash : <img width="917" alt="image" src="https://github.com/user-attachments/assets/306245dc-287d-4538-9b50-b62cc404fac8"> The methods modified by bugsnag : ```objectivec static void replace_NSURLSession_sessionWithConfigurationDelegateQueue(id<NSURLSessionTaskDelegate> taskDelegate, BSGIsEnabledCallback isEnbled) { __weak BSGIsEnabledCallback weakIsEnbled = isEnbled; Class clazz = NSURLSession.class; SEL selector = @selector(sessionWithConfiguration:delegate:delegateQueue:); typedef NSURLSession *(*IMPPrototype)(id, SEL, NSURLSessionConfiguration *, id<NSURLSessionDelegate>, NSOperationQueue *); __block IMPPrototype originalIMP = (IMPPrototype)ObjCSwizzle::setClassMethodImplementation(clazz, selector, ^(id self, NSURLSessionConfiguration *configuration, id<NSURLSessionDelegate> sessionDelegate, NSOperationQueue *queue) { BSGIsEnabledCallback localIsEnabled = weakIsEnbled; if (localIsEnabled != nil && !localIsEnabled()) { return originalIMP(self, selector, configuration, sessionDelegate, queue); } if (sessionDelegate) { sessionDelegate = [[BSGURLSessionPerformanceProxy alloc] initWithSessionDelegate:sessionDelegate taskDelegate:taskDelegate]; } else { sessionDelegate = taskDelegate; } return originalIMP(self, selector, configuration, sessionDelegate, queue); }); } static void replace_NSURLSession_sharedSession(BSGIsEnabledCallback isEnbled) { __weak BSGIsEnabledCallback weakIsEnbled = isEnbled; typedef NSURLSession *(*IMPPrototype)(id, SEL); SEL selector = @selector(sharedSession); __block IMPPrototype originalIMP = (IMPPrototype)ObjCSwizzle::setClassMethodImplementation(NSURLSession.class, selector, ^(__unused id self) { BSGIsEnabledCallback localIsEnabled = weakIsEnbled; if (localIsEnabled != nil && !localIsEnabled()) { return originalIMP(self, selector); } static NSURLSession *session; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ // The shared session uses the shared NSURLCache, NSHTTPCookieStorage, // and NSURLCredentialStorage objects, uses a shared custom networking // protocol list (configured with registerClass: and unregisterClass:), // and is based on a default configuration. // https://developer.apple.com/documentation/foundation/nsurlsession/1409000-sharedsession session = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration] delegate:nil delegateQueue:nil]; }); return session; }); } ``` ### Environment, Platform, Device iOS 12.5.7, iOS 13.5.1, iPhone 5S, iPhone 6, iPhone 6S ### Version information Cordova: Cli: cordova@12.0.0, cordova-ios@6.2.0, cordova-plugin-file@8.1.0 MacOS 14.5, XCode 15.4 ## Checklist - [x] I searched for existing GitHub issues - [x] I updated all Cordova tooling to most recent version - [x] I included all the necessary information above -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org