Expo logs <InputAccessoryView> is not supported on Android yet. repeatedly even when NOT using it on Android
See original GitHub issueREAD THIS FIRST, PLEASE!
Hello! Thanks for reporting an issue. Please make sure you’re posting this in the right place:
- If this is an issue with Expo CLI, our command line tool, please post it in the https://github.com/expo/expo-cli repo instead.
- If this is a feature request, please vote or post it at https://expo.canny.io instead.
- If you are unable to create a reproducible Snack example that demonstrates the bug/issue, please first post in our forums at https://forums.expo.io/ before opening an issue here! (Unless the bug/issue pertains to a standalone, non-ejected build)
Thanks for helping us make Expo better!
Environment
Expo CLI 2.4.0 environment info: System: OS: macOS High Sierra 10.13.6 Shell: 3.2.57 - /bin/bash Binaries: Node: 10.12.0 - ~/.nvm/versions/node/v10.12.0/bin/node Yarn: 1.12.1 - /usr/local/bin/yarn npm: 6.4.1 - ~/.nvm/versions/node/v10.12.0/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman IDEs: Android Studio: 3.2 AI-181.5540.7.32.5056338 Xcode: 10.0/10A255 - /usr/bin/xcodebuild npmPackages: expo: ^31.0.2 => 31.0.5 react: 16.5.0 => 16.5.0 react-native: https://github.com/expo/react-native/archive/sdk-31.0.0.tar.gz => 0.57.1 react-navigation: ^3.0.5 => 3.0.5 npmGlobalPackages: expo-cli: 2.4.0
Diagnostics report: https://exp-xde-diagnostics.s3.amazonaws.com/iosdevroa-4d5f7c00-4482-42b9-a271-b007f53d31eb.tar.gz
iOS and Android
Steps to Reproduce
(Write your steps here:)
- Use react-native’s InputAccessoryView from a file like MyInputAccessoryView.ios.js - this file is provably only used on iOS and NOT Android.
- npm start or yarn start
- expo logs
<InputAccessoryView> is not supported on Android yet.
over and over and over again, thousands of times, every 2 seconds in the console log, cluttering the log and making it impossible to use. The message mentionsnode_modules/expo/build/environment/logging.js:25:23 in warn
so the warning is happening in Expo.
Expected Behavior
Expo should NOT warn about me “using InputAccessoryView” in Android when I am clearly not using it in Android (it’s only import and usage is in a file named .ios.js
. Expo should not clog my terminal with hundreds of warnings every 2 seconds.
(Write what you thought would happen.)
Actual Behavior
(Write what happened. Add screenshots!)
Expo DOES warn about me “using InputAccessoryView” in Android when I am NOT using it in Android.
Note: this does not happen in plain RN, only Expo.
Reproducible Demo
(Paste the link to an example project and exact instructions to reproduce the issue.)
Just use InputAccessoryView and see the warnings.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (6 by maintainers)
The problem is here: https://github.com/facebook/react-native/blob/ba89bf4252a30207c9582c968c033961616b56de/Libraries/Components/TextInput/InputAccessoryView.js#L92. React Native is warning on all platforms, including iOS (probably unintentionally).
To remedy this we’ve pushed an update to the compatible version of RN (Git tag sdk-32.0.1, URL: https://github.com/expo/react-native/archive/sdk-32.0.1.tar.gz).
Hi, @ide thanks for responding. However, the issue is that even if it is a ReactNative issue, Expo doesn’t allow us to fix that with React Native because Expo is always a few versions behind the current latest release of React Native. If we do file a bug with ReactNative, they’ll typically just say “oh, you’re a few versions behind, please upgrade” but I can’t upgrade, because expo won’t let me due to design decisions expo made to lock down the RN version for a given expo version and to grab RN from expo itself. So my hands are kind of tied here … 😦 Totally not directed at you or anybody in particular, just expressing my frustration!
This is a real issue because
<InputAccessoryView> is not supported on Android yet.
gets spammed to my console every two seconds without let up and that is intensely distracting and frustrating and it obscures other meaningful error messages that I do want to see but which get hidden amongst this unnecessary clutter.Note that I have no Android devices running nor any simulators, and
InputAccessoryView
is only referenced within a.ios.js
file. So I have no idea why it is complaining about Android …Any idea how to fix this, given that expo won’t let me update the version of RN? Like can you give me a hint and I’d be happy to test it and even submit a PR or README PR if that helps others?