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

TextField doesn't work on Android - Exception in HostFunction #3459

Open
2 of 7 tasks
Perzonallica opened this issue Dec 13, 2024 · 4 comments
Open
2 of 7 tasks

TextField doesn't work on Android - Exception in HostFunction #3459

Perzonallica opened this issue Dec 13, 2024 · 4 comments
Labels
bug a bug in one of the components waiting-for-response

Comments

@Perzonallica
Copy link

Description

Using the TextField component on Android builds makes the app crash when opening a screen where this component is being rendered. If I change it to RN TextInput, it works.

Error message:

Warning: Error: Exception in HostFunction: TypeError: expected dynamic type `int/double/bool/string', but had type `object'

This error is located at:
    in AndroidTextInput (created by InternalTextInput)
    in InternalTextInput (created by TextInput)
    in TextInput (created by Incubator.TextField)
    in Incubator.TextField (created by TextField)
    in RCTView (created by View)
    in View
    in View (created by TextField)
    in RCTView (created by View)
    in View
    in View (created by TextField)
    in RCTView (created by View)
    in View
    in View (created by TextField)
    in TextField (created by TextField)
    in forwardRef (created by TextField)
    in TextField (created by TextField)
    in forwardRef (created by Home)
    in RCTView (created by View)
    in View (created by ScrollView)
    in RCTScrollView
    in VScrollViewNativeComponent (created by ScrollView)
    in ScrollView (created by ScrollView)
    in Wrapper (created by Home)
    in Home
    in Unknown (created by Route(index))
    in Suspense (created by Route(index))
    in Route (created by Route(index))
    in Route(index) (created by SceneView)
    in StaticContainer

Related to

  • Components
  • Demo
  • Docs
  • Typings

Steps to reproduce

Add import { TextField } from "react-native-ui-lib"; and <TextField placeholder="username" />

If I import the TextField from import TextField from "react-native-ui-lib/textFieldOld";, it does work on Android, however I'm not sure if it is a good idea to use something old here. :)

Expected behavior

Render a working component.

Actual behavior

App crashes.

More Info

Code snippet

import { TextField, View } from "react-native-ui-lib";

return (
    <View>
      <TextField placeholder="username" />
    </View>
);

Environment

  • React Native version: 0.76.5
  • Expo SDK version: 52.0.18
  • React Native UI Lib version: 7.34.1

Affected platforms

  • Android
  • iOS
  • Web
@Perzonallica Perzonallica added the bug a bug in one of the components label Dec 13, 2024
@Perzonallica
Copy link
Author

Probably similar issue also with the Picker component:

Warning: Error: Exception in HostFunction: TypeError: expected dynamic type `string', but had type `double'

This error is located at:
    in AndroidTextInput (created by InternalTextInput)
    in InternalTextInput (created by TextInput)
    in TextInput (created by Incubator.TextField)
    in Incubator.TextField (created by TextField)
    in RCTView (created by View)
    in View
    in View (created by TextField)
    in RCTView (created by View)
    in View
    in View (created by TextField)
    in RCTView (created by View)
    in View
    in View (created by TextField)
    in TextField (created by TextField)
    in forwardRef (created by TextField)
    in TextField (created by TextField)
    in forwardRef (created by Picker)
    in RCTView (created by View)
    in View
    in View
    in RCTView (created by View)
    in View (created by Animated(View))
    in Animated(View) (created by TouchableOpacity)
    in TouchableOpacity (created by TouchableOpacit
...

@adids1221
Copy link
Contributor

Hi,
Currently we are supporting RN 0.73 not 0.76.
When using RN 0.73 does the issue reproduce ? (For the TextField and Picker)

@Perzonallica
Copy link
Author

Ah, too bad, but thanks for the info.

Unfortunately I don't have a 0.73 version installed to test it, but most probably this will be the issue.

@adids1221
Copy link
Contributor

adids1221 commented Dec 16, 2024

Hi, I'll try to check if we can work on some fix right now and update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug a bug in one of the components waiting-for-response
Projects
None yet
Development

No branches or pull requests

2 participants