question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warning: Failed prop type: Invalid prop `autoComplete` of value `password-new`

See original GitHub issue

Description

I am getting this warning when supplying the value 'password-new' to TextInput’s autoComplete prop, although this is supported, as per the latest docs. This is the full warning:

Warning: Failed prop type: Invalid prop `autoComplete` of value `password-new` supplied to `ForwardRef(TextInput)`, expected one of 
["cc-csc","cc-exp","cc-exp-month","cc-exp-year","cc-number","email","name","password","postal-code","street-address","tel","username","off"].
[...Stack trace]

I am guessing this is because of the type discrepancies between the JS and native component files.

Version

0.66.2

Output of react-native info

System:
    OS: Windows 10 10.0.19043
    CPU: (12) x64 Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
    Memory: 13.70 GB / 31.68 GB
  Binaries:
    Node: 16.12.0 - ~\AppData\Local\Temp\yarn--1636384436565-0.4897942578758505\node.CMD 
    Yarn: 1.22.15 - ~\AppData\Local\Temp\yarn--1636384436565-0.4897942578758505\yarn.CMD 
    npm: 8.1.1 - C:\Program Files\nodejs\npm.CMD
    Watchman: 20210110.135312.0 - C:\Users\mlasaj\AppData\Local\Watchman\bin\watchman.EXE
  SDKs:
    Android SDK:
      API Levels: 30
      Build Tools: 30.0.2, 30.0.3, 32.0.0
      System Images: android-30 | Google APIs Intel x86 Atom_64
      Android NDK: Not Found
    Windows SDK:
      AllowAllTrustedApps: Disabled
      Versions: 10.0.14393.0, 10.0.19041.0
  IDEs:
    Android Studio: Version     2020.3.0.0 AI-203.7717.56.2031.7784292
    Visual Studio: 16.11.31624.102 (Visual Studio Enterprise 2019)
  Languages:
    Java: 13.0.2
  npmPackages:
    @react-native-community/cli: Not Found
    react: Not Found
    react-native: Not Found
    react-native-windows: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

  1. Install RN v0.66.2 on Android
  2. Create TextInput component
  3. Add autoComplete prop with value 'password-new'

Snack, code example, screenshot, or link to a repository

Screenshot_1636384608

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
ghostcommented, Jan 24, 2022

@TheWirv I still see this error with ‘sms-otp’ value in 0.67.1 🤔

2reactions
ghostcommented, Mar 28, 2022

@itsjaychang Yeah we got it working. Make sure you set importantForAutofill to true 😃 and double check the spelling it is otp not opt - just in case you never now

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid prop `defaultValue` of type `string` supplied to ...
As of your code, MUI Autocomplete Doc says: The default value. Use when the component is not controlled. To have controlled Autocomplete ......
Read more >
TextInput - React Native
A foundational component for inputting text into the app via a keyboard. Props provide configurability for several features, ...
Read more >
invalid prop `rows` of type `object` supplied to `forwardref ...
` Update after i remove the Object.fromEntries. ... Warning: Failed prop type: Invalid prop `value` supplied to `ForwardRef(Slider)` 3.
Read more >
Invalid prop 'value' of type 'object' supplied to 'TextInput' React ...
Coding example for the question Failed prop type: Invalid prop 'value' of type 'object' supplied to 'TextInput' React Native-React Native.
Read more >
Warning: Failed prop type: Invalid prop `children` supplied to ...
Warning : Failed prop type: Invalid prop `children` supplied to `ForwardRef(…)`, expected a ReactNode. Material UI⁴.11, React¹⁷.0.2, Created at ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found