NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

Warning: Received `false` for a non-boolean attribute `uppercase`

Open arsamigullin opened this issue 7 years ago • 14 comments

Hi. Getting this warning in a web browser console

bundle.js:144396 Warning: Received false for a non-boolean attribute uppercase.

If you want to write it to the DOM, pass a string instead: uppercase="false" or uppercase={value.toString()}.

If you used to conditionally omit it with uppercase={condition && value}, pass uppercase={condition ? value : undefined} instead. in div (created by Text) in Text (at Text.js:26) in Text (at connectStyle.js:392) in Styled(Text) (at SettingsScreen.js:19) in div (created by View) in View (at Left.js:10) in Left (at connectStyle.js:392) in Styled(Left) (at SettingsScreen.js:18) in div (created by View) in View (at ListItem.js:39) in div (created by View) in View (created by TouchableHighlight) in TouchableHighlight (at ListItem.js:31) in ListItem (at connectStyle.js:392) in Styled(ListItem) (at SettingsScreen.js:17) in div (created by View) in View (at List.js:25) in List (at connectStyle.js:392) in Styled(List) (at SettingsScreen.js:15) in div (created by View) in View (created by ScrollView) in div (created by View) in View (created by ScrollViewBase) in ScrollViewBase (created by ScrollView) in ScrollView (at KeyboardAwareHOC.js:517) in KeyboardAwareScrollView (at Content.js:66) in Content (at connectStyle.js:392) in Styled(Content) (at SettingsScreen.js:14) in div (created by View) in View (at Container.js:12) in Container (at connectStyle.js:392) in Styled(Container) (at SettingsScreen.js:13) in SettingsScreen (at SceneView.js:9) in SceneView (at StackViewLayout.tsx:898) in div (created by View) in View (at StackViewLayout.tsx:897) in div (created by View) in View (at StackViewLayout.tsx:896) in div (created by View) in View (created by AnimatedComponent) in AnimatedComponent (at StackViewCard.tsx:106) in div (created by View) in View (created by AnimatedComponent) in AnimatedComponent (at screens.web.js:105) in Screen (at StackViewCard.tsx:93) in Card (at createPointerEventsContainer.tsx:95) in Container (at StackViewLayout.tsx:984) in div (created by View) in View (at StackViewLayout.tsx:393) in div (created by View) in View (created by AnimatedComponent) in AnimatedComponent (at StackViewLayout.tsx:383) in UnimplementedGestureHandler (at createHandler.web.js:201) in PanGestureHandler (at StackViewLayout.tsx:376) in StackViewLayout (at withOrientation.js:30) in withOrientation (at StackView.tsx:104) in div (created by View) in View (at Transitioner.tsx:267) in Transitioner (at StackView.tsx:41) in StackView (at createNavigator.js:80) in Navigator (at SceneView.js:9) in SceneView (at createTabNavigator.tsx:67) in div (created by View) in View (created by AnimatedComponent) in AnimatedComponent (at screens.web.js:105) in Screen (at ResourceSavingScene.tsx:20) in ResourceSavingScene (at createBottomTabNavigator.tsx:157) in div (created by View) in View (at createBottomTabNavigator.tsx:147) in div (created by View) in View (at createBottomTabNavigator.tsx:146) in TabNavigationView (at createTabNavigator.tsx:228) in NavigationView (at createNavigator.js:80) in Navigator (at SceneView.js:9) in SceneView (at SwitchView.js:12) in SwitchView (at createNavigator.js:80) in Navigator (created by WebApp) in WebApp (at App.js:27) in div (created by View) in View (at App.js:25) in App (at withExpoRoot.web.js:8) in RootErrorBoundary (at withExpoRoot.web.js:7) in ExpoRootComponent (at registerRootComponent.web.js:6) in RootComponent in div (created by View) in View (created by AppContainer) in div (created by View) in View (created by AppContainer) in AppContainer

Note: Getting this warning only in web

packages used: Node js v10.16.0 "@expo/samples": "~3.0.3", "@expo/vector-icons": "^10.0.5", "@react-navigation/web": "^1.0.0-alpha.9", "expo": "^35.0.0", "expo-asset": "^7.0.0", "expo-constants": "7.0.0", "expo-font": "~7.0.0", "expo-web-browser": "7.0.1", "jwt-decode": "^2.2.0", "native-base": "^2.13.8", "react": "16.9.0", "react-dom": "16.8.3", "react-native": "0.59.8"

the full list in the package.json in the repo

Expected behaviour

no such kind of warnings

Actual behaviour

there is a Warning: Received false for a non-boolean attribute uppercase in the web browser console

Steps to reproduce

Repo with the code that reproduces this warning https://github.com/arsamigullin/native-base-issue

arsamigullin avatar Sep 26 '19 05:09 arsamigullin

same issue, use {Text} from react-native solved this problem

Truth1984 avatar Oct 14 '19 03:10 Truth1984

This message comes from the defaultProps here https://github.com/GeekyAnts/NativeBase/blob/9c470822dc4912c3780cf14426cd3b6a56ef01f4/src/basic/Text.js#L44

Removing this statement gets rid of the warning on react-native-web with no apparent problems caused on the react-native side of things.

jmatsushita avatar Dec 03 '19 15:12 jmatsushita

PR #3111

juandav avatar Mar 31 '20 05:03 juandav

Hi @arsamigullin , I did not find any warning regarding uppercase neither in iOS nor in Android. Please provide minimal code reprodutcion on snack for the same.

import { Text } from 'native-base'; Screenshot 2020-04-08 at 5 11 57 PM

Screenshot 2020-04-08 at 5 09 14 PM

hanykumar avatar Apr 08 '20 11:04 hanykumar

@hanykumar I confirm. The same issue. image

So, I switched to the standard RN text. But it could be a problem for complex composed components where Text is a deeply nested part. In this case, it will show the same warning.

sviat-barbutsa avatar Apr 14 '20 12:04 sviat-barbutsa

If we use Text from native rn , there is no theming from NB, any solution for removing the error without using rn Text instead?

m3yevn avatar Apr 25 '20 06:04 m3yevn

+1 same issue

"react-native-web": "^0.11.7", "native-base": "2.13.8",

Expo CLI 3.19.2 environment info: System: OS: macOS 10.15.3 Shell: 5.7.1 - /bin/zsh Binaries: Node: 12.16.1 - ~/.nvm/versions/node/v12.16.1/bin/node npm: 6.14.2 - ~/.nvm/versions/node/v12.16.1/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman IDEs: Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild npmPackages: expo: ^37.0.0 => 37.0.6 react: ^16.9.0 => 16.9.0 react-native: https://github.com/expo/react-native/archive/sdk-37.0.0.tar.gz => 0.61.4 npmGlobalPackages: expo-cli: 3.17.21

diegolaciar avatar Apr 27 '20 02:04 diegolaciar

@hanykumar This issue arises when we are using native base with react-native-web.

ajitdas123 avatar May 09 '20 16:05 ajitdas123

This seems to have been fixed already: https://github.com/GeekyAnts/NativeBase/commit/ea024674188469fa9724928a6b7b7224f3cf5305

There just hasn't been a release after the fix was merged.

juhana avatar May 29 '20 20:05 juhana

Getting the same issue in web. Since this is already on master, can we just get a release?

maxyharr avatar Jul 10 '20 01:07 maxyharr

Hi, Please update native-base with the latest v2.13.14 and let us know if the issue still persists.

hanykumar avatar Sep 17 '20 10:09 hanykumar

I'm having the same issue. I tried updating to v2.13.14, but that causes a whole host of other errors to pop up. Currently the only configuration I can use to get everything work together is as follows:

"dependencies": {
    "expo": "~39.0.2",
    "expo-font": "~8.3.0",
    "expo-status-bar": "~1.0.2",
    "firebase": "7.9.0",
    "native-base": "2.13.8",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "0.45.0",
    "react-native-web": "0.11.7"
  },

I can use NB components, but it appears that the text styling isn't being applied appropriately. So when I have a button like this:

<Button info>
  <Text>Click Me!</Text>
</Button>

It looks like this: Screenshot from 2020-10-06 09-48-50

So it appears to be defaulting to full screen width and making it all caps. I wouldn't imagine that issues with the Text component would affect the width of the button, but I'm not sure what else could be at play here.

EDIT: Actually, it appears styles in general are not being applied. I tried to import a spinner to see if those styles would work, and compare it against the ActivityIndicator RN object like so:

<Spinner color='blue' />
<ActivityIndicator size='large' />

And they're basically the same: Screenshot from 2020-10-06 10-01-02

brandon-olin avatar Oct 06 '20 15:10 brandon-olin

Hi, Please update native-base with the latest v2.13.14 and let us know if the issue still persists.

I also have this issue in web. Updating to 2.13.14 results in build error #3231 so I can't test anything else in that release.

tomvrampio avatar Oct 07 '20 08:10 tomvrampio

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 21 '20 11:12 stale[bot]