Skip to content
This repository has been archived by the owner on Sep 14, 2020. It is now read-only.

ios warning: UI API called on a background thread #396

Closed
1 task
idanhaviv opened this issue Aug 23, 2019 · 9 comments · Fixed by bugsnag/bugsnag-cocoa#409
Closed
1 task

ios warning: UI API called on a background thread #396

idanhaviv opened this issue Aug 23, 2019 · 9 comments · Fixed by bugsnag/bugsnag-cocoa#409
Labels
bug Confirmed bug released This feature/bug fix has been released

Comments

@idanhaviv
Copy link

Description

running on iPhone X ios 12.2 in debug from Xcode logs a Main Thread Checker warning in Xcode logs

Environment

Library versions:

bugsnag-react-native@2.22.6
react-native@0.60.4
  • cocoapods version 1.6.1

  • iOS version: 12.2

  • physical device

  • debug mode

  • (iOS only) [BugsnagReactNative start] is present in the
    application:didFinishLaunchingWithOptions: method in your AppDelegate
    class? - no

@kattrali
Copy link
Contributor

Thanks for the report, @idanhaviv. What was in the log message? As far as I can tell, bugsnag-react-native does not call UI methods.

@kattrali kattrali added the awaiting feedback Awaiting a response from a customer. Will be automatically closed after approximately 2 weeks. label Aug 29, 2019
@idanhaviv
Copy link
Author

hey @kattrali, this is a screenshot of Xcode log Untitled

@kattrali
Copy link
Contributor

kattrali commented Sep 2, 2019

Ah, I see. This seems to be a side effect of expecting initialization to take place on the main thread. The library should handle and warn you in this case, but to work around it, can you configure [BugsnagReactNative start] in your app delegate?

@kattrali kattrali added the bug Confirmed bug label Sep 2, 2019
@phillipsam phillipsam added backlog We hope to fix this feature/bug in the future scheduled Work is starting on this feature/bug and removed awaiting feedback Awaiting a response from a customer. Will be automatically closed after approximately 2 weeks. backlog We hope to fix this feature/bug in the future labels Sep 2, 2019
@chipqcl
Copy link

chipqcl commented Sep 10, 2019

can you configure [BugsnagReactNative start] in your app delegate?

Can you give specific instructions for this?

@idanhaviv
Copy link
Author

@kattrali
i did but still get the warning message

@phillipsam
Copy link

can you configure [BugsnagReactNative start] in your app delegate?

Can you give specific instructions for this?

@chipqcl @idanhaviv There are instructions available in our documentation here: https://docs.bugsnag.com/platforms/react-native/react-native/enhanced-native-integration/#ios-native-installation. Let us know if you have further questions.

@idanhaviv
Copy link
Author

adding the api key in info.plist in addition to [BugsnagReactNative start] solved it.
@abigail-bugsnag maybe it's worth adding it to the react-native setup docs

@chipqcl
Copy link

chipqcl commented Sep 11, 2019

There are instructions available in our documentation here

Thanks, that worked.

@mattdyoung
Copy link

Fixed in v2.23.2, so the workaround of calling [BugsnagReactNative start] should no longer be necessary, unless you require the enhanced native integration for another reason.

@mattdyoung mattdyoung added released This feature/bug fix has been released and removed scheduled Work is starting on this feature/bug labels Sep 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Confirmed bug released This feature/bug fix has been released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants