React-native: [RN 0.52] RCTImageLoader requires main queue setup since it overrides `init` but doesn't implement `requiresMainQueueSetup`

Created on 10 Jan 2018  路  19Comments  路  Source: facebook/react-native

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

Environment:
  OS: macOS Sierra 10.12.6
  Node: 9.3.0
  Yarn: 1.3.2
  npm: 5.6.0
  Watchman: 4.9.0
  Xcode: Xcode 9.2 Build version 9C40b
  Android Studio: Not Found

Packages: (wanted => installed)
  react: 16.2.0 => 16.2.0
  react-native: 0.52.0 => 0.52.0

Steps to Reproduce

$ react-native run-ios

Expected Behavior

iOS simulator run without errors.

Actual Behavior

screenshot 2018-01-09 14 53 14
screenshot 2018-01-09 15 02 18

^

Module RCTImageLoader requires main queue setup since it overrides `init` 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.

Reproducible Demo

Any app using the Image component, although in my app I wrap that in a higher level component I use: react-native-fit-image.

I've never seen RCTImageLoader complain about requiresMainQueueSetup before. Only started now after I upgraded RN from 0.51 to 0.52.

Ran Commands Fixed Locked PR Submitted

Most helpful comment

can we merge this soon ?

All 19 comments

For me, it doesn't show any warning in the simulator but appears as a warning in the browser console.

RN Version: 0.53.3
React Version: 16.2.0

PR #17679 is an attempt to fix this.

Started getting this in 0.54.0, is there a way to actually disable the warning?

This doesn't seem to work:

YellowBox.ignoreWarnings([
'Warning: Module RCTImageLoader requires',
]);

because the warning has no "warning: " prefix. Take that out in your ignore

can we merge this soon ?

Merged

The warning is still showing in 0.55.2

It'll be included in RN 0.56 I take it?

Still showing up in 0.55.2

Still showing in 0.55.2

It should be in the next minor (0.56.0), the patch updates(x.x.patch) only fix errors found in the latest minor afaik.

Did this actually get fixed?

It鈥檚 merged into master but it鈥檚 not released in a version as yet

Thanks for the quick reply @iRoachie !

RCTLog.js:46 Module RCTImageLoader requires main queue setup since it overrides init 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.

Facing this error!
=> Any solution ?

still showing up in 0.55.4
image

How do we make this go away

There has been no major release as yet guys. Please stop saying it鈥檚 still showing. @hramos can you lock this thread ?

Fix is in master. You may build React Native from source to take advantage of the fix.

Was this page helpful?
0 / 5 - 0 ratings