React-Native-FlatList: onEndReached not working with customed CellRendererComponent - react-native

Description
One of the FlatList's well-known bugs is probably about zIndex.
I'm working on drag and drop cards in FlatList, but zIndex doesn't work as expected.
So I customize CellRenderComponent as workaround(see this), but when I use CellRenderComponent, onEndReached doesn't work properly on real device.
Try my Sample Project to see how it acts.
React Native version:
System:
OS: macOS 10.15.4
CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU # 2.90GHz
Memory: 1.94 GB / 16.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.16.3 - /usr/local/bin/node
Yarn: 1.21.1 - /usr/local/bin/yarn
npm: 6.14.4 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.5, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
Android SDK:
API Levels: 23, 28, 29
Build Tools: 23.0.1, 28.0.3, 29.0.3
System Images: android-23 | Intel x86 Atom_64, android-23 | Google APIs Intel x86 Atom_64, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.6010548
Xcode: 11.5/11E608c - /usr/bin/xcodebuild
npmPackages:
react: ~16.9.0 => 16.9.0
react-native: https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz => 0.61.4
npmGlobalPackages:
react-native-cli: 2.0.1
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
Having problem with zIndex in a list
Customize CellRendererComponent
Now onEndReached working weird.
Expected Results
FlatList should call onEndReached and load more cards when scroll reaches to the end, but it seems to call onEndReached at weird point and jump right to the end.
Snack, code example, screenshot, or link to a repository:
This is my sample project
Please don't hesitate to correct me: I'm quite new to react-native.
Thank you in advance.

Related

React-Native Async Storage - Increasing Storage Size not working for Samsung Devices

Current behavior
I set up new storage size to 20MB using this guide. It works for Xiaomi, Oppo etc devices however not working on Samsung devices.
Row too big to fit into CursorWindow requiredPos=0, totalRows=1
I was getting this error before adding more spaces and it disappared after adding more spaces on my debug devices except Samsung.
Is there any hardware-based solutions for this?
Expected behavior
Works on Samsung devices too.
Repro steps
Use a data which contains data > 6MB
Add more spaces using the guide
Test Samsung and another device
Environment
Platforms tested:
[ x ] Android
[ ] iOS
[ ] macOS
[ ] Windows
AsyncStorage version: 1.13.2
Environment:
System:
OS: macOS 11.2.3
CPU: (12) x64 Intel(R) Core(TM) i7-8700B CPU # 3.20GHz
Memory: 77.17 MB / 8.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 15.0.1 - /usr/local/bin/node
Yarn: Not Found
npm: 7.0.3 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.2, DriverKit 20.0, macOS 11.0, tvOS 14.2, watchOS 7.1
Android SDK:
API Levels: 29, 30
Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.2
System Images: android-29 | Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.6858069
Xcode: 12.2/12B45b - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_272 - /usr/bin/javac
npmPackages:
#react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.64.1 => 0.64.1
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

React Native App crashes in older version Android (API 18)

My project suddenly crashing on my Android 4.4 emulator and show this error at the end of
react-native run-android command. Build was successfully build and it's installed in my emulator. But immediately it crashes and shows below error.
BUILD SUCCESSFUL in 21s
65 actionable tasks: 65 executed
info Connecting to the development server...
adb: error: closed
warn Failed to connect to development server using "adb reverse": Command failed: /Users/samsudeenfaslurajan/Library/Android/sdk/platform-tools/adb -s emulator-5554 reverse tcp:8081 tcp:8081
info Starting the app on "emulator-5554"...
Starting: Intent { cmp=com.royalvideoplayerlite/.MainActivity }
So I tried to open a new project using react-native init MYNEWPROJECT and tested again. Same crash happened again.
It's working fine with Android API Level 28
I can build APKs and install in any version of emulator. But Its working without crashing in API Level above 21 only.
I don't know what is the error.
info Fetching system and libraries information...
System:
OS: macOS 10.15.5
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU # 2.30GHz
Memory: 76.48 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.18.1 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.5 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.9.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.5, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
Android SDK:
API Levels: 18, 19, 27, 28, 29, 30
Build Tools: 28.0.3, 29.0.2, 30.0.0
System Images: android-18 | Google APIs Intel x86 Atom, android-19 | Google APIs Intel x86 Atom, android-28 | Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.0 AI-193.6911.18.40.6514223
Xcode: 11.5/11E608c - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_252 - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
#react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.0 => 0.63.0
npmGlobalPackages:
*react-native*: Not Found

【RN v0.57.4】undefined is not an object(evaluating 'warnings.filter')

Description
Executing npm i and react-native run-android in an existing rn project(iOSnormally), ran successfully but error produced with red screen:
undefined is not an object (evaluating 'warnings.filter')
React Native version:
React Native Environment Info:
System:
OS: macOS 10.14.5
CPU: (4) x64 Intel(R) Core(TM) i3-8100B CPU # 3.60GHz
Memory: 43.46 MB / 8.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 12.10.0 - /usr/local/bin/node
Yarn: 1.17.3 - ~/.yarn/bin/yarn
npm: 6.11.3 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
Android SDK:
API Levels: 23, 26, 27, 28
Build Tools: 23.0.1, 26.0.1, 27.0.3, 28.0.2, 28.0.3
System Images: android-23 | Intel x86 Atom_64, android-23 | Google APIs Intel x86 Atom, android-23 | Google APIs Intel x86 Atom_64, android-26 | Google APIs Intel x86 Atom, android-27 | Intel x86 Atom_64, android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5977832
Xcode: 11.3.1/11C505 - /usr/bin/xcodebuild
npmPackages:
react: ^16.6.0-alpha.8af6728 => 16.13.1
react-native: 0.57.4 => 0.57.4
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-demo-for-npm: 1.0.16
react-native-update-cli: 0.1.0
Steps To Reproduce
Execute npm i in an existing project
run react-native run-android
Expected Results
Run Android successfully without any errors.
I have alredy searched many solutions for this issue, but unfortunately, no any solutions finally. Any help for this is appreciated. Thanks a lot in advance.
I think you should find the warnings variable in your codebase. If it is exists then maybe the error occured from that part. It could be an undefined so you should change code like
warnings && warnings.filter...
or
if(warnings) {
warnings.filter..
}

Error while updating property 'accessibilityRole' of a view managed by:RCTView

Hi I am getting following error. PFA
Error while updating property 'accessibilityRole' of a view managed by:RCTView
null
Invalid accessibility role value:tab
React Native Environment Info:
System:
OS: macOS 10.15.2
CPU: (4) x64 Intel(R) Core(TM) i5-5350U CPU # 1.80GHz
Memory: 53.47 MB / 8.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.14.1 - ~/.nvm/versions/node/v12.14.1/bin/node
npm: 6.13.4 - ~/.nvm/versions/node/v12.14.1/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
Android SDK:
API Levels: 28, 29
Build Tools: 28.0.3, 29.0.2
System Images: android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.6010548
Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
npmPackages:
react: 16.6.3 => 16.6.3
react-native: ^0.59.10 => 0.59.10
Use exact version of
"native-base":"2.13.12"
"#react-native-community/toolbar-android": "0.1.0-rc.2",
delete node_module and npm install
Try the following.
cd android
gradlew clean
delete the following folders (if any of them exists)
/android/.gradle,
/android/build,
/android/app/build,

While trying to run react-native run-android, JS bundler is closed immediately

I want to use react-native on windows 10 which is newly installed.
I followed all instructions on https://facebook.github.io/react-native/docs/getting-started (React Native CLI Quickstart).
But when I use npx react-native run-android the JS server closed immediately!
How can I solve it?
My system info:
OS: Windows 10 10.0.18363
CPU: (8) x64 Intel(R) Core(TM) i7-4810MQ CPU # 2.80GHz
Memory: 9.97 GB / 15.88 GB
Binaries:
Node: 13.3.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.21.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.13.4 - C:\Program Files\nodejs\npm.CMD
SDKs:
Android SDK:
API Levels: 19, 23, 26, 27, 28, 29
Build Tools: 23.0.1, 26.0.3, 27.0.3, 28.0.3, 29.0.2
System Images: android-28 | Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom
IDEs:
Android Studio: Version 3.5.0.0 AI-191.8026.42.35.6010548
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.5 => 0.61.5
Have you installed Android Studio? Also, are you using the Expo version or Pure React Native version? One last thing is can you try to run this command; npm start or expo start?