react-native-autofocus icon indicating copy to clipboard operation
react-native-autofocus copied to clipboard

iOS release build crashes: null is not an object (evaluating 'this._component.getScrollableNode')

Open phil-andrews opened this issue 7 years ago • 5 comments

I narrowed this crash in a production iOS app down to this library. I believe it has to do with the implementation of Input instead of using a TextInput though I'm not 100% sure about that.

You can find the whole, ongoing thread of this error at RN Issue #10635. Many of the cases have to do with Touchable variety buttons not wrapping children in a View.

Update: I can confirm that this is the case for iOS and Android -

"react": "16.0.0-alpha.12"
"react-native": "0.47.2"
"react-native-autofocus": "0.0.6"

phil-andrews avatar Dec 28 '17 04:12 phil-andrews

Not really sure what you want me to do here, all the component does is pass some props through to a normal textinput https://github.com/zackify/react-native-autofocus/blob/master/text-input.js

zackify avatar Dec 28 '17 23:12 zackify

I'm not sure what the solution is but it can't be used in production so I had to post an issue.

phil-andrews avatar Dec 29 '17 04:12 phil-andrews

I think I might have and idea now that you mention it :) I’ll mess around with it soon On Thu, Dec 28, 2017 at 20:36 Phil Andrews [email protected] wrote:

I'm not sure what the solution is but you can't put it into production so I had to post an issue.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/zackify/react-native-autofocus/issues/5#issuecomment-354396874, or mute the thread https://github.com/notifications/unsubscribe-auth/AAbacCwizpJIhq2VFSQEHHsAd9zn3W1Tks5tFGxjgaJpZM4ROAeH .

-- Thanks,

Zach Silveira Senior Partner Encryption, Inc https://encryption.io/ Office: 404-602-0322

zackify avatar Dec 29 '17 18:12 zackify

+1

jan-happy avatar Jan 19 '18 19:01 jan-happy

On the latest version of React Native,

import React from 'react';
import { Form, TextInput } from 'react-native-autofocus';
import { StyleSheet, Text, View } from 'react-native';

export default class App extends React.Component {
  render() {
    return (
      <View style={styles.container}>
        <Form>
          <TextInput placeholder="test" />
          <TextInput placeholder="test2" />
        </Form>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});

Works just fine: screen shot 2018-01-29 at 9 46 40 am

maybe a version of RN in between broke it, but appears to be fine now?

zackify avatar Jan 29 '18 14:01 zackify