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

Runtime exception NSInternalInconsistencyException more scheduler identifiers are registered #14

Open
krizzu opened this issue Feb 7, 2023 · 3 comments

Comments

@krizzu
Copy link

krizzu commented Feb 7, 2023

Hey,

I'm receiving runtime exception:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Launch handler for task with identifier different.sdk.task_processing has already been registered'.

This happens when using react-native-background-fetch alongside different SDK, which also requires registering scheduler identifiers (and does registration on its own). A quick look at the code points to this line which registers everything found in BGTaskSchedulerPermittedIdentifiers entry. Normally I'd patch-package the library, but it comes as a xcframework.

Would it be possible to get an update?

else if ([identifier hasPrefix:@"com.transistorsoft"]) {
  [self registerBGProcessingTask:identifier];
}
@christocracy
Copy link
Member

alongside different SDK,

iOS Background fetch api can only be registered once. What other sdk are you using?

@christocracy
Copy link
Member

And is that other sdk going to also avoid registering tasks not registered to it?

@krizzu
Copy link
Author

krizzu commented Feb 7, 2023

I meant that Background Fetch registers other SDK identifiers. When it's time for other SDK to register identifiers, the exception is thrown.

And is that other sdk going to also avoid registering tasks not registered to it?

It's proprietary software, so I can only hope it does

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

2 participants