Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] [Debug] App crashing as soon as upload starts #122

Closed
BaderSerhan opened this issue Jan 17, 2019 · 12 comments
Closed

[iOS] [Debug] App crashing as soon as upload starts #122

BaderSerhan opened this issue Jan 17, 2019 · 12 comments

Comments

@BaderSerhan
Copy link
Contributor

I'm getting the following error as soon as I try uploading something in debug mode:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'You must override the supportedEvents method of fir_0x600000393c00_VydiaRNFileUploader'

In release mode, it is working just fine!

I looked in the class, and the supportedEvents method seems to be overrode.

Here's the supportedEvents method:

 - (NSArray<NSString *> *)supportedEvents {
    return @[
        @"RNFileUploader-progress",
        @"RNFileUploader-error",
        @"RNFileUploader-cancelled",
        @"RNFileUploader-completed"
    ];
}

And here's where the crash is happening in XCode:
_urlSession = [NSURLSession sessionWithConfiguration:sessionConfiguration delegate:self delegateQueue:nil];

@TSMMark
Copy link
Contributor

TSMMark commented Jan 17, 2019

Thanks for the report. Are you able to reproduce the issue in a fork of the RNBU example app?

@berkcoker
Copy link

I've noticed that this only happens on Debug mode, but is fine on Release

@alexivison
Copy link

I'm also having the same problem... Any movement on this ?

@BaderSerhan
Copy link
Contributor Author

@TSMMark I tried it on the RNBU example app, and it is working fine. I think it is a conflict with react-native-firebase because this issue started appearing when I integrated Firebase. It is affecting all of my logic and now the app is nearly non-functional because of this :/.

@berkcoker @alexivison Can you confirm if you have firebase integrated?

@BaderSerhan
Copy link
Contributor Author

I just removed Firebase/Performance from the pods

Removing FirebaseABTesting
Removing FirebasePerformance
Removing FirebaseRemoteConfig
Removing GoogleToolboxForMac

And the crash stops! I don't know which one exactly was causing the conflict, but I think this solves it for now and we can move on with our lives.

@TSMMark
Copy link
Contributor

TSMMark commented Feb 26, 2019

Glad to hear that @BaderSerhan! Thanks for update

@Shervanator
Copy link

I'm still having this issue in Debug mode, did anyone have any clues/ideas? Other projects have also had this issue: WebEngage/react-native-webengage#1

@BaderSerhan
Copy link
Contributor Author

@Shervanator Do you have firebase integrated? Because it seems to be an issue with the method swizzling. Try removing Firebase/Performance and see if it persists.

@Shervanator
Copy link

yep! firebase performance analytics is definitely causing the issues. I have removed it for the moment, but it is a super common library, so it would be cool to figure out why its not working as well!

@pribeh
Copy link

pribeh commented May 6, 2019

same here. removing firebase performance resolves the issue

@Jarred-Sumner
Copy link

[FIRPerformance sharedInstance].dataCollectionEnabled = false;
[FIRPerformance sharedInstance].instrumentationEnabled = false;

This will disable it if you don't want to remove it just yet. Can stick that code into your AppDelegate.

@leow93
Copy link

leow93 commented Sep 22, 2020

This is still an issue it seems, but @Jarred-Sumner 's fix works nicely - thanks for that!
You can even do:

#if DEBUG
  [FIRPerformance sharedInstance].dataCollectionEnabled = false;
  [FIRPerformance sharedInstance].instrumentationEnabled = false;
#endif

so that you don't lose the firebase performance tools for release mode :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants