React Native TextInput closes automatically when opened on android - react-native

I switched laptops and cloned the repository of my project, did a quick yarn install and looks like it was a big difference from the one on the main branch but I didn't bother since maybe it's just because of different Node versions.
Now every time I click on one TextInput the keyboard opens and closes immediately only on android. I attached a quick recording here. Tried some solutions and it looks like switching android:windowSoftInputMode from adjustResize to adjustPan in AndroidManifest.xml fixes the problem with the closing but I'm not really happy with the behaviour of the keyboard in the app when it's set to adjustPan. Maybe this issue starting happening a while ago but I just saw it now.
Here is just an input centered inside a simple View.
https://gfycat.com/ordinaryquestionabledinosaur
Any suggestions anyone?

Was facing a similar issue, turned out that the react-native-screens library was causing the problem. Try setting the version to "~3.10.2". Worked out for me.

Change the line in AndroidManifest.xml
Old line
android:windowSoftInputMode="adjustResize"
New line
android:windowSoftInputMode="stateAlwaysHidden|adjustPan"

Change the line in AndroidManifest.xml works for me, I did the update but that does not works
Change the config to:
android:windowSoftInputMode="stateAlwaysHidden|adjustPan"

Replace the line in the AndroidManifest.xml file:
Before
android:windowSoftInputMode="adjustResize"
After
android:windowSoftInputMode="stateAlwaysHidden|adjustPan"

Just Upgraded react-native-screen to latest version.
yarn add react-native-screens
"react-native-screens": "^3.13.1"

For those who have the same problem, having both botton and top padding often result on the keyboard closing itself when opening. Took a while to discover that

if you're using react native version "0.64.*". Just set react-native-screens version to "3.4.0". Do not use "^" to avoid npm updated it. and it worked for me.

Related

React native chrome debugger not showing that console.log and default logs

i recently upgraded from RN 0.61.5 to 0.62.2.
However, chrome debugger won't work from some point on. This means that the debugger and simulator are well connected, but I don't see any of the basic logs that I use console.log, or that first pops up logs.
So, i try some solutions.
first, I reset the project. and run react-native init <my-project>. and copy & paste past source code(Except for system files or node_modules) that src, .gitignore etc
but, this situations keep goes on now.
second, git revert when it worked well before upgrade.
but this is same bad result like above. everything is good. project's Run or Build ยทยทยท.
ONLY NOT WORKING debugger..
what should i do ?
Thank you in advance for your help.
Please look this picture
SELF ANSWER
One of the Babel packages I'm using, the Babel-plugin-transform-remove-console, had eliminated all the logs even in development mode.
If you remove this from the project, it works normally.

FontFamily "Material Design Icons" is not a system font and has not been loaded through Font.loadAsync

* I am just a student and I am new to expo, react-native and mobile developpement *
So here's what happens
I am building a react-native app using Expo and react-native-paper for my Icon and everything was going fine with my application until I woke up yesterday and Expo started telling me the same error.
I have not load any Font in my app so I really dont understand where this error came from.
What is very interesting is that when I control Save one files of the project on VScode while running, I can see my app like this without the Icon, and when I switch to a different page, the App is replace by the same screen error.
My friend is working on the exact same code and he does not see the error so I am lost ...
App.js look like this
I use my Icon like this
The problem is clearly the icon because my login page work just fine, so I know the problem have somethings with https://materialdesignicons.com/, what should I do ? delete all my icon and recreate them with react-native-elements?
Honestly I just don't get it and I have been stuck on this for several hours and I don't want to lose any more time so here I am asking for help
Thanks guys,
Have a blessed day and stay safe you all
So there is a bug right now using Expo with using custom fonts. Check your node_modules/expo/node_modules folder and delete expo-font if it is there. That has been working for me.
Make sure to delete the expo-font inside the node_modules/expo/node_modules NOT the one in node_modules.
I know you said you are not using custom fonts but maybe it is an issue regardless.
Note: if you run expo install or npm install it will come back so you'll have to delete again.

React Native app stuck on white screen on launch

I am using RN version 0.60 and My app is stuck in white screen without getting any error
Try turning on debug mode. If it still exists,there is problem in your code or setup.
I was having an issue with gradle. After updating it to latest version everything working fine.
The bundles might be loading at that time. Have a look at your terminal any errors might be thrown there.

React-native watchman doesn't work anymore

Few days ago I noticed watchman stopped working.
Using a real android device with shake gesture I cannot Reload the app (a reload doesn't take the changes to the code). Live reload and hot reloading don't work either.
The only way I have to get the app take the changes is to kill the packager and relaunch it (often neither this method makes the app takes changes!).
There is a way I can solve? This issue It's pretty frustrating.
I'll answer to myself. After further research, this issue looks to be caused by this option in app.json
"packagerOpts": {
"nonPersistent": "--nonPersistent"
}
which I've added to be able to produce a release build using Expo (otherwise I get error "socket hang up").
It would be nice if some Expo developer would post some infos about this issue and what that option in app.json really does (the docs says nothing).

No dimensions set for key window

I am having some issues with react native. It keeps giving me the following error.
What could be causing this?
Try closing terminal, deleting ios/build and run again. I had the same issue but now its working.
For anyone that runs into this. Check to confirm the window passed to get() is a string Dimensions.get('window') .
There apparently is an issue with react-router-flux since a few days.
You probably need to rollback to the 3.38.0 version before the bug was introduced.
yarn add react-native-router-flux#3.38.0
If it doesn't work, some people also said that you might need to close all your terminals, delete your build folder and clear your npm cache.
I got this error when I ran a different react-native project, but had forgotten to close the terminal window that was running the React Packager. Once I closed the React Packager terminal window and re-ran react-native run-android the error went away.
Check if you have an old package manager running from a different project. If so, close it and run again.
Close all terminal
and after use following command in terminal
npm cache clean
worked for me
"Close terminal, rerun" worked for me. Seems like this is a recent issue due to the update of react-native.
There are another way to solve this error, I update react-native-cli: 2.0.1 and it works for me.
Use this Dimensions.get('window').width;