[RN 0.52] New YellowBox.ignoreWarnings fail to ignore listed warnings
See original GitHub issueIs 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 showing ignored YellowBox warnings
Actual Behavior
Reproducible Demo
I have in index.js
:
import React, {Component} from "react"
import {
AppRegistry,
StyleSheet,
View,
Dimensions,
StatusBar,
YellowBox,
} from 'react-native'
YellowBox.ignoreWarnings = ([
'Encountered an error loading page', // WebView uri: result.url and url failing to load - "bloomberg suneq" https://github.com/facebook/react-native/issues/7839#issuecomment-224111608
'Deprecation warning: moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',
'Task orphaned for request ',
'Remote debugger is in a background tab which may cause apps to perform slowly',
])
This is not the case with the previous form: console.ignoredYellowBox = [...]
prior to this change in RN 0.52. The 2 YellowBox warnings in screenshot above got properly ignored. Now in RN 0.52, the only way I can as a workaround suppress these YellowBox warnings is by adding a catch-all disable to my index.js
:
console.disableYellowBox = true
Am I missing something in my `YellowBox.ignoreWarnings = ([…]) specs so they aren’t actually ignoring?
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
how to disable YellowBox in react-native totally in a native ...
YellowBoxes can be disabled during development by using console.disableYellowBox = true;. using ignore. console.ignoredYellowBox = ['Warning: ...
Read more >Disable the Yellow Box in React Native - Code Daily
The Yellow warning box in React Native can be both helpful and annoying. There are many errors that can be ignored but end...
Read more >How to Disable Yellow Warning Box in React Native
In the second case where you want to ignore the error and it is also blocking necessary pieces of the application, you can...
Read more >ReactNativeでignoredYellowBoxではなくYellowBox ... - Zenn
[RN 0.52] New YellowBox.ignoreWarnings fail to ignore listed warnings · Issue #17503 · facebook/reac. Is this a bug report?
Read more >axios-case-converter-updated - npm package - Snyk
RN >= 0.52 import { YellowBox } from 'react-native'; YellowBox.ignoreWarnings([ 'Be careful that FormData cannot be transformed on React Native.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am running RN 0.55.2 and I followed the docs but I am still getting yellow box warnings with both a specific error to ignore and also trying
console.disableYellowBox = true;
. Neither case is effective at stopping any yellow box warning messages from popping up. I have wiped the app, cache, reinstalled, etc., no dice. Any thoughts on how I can resolve this? Thx!Seems to be a error in the documentation. This works for me: