Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Json value 'auto34' of type nsstring cannot be converted of a YGValue. Did you forget the % or pt suffix #23995

Closed
thangvo406 opened this issue Mar 18, 2019 · 2 comments
Labels
Bug Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@thangvo406
Copy link

thangvo406 commented Mar 18, 2019

I using property style sheet. height:'auto'. I run my app on iPhone X 12.1. I get this red screen.

viewBottom:{
height:'auto',
borderTopWidth: 0,
shadowOffset: { width: 0, height: 0 },
shadowColor: 'transparent',
shadowOpacity: 0,
elevation: 0,
borderWidth:1,
borderBottomColor:'white',
backgroundColor:'white',
borderLeftWidth: 0,
borderRightWidth: 0,
borderBottomWidth: 0,
}
how to resolved this issue??
P/s: only appear on iphone X

Thank guys.

react native: 0.57
OS: iOS
Device: iPhone X 12.1

image

@thangvo406 thangvo406 changed the title Json value 'auto24' of type nsstring cannot be converted of a YGValue. Did you forget the % or pt suffix Json value 'auto34' of type nsstring cannot be converted of a YGValue. Did you forget the % or pt suffix Mar 18, 2019
@react-native-bot
Copy link
Collaborator

Thanks for submitting your issue. Can you take another look at your description and make sure the issue template has been filled in its entirety?

👉 Click here if you want to take another look at the Bug Report issue template.

@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. Resolution: Needs More Information labels Mar 18, 2019
@kelset
Copy link
Contributor

kelset commented Mar 19, 2019

👋 there - I just tested your snippet on a fresh react-native init'ed project and I couldn't reproduce the issue you are mentioning.

I used this code

import React from 'react';
import { StyleSheet, Text, View, ScrollView, SafeAreaView } from 'react-native';

export default class App extends React.Component {
  render() {
    return (
      <SafeAreaView style={styles.container}>
        <View style={styles.viewBottom}>
          <Text>Hello!</Text>
        </View>
      </SafeAreaView>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    alignItems: 'center',
    backgroundColor: '#fff',
    flex: 1,
    flexDirection: 'row',
    flexWrap: 'wrap',
    justifyContent: 'center',
    paddingVertical: 30
  },
  viewBottom: {
    height: 'auto',
    borderTopWidth: 0,
    shadowOffset: { width: 0, height: 0 },
    shadowColor: 'transparent',
    shadowOpacity: 0,
    elevation: 0,
    borderWidth: 1,
    borderBottomColor: 'white',
    backgroundColor: 'white',
    borderLeftWidth: 0,
    borderRightWidth: 0,
    borderBottomWidth: 0
  }
});

Given that I have only partial visibility to your code, maybe the view that uses that style is not contained by any other view...?

Anyway, I'll close this since it seems fixed in 59. Please provide a repro if it still happens for you - maybe it's something else 🤔

@kelset kelset closed this as completed Mar 19, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Mar 19, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants