question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS yellow box: Module RNShare requires main queue setup since it overrides...

See original GitHub issue

Steps to reproduce

  1. create new react-native app and install/link react-native-share
  2. react-native run-ios
  3. check out yellow box warning with contents including the title

Expected behaviour

RNShare should load without warnings

Actual behaviour

There is a compatibility warning containing this text:

“Module RNShare requires main queue setup since it overrides constantsToExport but doesn’t implement requiresMainQueueSetup. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.”

Environment

  • react-native 0.56
  • iOS 11.3 (in a simulator, model A1586)

react-native-share

Version: npm version 1.1.0

Possible patch:

Looks like this might be the simplest similar patch (though I suppose you could re-think the whole thing…): https://github.com/kmagiera/react-native-gesture-handler/commit/310c3905dc68d9594861551b070238ab53544b7f

Workaround:

import { YellowBox } from ‘react-native’; YellowBox.ignoreWarnings( [‘requires main queue setup’] );

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jgcmarinscommented, Aug 7, 2018
0reactions
jgcmarinscommented, Aug 10, 2018

@Maple13 done!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Yellow box warning "requires main queue setup since it ...
Steps to reproduce. Launch app with react-native-share in iOS ( simulator can reproduce ). Expected behaviour. No Yellow Box Warnings. Actual behaviour.
Read more >
Module iCloudStorage requires main queue setup since it ...
Module iCloudStorage requires main queue setup since it overrides constantsToExport but doesn't implement requiresMainQueueSetup . In a future ...
Read more >
How to fix React Native get a yellow warning ... - YouTube
Module AudioRecorderManager requires main queue setup since it overrides constantsToExport but doesn't implement requiresMainQueueSetup.
Read more >
DispatchQueue | Apple Developer Documentation
An object that manages the execution of tasks serially or concurrently on your app's main thread or on a background thread.
Read more >
React Native iOs 警告requires main queue setup warning
2020-03-29 16:22:57.149 [warn][tid:main][RCTModuleData.mm:68] Module RCTGetuiModule requires main queue setup since it overrides `init` but ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found