text:
How to change the port 8081?

Hi,
Because of the port is used by McAfee in my company,it's difficult to develop every time.
whether can the port be changed to another one?
how to do?

There are two files needed to be modified about port 8081:

react-native/local-cli/server/server.js  - default
2.react-native/React/React.xcodeproj/project.pbxproj -  replace all 8081
above two, it's ok;

What about react-native start --port 9988 ?

You'll need to start the packager on a different port using the --port flag, and also modify any files in the iOS/Android project that use the 8081 port. See #9145 for an on-going discussion. I'll go ahead and close this as duplicate.

node_modules/react-native/local-cli/server/server.js
2.node_modules/react-native/React/React.xcodeproj/project.pbxproj
3.node_modules/react-native/React/Base/RCTBundleURLProvider.m
4.node_modules/react-native/Libraries/WebSocket/RCTWebSocketExecutor.m
5.node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/AndroidInfoHelpers.java
6.react-native/packager/react-packager/src/Server/tests/Server-test.js
7.react-native/local-cli/util/isPackagerRunning.js
8.react-native/Libraries/Image/tests/resolveAssetSource-test.js

I modified all of the files listed above,the packager could be started,but when I ran the command "react-native android",it didn't still worked.
there was a error:
Could not run adb reverse:Command failed: C:\users\jack\AppData\Local\Android\sdk/platform-tools/adb -s 029ds34d reverse tcp:8081 tcp:8081

@codepandy I replaced EVERY 8081 I could find in my project with 8088 which seemed to work.

My 8081 port is also occupied by McAfee. Combining the answer of @ltwaia and @Aaronius, it finally worked for me!

Got the same problem here on Genymotion, android studio emulator and real devices. Isn't there any elegant alternative rather than need to change every files to another port other than 8081?

our server component bind on port 8081, running the react-native client on the same machine is cumbersome...

Changed EVERY instance of port from 8081 to something else... then deleted the .babelrc file at the root of the app directory... ran again and it works. That was way too difficult. This crap needs to be fixed. Just spent 4 hours trying to figure out a solution.

Duplicate of #9145

@codepandy @liuxh0  I just ran into the same problem, thanks McAfee 👎
this is how I stopped the macmn process
sudo lsof -n -i4TCP:8081 # get the process' PID
sudo launchctl list | grep 5693 # find the launchd endpoint
sudo launchctl remove com.mcafee.agent.macmn

same problem here.

Same problem , trying it on windows

npm start -- --port=8080 worked for me

Two Steps which worked for me:

node_modules/react-native/local-cli/server/server.js
change "default: 8081, " to "default: 1234,"
On android emulator press cmd +m(for mac)
Dev Settings > Debug server host & port for device >"10.0.2.2:1234"

Two Steps which worked for me:
node_modules/react-native/local-cli/server/server.js
change "default: 8081, " to "default: 8088,"
On android emulator press cmd +m(for mac)
Dev Settings > Debug server host & port for device >"10.0.2.2:8088"

For debugging(Windows) , open the react native debugger -
http://localhost:8088/debugger-ui
Then press Ctrl +Shift + J

Hi All,
I found the same issue while running in windows environment and simulating using android simulator.
After doing some trial & error, I found the solution as below:
1>> Change the port in "\node_modules\react-native\local-cli\server\server.js" from default:

process.env.RCT_METRO_PORT || 8081

to

default: process.env.RCT_METRO_PORT || 9088

if the port is blocked or issued to some other application.
Note: You can choose any port number, I have chosen 9088
2>> Run the command react-native run-android --port 9088 (Put your port number here). This port shall be sent to adb running, so that both server and adb shall be in same port.
3>> Now in Android studio simulator, press Ctrl+m, to go for "Dev Setting", then select Debug Server port & host for Device, set "localhost:9088".
Now it will start loading the changes you make in your application.
Enjoy coding now :)

#304

8081端口被占用，我是用这种方式实现的

react-native/local-cli/server/server.js - default

react-native/React/React.xcodeproj/project.pbxproj - replace all "port" 8081 ,not fileref

above two, it still cannot run .  So you should search global in you native project  in  Xcode ,change all

@ltwaia

authors: Aaronius Arshiamidos JeremyGranger Louies89 Qvatra aelshamy amarnathpatel codepandy falbertp hramos juliantellez liuxinhu ltwaia pranavdixit schillerGao swap7206 themnd ummahusla

repo: facebook/react-native


text:
Android "Could not get BatchedBridge, make sure your bundle is packaged properly" - with fix

Description
I just followed the instructions on docs/getting-started.html (with a real device).
Got a RedBox with:

Android error “Could not get BatchedBridge, make sure your bundle is packaged properly” on start of app

react-native run-android
There is a failed try to perform an adb command, revealed on the console with (French ouput):

'adb' n'est pas reconnu en tant que commande interne ou externe, un programme executable ou un fichier de commandes.

This prevents the script to run the regular adb reverse tcp:8081 tcp:8081 and a fallback is engaged without this necessary setting.
Solution
The fix is to help local-cli\runAndroid\adb.js to find adb.exe, the same way as local-cli\runAndroid\runAndroid.js:
Replace:
const devicesResult = child_process.execSync('adb devices');
By:
const devicesResult = child_process.execSync( (process.env.ANDROID_HOME ? process.env.ANDROID_HOME + '/platform-tools/' : '') + 'adb devices');
This should fix issue #9336 as well, unless there are another causes.
Additional Information

React Native version: react-native@0.41.2
Platform: Android
Operating System: Windows 10

thanks psam44
complete Path is:
[yourProjectFolder]\node_modules\react-native\local-cli\runAndroid

Solution:
under "react-native" directory:
after run command "./gradlew :Examples:UIExplorer:android:app:installDebug" successfully,
run commnad "./packager/packager.sh" successfuly.
then click "UIExplorer App“ in the emulator or the device

I faced the same problem, it is because adb in not in your path.
Add adb in your path and it will work fine.
adb will be in <root/sdk/platform-tools>

I am hitting this issue when I am attempting to integrate in an existing app, when I say
setUseDeveloperSupport(false)

However, if I call
setUseDeveloperSupport(true)

it works.

Hello, I am trying to run my react native app but i am not able to resolve the issue  "Android error “Could not get BatchedBridge, make sure your bundle is packaged properly” on start of app" , is there any fix for it , i cannot find any solution web either.

Hi , I also get the below error Execution failed for task ':app:processDebugResources'.

java.io.IOException: Could not delete path

Does anyone has a solution on how can i run the app on emulator ???

Also having this issue with the emulator.

Work for me
http://stackoverflow.com/questions/17901692/set-up-adb-on-mac-os-x

Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!
If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:

Does the issue still reproduce on the latest release candidate? Post a comment with the version you tested.
If so, is there any information missing from the bug report? Post a comment with all the information required by the issue template.
Is there a pull request that addresses this issue? Post a comment with the PR number so we can follow up.

If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.

@hramos
This bug is still current with:
React Native version: react-native@0.47.1
And the one-line fix is still the one given in the description.
(these automatic closings, without reading, are discouraging for me to contribute)

source: gharchive/issue

authors: ShoaibKhazer Slapbox eliprodigy esilverberg helloworldtang hramos psam44 siddhant91 zeeshanhanif

license: MIT

license_type: permissive

license_source: github-api


text:
How can I call Text Selector on a Text component?

Is this a bug report?
Yes

Have you read the Contributing Guidelines?
Yes
Environment

Steps to Reproduce
How can I call Text Selector on a Text component?
Expected Behavior

I do not know how to solve this problem
Actual Behavior

I tried to find libraries, but did not find
In the end I want to get this:

Reproducible Demo

How to be?

This issue looks like a question that would be best asked on StackOverflow.
StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only.
Will close this as this is really a question that should be asked on StackOverflow.

authors: gHashTag hramos


text:
Can't run tests with React Native 0.56

Environment
React Native Environment Info:
System:
OS: Linux 4.15 Ubuntu 18.04 LTS (Bionic Beaver)
CPU: x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
Memory: 3.08 GB / 15.39 GB
Shell: 4.4.19 - /bin/bash
Binaries:
Node: 8.10.0 - /usr/bin/node
Yarn: 1.5.1 - /usr/local/bin/yarn
npm: 6.1.0 - /usr/local/bin/npm
npmPackages:
react: 16.4.1 => 16.4.1
react-native: 0.56.0 => 0.56.0
npmGlobalPackages:
react-native-cli: 2.0.1
Description
When launching the tests with npm test, I get the following output :
JsProject@0.0.1 test /home/victor/Wedoogift/JsProject
> jest

 FAIL  ./App.test.js
  ● Test suite failed to run

    SyntaxError: /home/victor/Wedoogift/JsProject/node_modules/react-native/Libraries/Utilities/Platform.ios.js: Unexpected token, expected "{" (35:17)

      33 |     return constants ? constants.interfaceIdiom === 'tv' : false;
      34 |   },
    > 35 |   get isTesting(): boolean {
         |                  ^
      36 |     const constants = NativeModules.PlatformConstants;
      37 |     return constants && constants.isTesting;
      38 |   },

      at Parser.raise (node_modules/@babel/core/node_modules/babylon/lib/index.js:776:15)
      at Parser.unexpected (node_modules/@babel/core/node_modules/babylon/lib/index.js:2079:16)
      at Parser.expect (node_modules/@babel/core/node_modules/babylon/lib/index.js:2067:28)
      at Parser.parseBlock (node_modules/@babel/core/node_modules/babylon/lib/index.js:4488:10)
      at Parser.parseFunctionBody (node_modules/@babel/core/node_modules/babylon/lib/index.js:3754:24)
      at Parser.parseFunctionBodyAndFinish (node_modules/@babel/core/node_modules/babylon/lib/index.js:3734:10)
      at Parser.parseMethod (node_modules/@babel/core/node_modules/babylon/lib/index.js:3686:10)
      at Parser.parseObjectMethod (node_modules/@babel/core/node_modules/babylon/lib/index.js:3609:12)
      at Parser.parseObjPropValue (node_modules/@babel/core/node_modules/babylon/lib/index.js:3644:21)
      at Parser.parseObj (node_modules/@babel/core/node_modules/babylon/lib/index.js:3555:12)

Test Suites: 1 failed, 1 total
Tests:       0 total

Reproducible Demo
It just consists of the default app obtained with "react-native init" and with an "App.test.js" file containing the following code :
import * as React from 'react';

import renderer from 'react-test-renderer';
import App from "./App";

test('renders correctly', () => {
  const tree = renderer.create(<App />).toJSON();
  expect(tree).toMatchSnapshot();
});

Note: I had to add babel-core^7.0.0-beta3 to be able to start the tests.

Duplicate of #19859

authors: kelset victorlevasseur


text:
resize and compress image before upload ?

Hello.
I work on an app who make pictures from camera and upload them to an API.
Currently i use "react-native-image-crop-picker" package from npm who work very well for resizing and compressing but lost the EXIF data.
Or i need EXIF , i opened a issue on "react-native-image-crop-picker" github but no response after few weeks.
Is there a way to compress and or resize image stored on device with react ? i tryed js lib like "piexifjs" but didn't found how to make it work :(
any advice are welcomed. thanks

@alainib did you figure anything out?

@NativLouie
Do you need to keep exif ?
we make à package ton copy exif from an image to another one (compressed with ''react native image crop picker' '). It work good on Android
On ios It dont because systèm remove exif before upload It using post
Maybe or can work with upload base64 but we didnt test it

authors: NativLouie alainib


text:
Cannot scroll smoothly on a page with a lot images (Android 9.0 only, fine for 8.x, 7.x)

Environment
Run react-native info in your terminal and paste its contents here.
React Native Environment Info:
System:
OS: macOS 10.14.2
CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Memory: 223.26 MB / 16.00 GB
Shell: 4.4.23 - /usr/local/bin/bash
Binaries:
Node: 11.5.0 - /usr/local/bin/node
Yarn: 1.12.3 - /usr/local/bin/yarn
npm: 6.4.1 - ~/.npm-packages/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
API Levels: 27, 28
Build Tools: 27.0.3, 28.0.3
System Images: android-24 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5056338
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.6.3 => 16.6.3
react-native: 0.57.8 => 0.57.8
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-cli: 2.0.1
Description
Describe your issue in detail. Include screenshots if needed. If this is a regression, let us know.
A simple page that has a ScrollView with 100 Image in it cannot scroll smoothly on emulator or device with Android 9.0 . It can scroll smoothly on Android 8.x or 7.x
Reproducible Demo
Reproduce project
https://github.com/gsunsnackv/android-9.0-react-native-scroll-bug/tree/master
You should also be able to reproduce using the following simple steps:

react-native init AwesomeProject
Edit App.js .
Change View to ScrollView
Add 100 different images under the ScrollView for example https://github.com/gsunsnackv/android-9.0-react-native-scroll-bug/blob/master/App.js
Open an Android emulator with Android 9.0 (Pie) installed
react-native run-android

=== New information 2019-01-09 ===
FlatList does not work either. Here is the same project above changing ScrollView to FlatList
https://github.com/gsunsnackv/android-9.0-react-native-scroll-bug/tree/flatlist

Is there any workaround for this issue?

@alexandrius I do not have any work around. Are you experiencing the same issue? Can you click on the thumb up to upvote this issue?

@gsunsnackv Yes fling stops working if it looses focus (navigating to another page and back)

is there any help?

Yeah pain is real on this one, going to give https://github.com/Flipkart/recyclerlistview a try later tonight and report back in the morning.

Still reproducible with 0.59.1

I start working in an app with 100 images per page (FlatList and Slider) in Android 8. All was working very well, i was impressed with RN :) .But everything changes when I updated mi Xiaomi to Android 9.
My app currently show lag, in the emulator is worst.
Still reproducible with 0.59.1
Help, please.

Not a solution but a workaround that we have used: reduce the FlatList's windowSize on Android 9 to something small like 3.
It seems like this jank is caused by literally the total number of image pixels that RN is rendering. If you reduce the dimensions of your images, the problem goes away until you add more images.

This regression (since < Android 9 are working) is quite annoying for us. To a point that I'm willing to pay to get it fixed. If you are in the same situation, please join force and put down some rewards.
I just added a $10 reward for this issue. The total reward now is $10.  Join me to add more reward to get this issue fixed faster. You can do it here: https://www.issuereward.com/issue/db5AZ54NR9
I suggest admin of this repo install the Issue Reward bot from https://github.com/apps/issue-reward-beta

@sunshineo Have you tried substituting React Native ScrollView implementation with NestedScrollView?

@sunshineo Here's the solution:
/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 * @flow
 */

import React, { Component } from 'react';
import { StyleSheet, Image, View } from 'react-native';
import { RecyclerListView, DataProvider, LayoutProvider } from 'recyclerlistview';

const dataProvider = new DataProvider(((r1, r2) => {
    return r1 !== r2;
}));

const images = [
    "https://d301468hdcm00e.cloudfront.net/cce71941eb82ac08759e0f0cd1052eaf_video-file.png",
    "https://d301468hdcm00e.cloudfront.net/eb037f1ffa2d70c821793962ae7f3893_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/fe61fae487d9bb1abb672e390c137f0a_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/21d59ee6577782b0f9fce2254d3fa321_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/4d316b9ea2e682b2e9d5f6dbff074fe7_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/bb17d6dd014a91d67a4c11529874b25e_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/4ea7e227c477b7c40063b16fc52c4047_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/b575f7c440732c55f785059bd428a769_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/d07949ec72a3a0351c0047b4f74420d8_thumbnail.png",
    "https://d301468hdcm00e.cloudfront.net/be68a2cd2fbe5ff4e5ccb741ec5cfb0f_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/655b99b40128f9b40e511cd0f84f097f_thumbnail.png",
    "https://d301468hdcm00e.cloudfront.net/b57edfe042a5bb8366672ffbb0783539_thumbnail.png",
    "https://d301468hdcm00e.cloudfront.net/6e65fe0fffbbfeaf700f5e067cf412dd_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/9b8edc114fd1472ef1177a19d13e6218_thumbnail.png",
    "https://d301468hdcm00e.cloudfront.net/f1b9287971cc07642329bc759b380446_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/18dc3dd9e430ba1575aebaf72307978d_thumbnail.png",
    "https://d301468hdcm00e.cloudfront.net/a0e3fff4956145b1a9b3f90ab4502a33_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/be3f5e12a86a7119d9aa3cef9e6e551f_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/e777dadd4ec4925084148635a8da84cd_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/ee143260ed53ccbf09eb1ddf9d07f241_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/fd8ee73a45d931ba11b5da5b192ec2bb_thumbnail.png",
    "https://d301468hdcm00e.cloudfront.net/bd99df637237267580b8c9034d5f557f_thumbnail.png",
    "https://d301468hdcm00e.cloudfront.net/2b4a793325ca76a72e47dcbd93697a65_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/eee1f2a2009db27c846940eb86137bb4_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/6508a56e24f9341f08dbfc4f8d22b919_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/03a02d7cfe272d807d731da00710a357_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/6a657afc87434eacc603b49de7fe5fba_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/b3edfbdf7276c3560dc3e293976986c5_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/0a7840e058b5aa96db969081284a8c05_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/761d107b61fd9fbaca4dfe11cce0d040_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/bcd109db9e652208487c8dd5df61bce0_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/26ef17691c4860096a3e5dfaf74dfd59_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/9a2775589197620fe356bdc413260eba_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/79846b9dfdd3a2d7e537b690759f3a86_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/c7acbb527984ce81145267690ed2c892_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/4cea72399d9de87ce7bbc885842bd26e_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/ff12987c6ddb0dba0b86335544e2819e_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/01dc15ddee11ddaf533b0f3b4234ab7e_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/41d223a280ee93e17204b104341e9008_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/b82bb3a8d8b80b624960cb91efa93ef3_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/4bfc2219b0d73142ca2b7157a7c6fc31_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/91dcbf268ecdca69925ecb49b8e373e6_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/7cca7994d36b31688da162fd86dc9bd5_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/2bf2e39e0c58a0b1b8a5fc2516242611_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/a7d59857fb34b56bbe13b1d5812629f0_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/27b5ecc3f96e3f2356d88071aa6c1bdd_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/620467c8d92609182361d148345c260f_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/9575cf5cf355de2e6ef2f23f02c8bae2_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/cb2eca2d89b229aff05c0ddbd866749e_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/15d3a4ddb75caa365d37938ee67b68be_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/7ec5bb3cf108c4ed7a6c4ef9011d71e2_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/872625c27acad9f54fb0143bd6a24d85_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/8b45155e982fe1dd274b2c34055b425e_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/b4ca85a41ac9437fdbb5e5e9919bc9d3_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/e67299c6d8f5a2e4236409038d067320_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/53c17bc4ef51c5a88af5b9348fbd9699_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/29c5a29d54788ce6766c79e2faf53998_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/86117df5913b17e728ae94a441163cab_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/063aace8eff8ec68ff2fa8fab1b2e350_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/b1f8e3a2d4fdf6c6e03569f56c602686_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/6b0156491539e9a72b0eccb9d80685b1_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/c162ab8b459fa9da12261e9fae5c3f80_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/985e4c4676be7c1b1d02ded514994b19_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/d2a2c462da0da55bcb26ce775ed95891_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/7333448ad4a8c98efd0e03eda924df58_thumbnail.png",
    "https://d301468hdcm00e.cloudfront.net/8b7b9894fee44b15acb8917fbb48f2eb_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/820b21733ca6091b61fa0bb9d33b9e79_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/70a09ada579de824b1c81be13c0ebdb1_thumbnail.png",
    "https://d301468hdcm00e.cloudfront.net/e14c4192198a99ac1ab39975f512e56c_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/6be306af38dde84d258801d630758fe8_thumbnail.png",
    "https://d301468hdcm00e.cloudfront.net/240af802d4e6627ceba2eb3020ed1ec9_thumbnail.png",
    "https://d301468hdcm00e.cloudfront.net/2d26f3d8b1e390d9d5682164fe2d5094_thumbnail.png",
    "https://d301468hdcm00e.cloudfront.net/b1b10ea73b6113623d62531b536246da_thumbnail.png",
    "https://d301468hdcm00e.cloudfront.net/daa8948da075ffffad40d7256e05c089_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/3d9f60626d358d68f95d1be19209fc45_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/83188ab064ef764c9a9a0cb643b9a3e7_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/c401c0bfedfe6a0b4515dea53eeb7d4c_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/3f94434a8ad72dba4156962132bafe44_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/d1488736aced7845f621443f9b2b8f0e_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/9da2b7a4987582ac4259db0c23876b17_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/7618ef478fa9bf25a56844a73b5f92c8_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/6c0e0db86d94fe1d8b8fc1e18c384042_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/54ba9807386dcb48fdef4af278bd6e87_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/2090c6b6aae9346d62dfbff8fd1ca15d_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/b9e54c60e0ef10dca356265f68f1a680_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/93579efc6b4f7b82edf74df370948e09_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/d7564e1a1c34ebb287096ad92ca0728e_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/efe1244f004cb89d4e8b7a897dbe96e6_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/34adbb23d057a8b76406f43a32b7781f_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/4f8745469c320ae20dc1075c4b2b35ba_video-thumbnail-file.jpeg",
    "https://d301468hdcm00e.cloudfront.net/05656ccec7c7fa2949fb860171fccee7_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/746d4d577fb965573d440210ce4dda13_thumbnail.png",
    "https://d301468hdcm00e.cloudfront.net/e4786fb6bca5f3d1d01c862feb94eefa_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/aa71d06f69daddd4e9bc3ca003231caf_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/6dd015aabbecbf93ea7628a63b544b94_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/1ded32bbdd5f6f371cf32ee6ae31b399_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/27caff6c79562c5160d7f44728b370cd_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/048dd65f42d6f61f69a482f7c3c9ac6e_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/d5e870a4e713d759fd436a5dbf9db925_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/7958c8af4cf94e93ca9887bef3f775cb_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/c13ec61ef5abc3bf26cea3c8197d9709_4811a3440a1c04c60ad9c5eddc7bcf8d_thumbnail.png",
    "https://d301468hdcm00e.cloudfront.net/4421bb27e3aeecf74f65f6b9269ff78d_Screen%20Shot%202018-08-29%20at%202.26.19%20PM.png",
    "https://d301468hdcm00e.cloudfront.net/40bbf507120de434fb53711998220c5c_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/2e1e0c4f7a302472cb46afb074b21e0a_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/ed25957da9549d57b924a9a792db2963_thumbnail.png",
    "https://d301468hdcm00e.cloudfront.net/dd231e317bbf38aa0425f4cf9b597f64_thumbnail.png",
    "https://d301468hdcm00e.cloudfront.net/f78e67058417c73c92534cab47131c1a_thumbnail.png",
    "https://d301468hdcm00e.cloudfront.net/342245b72d9a9bcc8b70e250c82b9919_thumbnail-file",
    "https://d301468hdcm00e.cloudfront.net/e37326aa90fbe10dc5e27df510a7f980_thumbnail-file"
]

export default class Temp extends Component {

    constructor(props) {
        super(props);
        this._layoutProvider = new LayoutProvider(
            () => 0,
            (_, dim) => {
                dim.height = 300;
                dim.width = 300;
            }
        );

        let provider = dataProvider.cloneWithRows(images);

        this.state = {
            dataProvider: provider
        }
    }

    render() {
        return (
            <View style={{ flex: 1 }}>
                <RecyclerListView
                    layoutProvider={this._layoutProvider}
                    dataProvider={this.state.dataProvider}
                    style={{ flex: 1 }}
                    rowRenderer={this._renderItem.bind(this)} />
            </View>
        );
    }

    _renderItem(_, item) {
        return <Image style={{ height: 300, width: 300 }} source={{ uri: item }} />
    }
}

@alexandrius Thats not a solution, but a workaround. It should just work with ScrollView, FlatList and SectionList too.

@danilobuerger Try loading 100 images with Native Android code. You will get same result.
And as I've said ScrollView, FlatList and SectionList doesn't recycle the items!
There probably was some memory optimizations done with latest Android 9. So there's good chance memory just got more constrained.
I bet you would get the same issue loaded 1000 images on Android <9.

To be 100% sure, I actually created simple Android application with the same images.
My assumptions were correct this is not React Native bug!
The code I posted above IS actual solution and not a workaround. FlatList doesn't reuse already drawn views it only unmounts them to reduce CPU overhead though views are still in memory. Loading many images in ScrollView should never be done since you don't have huge amounts of resources on phones like you have on computers.
Here's the result
https://youtu.be/XgxCzdo7H9I
Here's the source code:
package com.alexandrius.hundredimages;

import android.content.Context;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.bumptech.glide.Glide;

public class MainActivity extends AppCompatActivity {

    String[] images = {"https://d301468hdcm00e.cloudfront.net/cce71941eb82ac08759e0f0cd1052eaf_video-file.png",
            "https://d301468hdcm00e.cloudfront.net/eb037f1ffa2d70c821793962ae7f3893_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/fe61fae487d9bb1abb672e390c137f0a_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/21d59ee6577782b0f9fce2254d3fa321_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/4d316b9ea2e682b2e9d5f6dbff074fe7_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/bb17d6dd014a91d67a4c11529874b25e_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/4ea7e227c477b7c40063b16fc52c4047_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/b575f7c440732c55f785059bd428a769_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/d07949ec72a3a0351c0047b4f74420d8_thumbnail.png",
            "https://d301468hdcm00e.cloudfront.net/be68a2cd2fbe5ff4e5ccb741ec5cfb0f_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/655b99b40128f9b40e511cd0f84f097f_thumbnail.png",
            "https://d301468hdcm00e.cloudfront.net/b57edfe042a5bb8366672ffbb0783539_thumbnail.png",
            "https://d301468hdcm00e.cloudfront.net/6e65fe0fffbbfeaf700f5e067cf412dd_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/9b8edc114fd1472ef1177a19d13e6218_thumbnail.png",
            "https://d301468hdcm00e.cloudfront.net/f1b9287971cc07642329bc759b380446_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/18dc3dd9e430ba1575aebaf72307978d_thumbnail.png",
            "https://d301468hdcm00e.cloudfront.net/a0e3fff4956145b1a9b3f90ab4502a33_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/be3f5e12a86a7119d9aa3cef9e6e551f_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/e777dadd4ec4925084148635a8da84cd_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/ee143260ed53ccbf09eb1ddf9d07f241_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/fd8ee73a45d931ba11b5da5b192ec2bb_thumbnail.png",
            "https://d301468hdcm00e.cloudfront.net/bd99df637237267580b8c9034d5f557f_thumbnail.png",
            "https://d301468hdcm00e.cloudfront.net/2b4a793325ca76a72e47dcbd93697a65_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/eee1f2a2009db27c846940eb86137bb4_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/6508a56e24f9341f08dbfc4f8d22b919_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/03a02d7cfe272d807d731da00710a357_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/6a657afc87434eacc603b49de7fe5fba_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/b3edfbdf7276c3560dc3e293976986c5_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/0a7840e058b5aa96db969081284a8c05_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/761d107b61fd9fbaca4dfe11cce0d040_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/bcd109db9e652208487c8dd5df61bce0_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/26ef17691c4860096a3e5dfaf74dfd59_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/9a2775589197620fe356bdc413260eba_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/79846b9dfdd3a2d7e537b690759f3a86_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/c7acbb527984ce81145267690ed2c892_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/4cea72399d9de87ce7bbc885842bd26e_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/ff12987c6ddb0dba0b86335544e2819e_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/01dc15ddee11ddaf533b0f3b4234ab7e_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/41d223a280ee93e17204b104341e9008_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/b82bb3a8d8b80b624960cb91efa93ef3_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/4bfc2219b0d73142ca2b7157a7c6fc31_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/91dcbf268ecdca69925ecb49b8e373e6_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/7cca7994d36b31688da162fd86dc9bd5_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/2bf2e39e0c58a0b1b8a5fc2516242611_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/a7d59857fb34b56bbe13b1d5812629f0_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/27b5ecc3f96e3f2356d88071aa6c1bdd_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/620467c8d92609182361d148345c260f_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/9575cf5cf355de2e6ef2f23f02c8bae2_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/cb2eca2d89b229aff05c0ddbd866749e_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/15d3a4ddb75caa365d37938ee67b68be_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/7ec5bb3cf108c4ed7a6c4ef9011d71e2_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/872625c27acad9f54fb0143bd6a24d85_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/8b45155e982fe1dd274b2c34055b425e_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/b4ca85a41ac9437fdbb5e5e9919bc9d3_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/e67299c6d8f5a2e4236409038d067320_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/53c17bc4ef51c5a88af5b9348fbd9699_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/29c5a29d54788ce6766c79e2faf53998_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/86117df5913b17e728ae94a441163cab_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/063aace8eff8ec68ff2fa8fab1b2e350_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/b1f8e3a2d4fdf6c6e03569f56c602686_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/6b0156491539e9a72b0eccb9d80685b1_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/c162ab8b459fa9da12261e9fae5c3f80_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/985e4c4676be7c1b1d02ded514994b19_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/d2a2c462da0da55bcb26ce775ed95891_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/7333448ad4a8c98efd0e03eda924df58_thumbnail.png",
            "https://d301468hdcm00e.cloudfront.net/8b7b9894fee44b15acb8917fbb48f2eb_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/820b21733ca6091b61fa0bb9d33b9e79_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/70a09ada579de824b1c81be13c0ebdb1_thumbnail.png",
            "https://d301468hdcm00e.cloudfront.net/e14c4192198a99ac1ab39975f512e56c_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/6be306af38dde84d258801d630758fe8_thumbnail.png",
            "https://d301468hdcm00e.cloudfront.net/240af802d4e6627ceba2eb3020ed1ec9_thumbnail.png",
            "https://d301468hdcm00e.cloudfront.net/2d26f3d8b1e390d9d5682164fe2d5094_thumbnail.png",
            "https://d301468hdcm00e.cloudfront.net/b1b10ea73b6113623d62531b536246da_thumbnail.png",
            "https://d301468hdcm00e.cloudfront.net/daa8948da075ffffad40d7256e05c089_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/3d9f60626d358d68f95d1be19209fc45_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/83188ab064ef764c9a9a0cb643b9a3e7_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/c401c0bfedfe6a0b4515dea53eeb7d4c_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/3f94434a8ad72dba4156962132bafe44_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/d1488736aced7845f621443f9b2b8f0e_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/9da2b7a4987582ac4259db0c23876b17_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/7618ef478fa9bf25a56844a73b5f92c8_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/6c0e0db86d94fe1d8b8fc1e18c384042_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/54ba9807386dcb48fdef4af278bd6e87_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/2090c6b6aae9346d62dfbff8fd1ca15d_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/b9e54c60e0ef10dca356265f68f1a680_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/93579efc6b4f7b82edf74df370948e09_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/d7564e1a1c34ebb287096ad92ca0728e_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/efe1244f004cb89d4e8b7a897dbe96e6_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/34adbb23d057a8b76406f43a32b7781f_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/4f8745469c320ae20dc1075c4b2b35ba_video-thumbnail-file.jpeg",
            "https://d301468hdcm00e.cloudfront.net/05656ccec7c7fa2949fb860171fccee7_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/746d4d577fb965573d440210ce4dda13_thumbnail.png",
            "https://d301468hdcm00e.cloudfront.net/e4786fb6bca5f3d1d01c862feb94eefa_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/aa71d06f69daddd4e9bc3ca003231caf_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/6dd015aabbecbf93ea7628a63b544b94_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/1ded32bbdd5f6f371cf32ee6ae31b399_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/27caff6c79562c5160d7f44728b370cd_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/048dd65f42d6f61f69a482f7c3c9ac6e_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/d5e870a4e713d759fd436a5dbf9db925_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/7958c8af4cf94e93ca9887bef3f775cb_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/c13ec61ef5abc3bf26cea3c8197d9709_4811a3440a1c04c60ad9c5eddc7bcf8d_thumbnail.png",
            "https://d301468hdcm00e.cloudfront.net/4421bb27e3aeecf74f65f6b9269ff78d_Screen%20Shot%202018-08-29%20at%202.26.19%20PM.png",
            "https://d301468hdcm00e.cloudfront.net/40bbf507120de434fb53711998220c5c_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/2e1e0c4f7a302472cb46afb074b21e0a_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/ed25957da9549d57b924a9a792db2963_thumbnail.png",
            "https://d301468hdcm00e.cloudfront.net/dd231e317bbf38aa0425f4cf9b597f64_thumbnail.png",
            "https://d301468hdcm00e.cloudfront.net/f78e67058417c73c92534cab47131c1a_thumbnail.png",
            "https://d301468hdcm00e.cloudfront.net/342245b72d9a9bcc8b70e250c82b9919_thumbnail-file",
            "https://d301468hdcm00e.cloudfront.net/e37326aa90fbe10dc5e27df510a7f980_thumbnail-file"};

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        LinearLayout linearLayout = findViewById(R.id.content);
        int size = getResources().getDimensionPixelSize(R.dimen.size);

        for (String url : images) {
            LayoutInflater vi = (LayoutInflater) getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            View v = vi.inflate(R.layout.imageview, null);
            ImageView imageView = v.findViewById(R.id.imageview);
            linearLayout.addView(v, 0, new ViewGroup.LayoutParams(size, size));
            Glide.with(this).load(url).into(imageView);
        }
    }
}

@alexandrius Thank you very much for digging into this. For your Android project, is it working smoothly on < Android 9.0 ? If so, does it mean it is a regression on the Android system at OS level?

I haven't tried running it on <9 but I suppose yes. I don't think this is regression. Android dev team probably changed memory handling and gave preference not to crash app when low memory. I honestly don't know.
You should never load many images in ScrollView. OTOH FlatList support of view recycling would be great.  Anyway you need to use recyclerlistview or largelist.

Thank you @alexandrius , but recyclerlistview is much harder to use than ScrollView. You need to setup this provider, that provider, worry about size of things ...
Would you like to claim the reward I put up? https://www.issuereward.com/issue/db5AZ54NR9
Could you run your Java code on Android < 9 to confirm if it is a change on Android side?

Have you tried a smaller windowSize? We have Android specific config for our app to reduce all our windowSizes to something like 3. It works absolutely fine. It’s a workaround, but it does work.
Sent from my iPhone

On 25 Apr 2019, at 17:51, Gordon Sun notifications@github.com wrote:
Thank you @alexandrius , but recyclerlistview is much harder to use than ScrollView. You need to setup this provider, that provider, worry about size of things ...
Would you like to claim the reward I put up? https://www.issuereward.com/issue/db5AZ54NR9
Could you run your Java code on Android < 9 to confirm if it is a change on Android side?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@sunshineo No worries about reward. I had fun digging into the issue.
Yeah it's harder but it's single time setup so...
You can also try react-native-largelist it doesn't work with expo though.

Can confirm that windowSize={3} also fixes the issue. Scroll feels a little slower though

@alexandrius Did you run the Java Code on a device with Android < 9?

I can confirm, that this is an internal Android problem. Running the Java code provided by @alexandrius works fine on Android < 9, but lags hard on Android 9.

@johannes-scharlach I'm not trying to advocate Android but this isn't a problem at all. You should never load many images in ScrollView neither on Android nor on iOS.
Reminds me of this xkcd https://xkcd.com/1172/

@alexandrius I wonder what was happening for Android < 9 when you load many images in ScrollView. I wonder if something were overheating

@ johannes-scharlach我不是想提倡Android，但这根本不是问题。在Android和iOS上都不应该在ScrollView中加载很多图像。
让我想起这个xkcd https://xkcd.com/1172/

In some cases, you do need to put a lot of images in the ScrollView, which belong to different modules, but are not applicable to the List.
And this page belongs to the Main page of Main Tab and does not mount,
Use the Android Profiler to find that memory is always at a high value
And I found some pages after unmounted ,memory does not decrease, so the more page click memory footprint has been increased
I hope it helps

I tried using the Android Profiler, but it unfortunately crashes the app every time.
Since Android < 9 did work there has to be done something wrong with Android 9. I am trying to show a Image Gallery you can swipe through, so there is not much room for not loading many images in a ScrollView.

The same thing also happens in a virtualized FlatList and this shouldn't happen at all.

If it helps, I encountered the same problem with Flatlist and when setting removeClippedSubviews to true the scrolling becomes smooth.

@smeekmeister thanks! we tried this in our app and helped on Android 9.

I tried it on Android 9 with v0.57.10 of react-native, and it works, the FlatList could scroll normally but seems slower when pagingEnabled is set than on OS versions <9 .

still a problem

@smeekmeister  thanks! it works on Android 9.

Same issue on Android 9, react-native 0.60.5

Still, have the same issue on 0.61.2

same issue on 0.61.4

I Found resolve for the same problem after 7 hr just  using  didn't wrap flat list With scrollView
that work fine for android 9

this work for me  thank you , you saved my day

If it helps, I encountered the same problem with Flatlist and when setting removeClippedSubviews to true the scrolling becomes smooth.

Same issue, - -.
My app also depends on react-navigation. The app become slow when I open two or more stack pages that has its own FlatList or ScrollView of image items(maybe 10 - 15).

So what can i do... My app use react-navigation, it can open multiple pages and every page has the image item list.

Maybe react-native-screens is a solution with react-navigation and big list(with removeClippedSubviews prop).

If it helps, I encountered the same problem with Flatlist and when setting removeClippedSubviews to true the scrolling becomes smooth.

Worked for me!

Having many images into scrollview really causes to lag.

Open an Android emulator with Android 9.0 (Pie) installed

Somebody tested on a real device?

Not an issue. To be closed.

I use FastImage to fix this problem. but i need more solution better

Did anyone manage to fix this issue? I face this issue too on Android 10 AOSP ROM. (react-native version 0.63.4)
Just like #22925 mentions page loses momentum once the screen loses focus.
Both removeClippedSubviews prop and react-native-screens didn't work for me.

Did anyone manage to fix this issue? I face this issue too on Android 10 AOSP ROM. (react-native version 0.63.4)
Just like #22925 mentions page loses momentum once the screen loses focus.
Both removeClippedSubviews prop and react-native-screens didn't work for me.

Same problem I fixed by adding  resizeMethod={"resize"} props to image

这是来自QQ邮箱的假期自动回复邮件。

您好，我最近正在休假中，无法亲自回复您的邮件。我将在假期结束后，尽快给您回复。

authors: IsaacWIvins JohannesKlauss Mersall SageWu alexandrius chitswe danilobuerger davidcort egislook fabriziobertoglio1987 fangrm frzkn fukuball gsunsnackv hejun041 kunwarshivam mhirst mtahir08 nathanguigui nguyenduy2392 olanMbakop sagarv1997 smeekmeister sunshineo tomhicks westlakestudent wkmcyz


text:
xcode 11 js inspector

guys please someone help me I find nothing on the internet with this error. already deleted derived data and does not work CompileC
`/Users/vanixgoncalves/Library/Developer/Xcode/DerivedData/Entremasons-cvtojofshnpjljdymxtfqfjqhren/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-jsinspector.build/Objects-normal/x86_64/InspectorInterfaces.o /Users/vanixgoncalves/Desktop/Entremasons/node_modules/react-native/ReactCommon/jsinspector/InspectorInterfaces.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'React-jsinspector' from project 'Pods')
cd /Users/vanixgoncalves/Desktop/Entremasons/ios/Pods
export LANG=en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -target x86_64-apple-ios9.0-simulator -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu++14 -stdlib=libc++ -fmodules -fmodules-cache-path=/Users/vanixgoncalves/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/vanixgoncalves/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DPOD_CONFIGURATION_DEBUG=1 -DDEBUG=1 -DCOCOAPODS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -g -Wno-sign-conversion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -Wunguarded-availability -index-store-path /Users/vanixgoncalves/Library/Developer/Xcode/DerivedData/Entremasons-cvtojofshnpjljdymxtfqfjqhren/Index/DataStore -iquote /Users/vanixgoncalves/Library/Developer/Xcode/DerivedData/Entremasons-cvtojofshnpjljdymxtfqfjqhren/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-jsinspector.build/React-jsinspector-generated-files.hmap -I/Users/vanixgoncalves/Library/Developer/Xcode/DerivedData/Entremasons-cvtojofshnpjljdymxtfqfjqhren/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-jsinspector.build/React-jsinspector-own-target-headers.hmap -I/Users/vanixgoncalves/Library/Developer/Xcode/DerivedData/Entremasons-cvtojofshnpjljdymxtfqfjqhren/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-jsinspector.build/React-jsinspector-all-target-headers.hmap -iquote /Users/vanixgoncalves/Library/Developer/Xcode/DerivedData/Entremasons-cvtojofshnpjljdymxtfqfjqhren/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-jsinspector.build/React-jsinspector-project-headers.hmap -I/Users/vanixgoncalves/Library/Developer/Xcode/DerivedData/Entremasons-cvtojofshnpjljdymxtfqfjqhren/Build/Products/Debug-iphonesimulator/React-jsinspector/include -I/Users/vanixgoncalves/Desktop/Entremasons/ios/Pods/Headers/Private -I/Users/vanixgoncalves/Desktop/Entremasons/ios/Pods/Headers/Private/React-jsinspector -I/Users/vanixgoncalves/Desktop/Entremasons/ios/Pods/Headers/Public -I/Users/vanixgoncalves/Desktop/Entremasons/ios/Pods/Headers/Public/React-jsinspector -I/Users/vanixgoncalves/Library/Developer/Xcode/DerivedData/Entremasons-cvtojofshnpjljdymxtfqfjqhren/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-jsinspector.build/DerivedSources-normal/x86_64 -I/Users/vanixgoncalves/Library/Developer/Xcode/DerivedData/Entremasons-cvtojofshnpjljdymxtfqfjqhren/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-jsinspector.build/DerivedSources/x86_64 -I/Users/vanixgoncalves/Library/Developer/Xcode/DerivedData/Entremasons-cvtojofshnpjljdymxtfqfjqhren/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-jsinspector.build/DerivedSources -F/Users/vanixgoncalves/Library/Developer/Xcode/DerivedData/Entremasons-cvtojofshnpjljdymxtfqfjqhren/Build/Products/Debug-iphonesimulator/React-jsinspector -include /Users/vanixgoncalves/Desktop/Entremasons/ios/Pods/Target\ Support\ Files/React-jsinspector/React-jsinspector-prefix.pch -MMD -MT dependencies -MF /Users/vanixgoncalves/Library/Developer/Xcode/DerivedData/Entremasons-cvtojofshnpjljdymxtfqfjqhren/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-jsinspector.build/Objects-normal/x86_64/InspectorInterfaces.d --serialize-diagnostics /Users/vanixgoncalves/Library/Developer/Xcode/DerivedData/Entremasons-cvtojofshnpjljdymxtfqfjqhren/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-jsinspector.build/Objects-normal/x86_64/InspectorInterfaces.dia -c /Users/vanixgoncalves/Desktop/Entremasons/node_modules/react-native/ReactCommon/jsinspector/InspectorInterfaces.cpp -o /Users/vanixgoncalves/Library/Developer/Xcode/DerivedData/Entremasons-cvtojofshnpjljdymxtfqfjqhren/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-jsinspector.build/Objects-normal/x86_64/InspectorInterfaces.o
error: error reading '/Users/vanixgoncalves/Desktop/Entremasons/node_modules/react-native/ReactCommon/jsinspector/InspectorInterfaces.cpp'`

have the same problem any solution i get this error only when i run from xcode

yes running via terminal the project works, but by xcode it presents this error.
One previous solution that works for me is to recreate the project.
but when I turn off the computer the error comes back.
it is very strange this error

If your system is Catalina, please give XCode disk access. The easiest way is to:

Restart your computer
Open your project with Xcode
Then Product--->Archive
Then pop up the disk access in the Archive, click on the permission to come

@bashen1  not working for me

I can't find any solution to that

finally i resolved the problem you have to give xcode full disk access all toy have to do
1- open system preference
2- open security & privacy
3- click on full disk access

4- click on this to add new one and choose xcode

after that you will able to run your project from xcode this is work for me i hope it will help you

Thanks @mostafagalal94  your solution works for me

如果您的系统是Catalina，请授予XCode磁盘访问权限。最简单的方法是：

重启你的电脑
使用Xcode打开您的项目
然后产品--->存档
然后在存档中弹出磁盘访问权限，单击权限即可

真的很不错，成功的解决了这个问题，困扰我很多天了

@mostafagalal94 thank you so much! Was feeling helpless the last few weeks not being able to get my app running on my physical device (runs on simulator just fine) because of read errors of yoga files that I couldn't find any information on anywhere until I tried your suggestion. THANK YOU!!!


text:
App crashes on startup with java.lang.IllegalArgumentException: Could not convert class android.os.BinderProxy / android.os.UserHandle

Please provide all the information requested. Issues that do not follow this format are likely to stall.
Description
I'm creating a React Native chat / messenger app. In order to get the intent the app was launched with (say with a share intent), I am overriding the createReactActivityDelegate method in MainActivity.java
However, this is causing the app to crash repeatably with the following exceptions:
03-30 10:30:50.165  6977  7026 E AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
03-30 10:30:50.165  6977  7026 E AndroidRuntime: Process: com.heloprotocol.helo.app.rn.notificationtester, PID: 6977
03-30 10:30:50.165  6977  7026 E AndroidRuntime: java.lang.IllegalArgumentException: Could not convert class
03-30 10:30:50.165  6977  7026 E AndroidRuntime: 	at com.facebook.react.bridge.Arguments.fromBundle(Unknown Source:152)
03-30 10:30:50.165  6977  7026 E AndroidRuntime: 	at d.f.n.M.c(Unknown Source:40)
03-30 10:30:50.165  6977  7026 E AndroidRuntime: 	at d.f.n.M.b(Unknown Source:87)
03-30 10:30:50.165  6977  7026 E AndroidRuntime: 	at d.f.n.M.a(Unknown Source:0)
03-30 10:30:50.165  6977  7026 E AndroidRuntime: 	at d.f.n.G.run(Unknown Source:6)
03-30 10:30:50.165  6977  7026 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:794)
03-30 10:30:50.165  6977  7026 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
03-30 10:30:50.165  6977  7026 E AndroidRuntime: 	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(Unknown Source:0)
03-30 10:30:50.165  6977  7026 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:176)
03-30 10:30:50.165  6977  7026 E AndroidRuntime: 	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(Unknown Source:37)
03-30 10:30:50.165  6977  7026 E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:764)

and
03-31 12:58:53.844 29352 29396 E AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
03-31 12:58:53.844 29352 29396 E AndroidRuntime: Process: com.heloprotocol.helo.chat.app.rn.notificationtester, PID: 29352
03-31 12:58:53.844 29352 29396 E AndroidRuntime: java.lang.IllegalArgumentException: Could not convert class android.os.BinderProxy
03-31 12:58:53.844 29352 29396 E AndroidRuntime: 	at com.facebook.react.bridge.Arguments.fromBundle(Unknown Source:152)
03-31 12:58:53.844 29352 29396 E AndroidRuntime: 	at d.f.n.M.c(Unknown Source:40)
03-31 12:58:53.844 29352 29396 E AndroidRuntime: 	at d.f.n.M.b(Unknown Source:87)
03-31 12:58:53.844 29352 29396 E AndroidRuntime: 	at d.f.n.M.a(Unknown Source:0)
03-31 12:58:53.844 29352 29396 E AndroidRuntime: 	at d.f.n.G.run(Unknown Source:6)
03-31 12:58:53.844 29352 29396 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:873)
03-31 12:58:53.844 29352 29396 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
03-31 12:58:53.844 29352 29396 E AndroidRuntime: 	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(Unknown Source:0)
03-31 12:58:53.844 29352 29396 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:193)
03-31 12:58:53.844 29352 29396 E AndroidRuntime: 	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(Unknown Source:37)
03-31 12:58:53.844 29352 29396 E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:764)

I can see the following exception in debug mode:
2020-03-16 17:26:05.214 31063-31063/com.heloprotocol.helo.app.rn.notificationtester E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.heloprotocol.helo.app.rn.notificationtester, PID: 31063
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.heloprotocol.helo.app.rn.notificationtester/com.heloprotocol.helo.app.rn.notificationtester.MainActivity}: java.lang.IllegalArgumentException: Could not convert class android.net.Uri$HierarchicalUri
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3047)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3182)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1916)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6898)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
     Caused by: java.lang.IllegalArgumentException: Could not convert class android.net.Uri$HierarchicalUri
        at com.facebook.react.bridge.Arguments.fromBundle(Arguments.java:302)
        at com.facebook.react.ReactInstanceManager.attachRootViewToInstance(ReactInstanceManager.java:1063)
        at com.facebook.react.ReactInstanceManager.attachRootView(ReactInstanceManager.java:748)
        at com.facebook.react.ReactRootView.attachToReactInstanceManager(ReactRootView.java:568)
        at com.facebook.react.ReactRootView.startReactApplication(ReactRootView.java:399)
        at com.facebook.react.ReactRootView.startReactApplication(ReactRootView.java:363)
        at com.facebook.react.ReactDelegate.loadApp(ReactDelegate.java:102)
        at com.facebook.react.ReactActivityDelegate.loadApp(ReactActivityDelegate.java:88)
        at com.facebook.react.ReactActivityDelegate.onCreate(ReactActivityDelegate.java:83)
        at com.facebook.react.ReactActivity.onCreate(ReactActivity.java:44)
        at com.heloprotocol.helo.app.rn.notificationtester.MainActivity.onCreate(MainActivity.java:38)
        at android.app.Activity.performCreate(Activity.java:7149)
        at android.app.Activity.performCreate(Activity.java:7140)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1288)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3027)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3182)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1916)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6898)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
2020-03-16 17:26:05.249 31063-31458/com.heloprotocol.helo.app.rn.notificationtester D/OSTracker: OS Event: crash
2020-03-16 17:26:05.258 31063-31063/com.heloprotocol.helo.app.rn.notificationtester I/Process: Sending signal. PID: 31063 SIG: 9

React Native version:
System:
    OS: macOS High Sierra 10.13.6
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
    Memory: 30.39 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 11.13.0 - /usr/local/bin/node
    npm: 6.7.0 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
    Android SDK:
      API Levels: 23, 25, 26, 27, 28
      Build Tools: 23.0.1, 25.0.3, 26.0.2, 26.0.3, 27.0.3, 28.0.2, 28.0.3
      System Images: android-19 | ARM EABI v7a, android-27 | Google Play Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
  IDEs:
    Android Studio: 3.4 AI-183.6156.11.34.5522156
    Xcode: 10.1/10B61 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0
    react-native: 0.61.5 => 0.61.5
  npmGlobalPackages:
    create-react-native-app: 1.0.0
    react-native-ci-tools: 1.1.0
    react-native-cli: 2.0.1
    react-native-git-upgrade: 0.2.7
    react-native-rename: 2.4.1

Steps To Reproduce
MainActivity.java:
package com.heloprotocol.helo.chat.app.rn.notificationtester;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.webkit.WebView;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.bridge.WritableMap;
import com.facebook.react.modules.core.DeviceEventManagerModule;
import com.heloprotocol.helo.chat.app.rn.notificationtester.ArgumentsConverter;
import com.heloprotocol.helo.chat.app.rn.notificationtester.Util;
import io.branch.rnbranch.*;
import io.branch.rnbranch.RNBranchModule;

import java.util.ArrayList;
import java.util.List;

public class MainActivity extends ReactActivity {
    private static final String TAG = "ReactNative.MainActivity";
    private static final String SHARE_INTENT_NAME = "receivedShareIntent";
    private static final String OTP_INTENT_NAME = "receivedOtp";
    private ReactContext reactContext;
    private List<WritableMap> buffer = new ArrayList<>();

    private BroadcastReceiver broadcastReceiver =  new BroadcastReceiver() {
        @Override
        public void onReceive(Context context, Intent intent) {
            WritableMap data = ArgumentsConverter.fromBundle(intent.getExtras());
            Log.e(TAG, "newmesage: " + data);
            ReactContext reactContext = MainActivity.this.reactContext;
            if (reactContext != null) {
                reactContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit(OTP_INTENT_NAME, data);
            }
        }
    };

    @Override
    public void onNewIntent(Intent intent) {
        Log.i(TAG, "onNewIntent");
        super.onNewIntent(intent);
        setIntent(intent);
        sendIntentToJS(intent);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        Log.i(TAG, "onCreate");
        super.onCreate(savedInstanceState);
        // Enable when you want to debug webview. Super useful stuff
        WebView.setWebContentsDebuggingEnabled(false);

        getReactContext();
        registerReceiver(this.broadcastReceiver, new IntentFilter("otp-broadcast"));
    }

    @Override
    protected ReactActivityDelegate createReactActivityDelegate() {
        return new ReactActivityDelegate(this, getMainComponentName()) {
            @Override
            protected Bundle getLaunchOptions() {
                Log.i(TAG, "getLaunchOptions");
                Intent intent = MainActivity.this.getIntent();
                MainActivity.this.sendIntentToJS(intent);
                Bundle bundle = intent.getExtras();
                return bundle;
            }
        };
    }

    @Override
    protected void onStart() {
        Log.i(TAG, "onStart");
        super.onStart();
        RNBranchModule.initSession(getIntent().getData(), this);
    }

    /**
     * Returns the name of the main component registered from JavaScript. This is used to schedule
     * rendering of the component.
     */
    @Override
    protected String getMainComponentName() {
        return "helo_app_rn";
    }

    private void getReactContext() {
        ReactContext reactContext = getReactNativeHost().getReactInstanceManager().getCurrentReactContext();
        Log.i(TAG, "getReactContext: reactContext: " + reactContext);

        if (reactContext != null) {
            this.reactContext = reactContext;
            processBufferedIntents();
            return;
        }

        Log.i(TAG, "getReactContext: Didnt get reactContext, schedule for later: " + reactContext);
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                MainActivity.this.getReactContext();
            }
        }, 500);
    }

    private void sendIntentToJS(Intent intent) {
        try {
            Util.printIntent(intent);
            ReactContext reactContext = this.reactContext;
            Log.i(TAG, "sendIntentToJS: Using reactContext: " + reactContext);

            WritableMap data = Arguments.createMap();
            data.putString("package", defaultIfNull(intent.getPackage(), ""));
            data.putString("action", defaultIfNull(intent.getAction(), ""));
            data.putString("type", defaultIfNull(intent.getType(), ""));
            data.putMap("extras", ArgumentsConverter.fromBundle(intent.getExtras()));
            Log.i(TAG, "sendIntentToJS: data: " + data);

            if (reactContext != null) {
                reactContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit(SHARE_INTENT_NAME, data);
            } else {
                Log.i(TAG, "sendIntentToJS: Buffering: " + data);
                buffer.add(data);
            }
        } catch (Exception e) {
            Log.e(TAG, "sendIntentToJS: Exception in processing intent: ", e);
        }
    }

    private void processBufferedIntents() {
        Log.i(TAG, "processBufferedIntents: Got reactContext: " + this.reactContext);

        if (!buffer.isEmpty()) {
            Log.i(TAG, "processBufferedIntents: Dispatching buffered intent: " + buffer.get(0));
            this.reactContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit(SHARE_INTENT_NAME, buffer.get(0));
            buffer.clear();
        }
    }

    public static <T> T defaultIfNull(T object, T defaultValue) {
        return object == null ? defaultValue : object;
    }
}

AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.heloprotocol.helo.chat.app.rn.notificationtester">

    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="android.permission.WRITE_CONTACTS" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />

    <application android:name=".MainApplication"
                 android:label="@string/app_name"
                 android:usesCleartextTraffic="true"
                 android:icon="@mipmap/ic_launcher"
                 android:roundIcon="@mipmap/ic_launcher_round"
                 android:allowBackup="false"
                 android:theme="@style/AppTheme">

        <service android:name="io.invertase.firebase.messaging.RNFirebaseMessagingService">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT"/>
            </intent-filter>
        </service>
        <service android:name="io.invertase.firebase.messaging.RNFirebaseInstanceIdService">
            <intent-filter>
                <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
            </intent-filter>
        </service>
        <service android:name="io.invertase.firebase.messaging.RNFirebaseBackgroundMessagingService"/>
        <service android:name=".MyTaskService"/>

        <!-- Firbase -->
        <meta-data android:name="com.google.firebase.messaging.default_notification_icon"
                   android:resource="@mipmap/ic_notification_icon"/>
        <meta-data
                android:name="com.google.firebase.messaging.default_notification_color"
                android:resource="@color/pink"/>
        <meta-data
                android:name="com.google.firebase.messaging.default_notification_channel_id"
                android:value="@string/default_notification_channel_id"/>

        <activity android:name=".MainActivity"
                  android:launchMode="singleTask"
                  android:label="@string/app_name"
                  android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
                  android:windowSoftInputMode="adjustResize">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>

            <!-- Intent filters for sharing images, videos, excel, text etc. -->
            <intent-filter>
                <action android:name="android.intent.action.SEND" />
                <action android:name="android.intent.action.SEND_MULTIPLE" />
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="image/*" />
                <data android:mimeType="video/*" />
                <data android:mimeType="audio/*" />
                <data android:mimeType="text/*" />
                <data android:mimeType="text/*" />
                <data android:mimeType="application/*" />
            </intent-filter>

            <!-- Branch URI Scheme -->
            <intent-filter>
                <data android:scheme="helochat" />
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
            </intent-filter>

            <!-- Branch App Links (optional) -->
            <intent-filter android:autoVerify="true">
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="https" android:host="helochat.app.link" />
                <!-- example-alternate domain is required for App Links when the Journeys/Web SDK and Deepviews are used inside your website.  -->
                <data android:scheme="https" android:host="helochat-alternate.app.link" />
            </intent-filter>
        </activity>

        <!-- Branch init -->
        <meta-data android:name="io.branch.sdk.BranchKey" android:value="key_live_njQILwjcgib2EbORbq5zQhcprBbOuCgZ" />
        <meta-data android:name="io.branch.sdk.BranchKey.test" android:value="key_test_jeHhknSqbFdpgCL1tzSAcfjfBsnmRfWj" />
        <!-- Branch testing (TestMode "true" to simulate fresh installs on dev environment) -->
        <meta-data android:name="io.branch.sdk.TestMode" android:value="false" />

        <!-- Branch install referrer tracking -->
        <receiver android:name="io.branch.referral.InstallListener" android:exported="true">
            <intent-filter>
                <action android:name="com.android.vending.INSTALL_REFERRER" />
            </intent-filter>
        </receiver>

        <!-- SMS verification api receiver -->
        <receiver android:name="com.heloprotocol.helo.receiver.MySMSBroadcastReceiver" android:exported="true"
                  android:permission="com.google.android.gms.auth.api.phone.permission.SEND">
            <intent-filter>
                <action android:name="com.google.android.gms.auth.api.phone.SMS_RETRIEVED" />
            </intent-filter>
        </receiver>

        <activity android:name="com.facebook.react.devsupport.DevSettingsActivity"/>

        <!-- Pushy Declarations -->
        <!-- Pushy Notification Receiver -->
        <!-- Do not modify - internal BroadcastReceiver that forwards notifications to the internal notification service-->
        <receiver android:name="me.pushy.sdk.react.receivers.PushReceiver" android:exported="false">
            <intent-filter>
                <!-- Do not modify this -->
                <action android:name="pushy.me"/>
            </intent-filter>
        </receiver>

        <!-- Pushy Update Receiver -->
        <!-- Do not modify - internal BroadcastReceiver that restarts the listener service -->
        <receiver android:name="me.pushy.sdk.receivers.PushyUpdateReceiver" android:exported="false">
            <intent-filter>
                <action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
            </intent-filter>
        </receiver>

        <!-- Pushy Boot Receiver -->
        <!-- Do not modify - internal BroadcastReceiver that restarts the listener service -->
        <receiver android:name="me.pushy.sdk.receivers.PushyBootReceiver" android:exported="false">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED"/>
            </intent-filter>
        </receiver>

        <!-- Pushy Socket Service -->
        <!-- Do not modify - internal service -->
        <service android:name="me.pushy.sdk.services.PushySocketService"/>

        <!-- Pushy Job Service (added in Pushy SDK 1.0.35) -->
        <!-- Do not modify - internal service -->
        <service android:name="me.pushy.sdk.services.PushyJobService"
                 android:permission="android.permission.BIND_JOB_SERVICE"
                 android:exported="true"/>
        <!-- End Pushy Declarations -->

        <!-- File provider -->
        <provider android:name="androidx.core.content.FileProvider"
                  android:authorities="com.heloprotocol.helo.chat.app.rn.notificationtester.provider"
                  android:exported="false"
                  android:grantUriPermissions="true">
            <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/provider_paths" />
        </provider>
    </application>

</manifest>

Expected Results
Expectation is for the app to not crash.
Snack, code example, screenshot, or link to a repository:
https://github.com/gagangoku/helo-app-rn/tree/reproduce

Hi! I am facing the same issue, but in my case when deploying in a Xiaomi device. Have you found any solution so far?

I have found a quick work arround but I think this is not a workful solution.
in initialProps provided by the ActivityDelegate comes a property with key "prpfile"
key: "profile" value: "UserHandle{0}" (toString() output)
if you remove this prop from the bundle the app will start properly.

I'm surprised more people are not facing this issue. I forked React Native to fix it : https://github.com/gagangoku/react-native

I have found a quick work arround but I think this is not a workful solution.
in initialProps provided by the ActivityDelegate comes a property with key "prpfile"
key: "profile" value: "UserHandle{0}" (toString() output)
if you remove this prop from the bundle the app will start properly.

can you please give exact steps for this fix?

该问题如何处理？

this crash reason:
https://github.com/react-native-community/react-native-camera/pull/1835

authors: cyzaoj gagangoku jagnesh martppa


text:
[RN 0.64 - iOS] Cannot call Websocket close() with custom code

Description
When calling ws.close() with a custom code (e.g. ws.close(4000)), the close code passed to ws.onclose would always be 1001. (On Android, I would successfully get 4000).
React Native version:
react: 17.0.1
react-native: 0.64.0 (was happening with 0.63.2 as well)
Steps To Reproduce

Connect to a ws endpoint.
Call ws.close(4000)
Check e.code inside ws.onclose = (e) => {};

Expected Results
I should get 4000 on iOS (like it is currently the case with Android).

Closing as this version of React Native is several years old. Please re-open a new issue against the latest stable if the issue persists


text:
Android Release Build Crash Fatal libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 12702 (mqt_js)

Release build crashes on starting the app with the following error log, works well without a crash in the debug mode.
libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 13856 (mqt_js)
Package.json
android/app/build.gradle
android/build.gradle
gradle-wrapper.properties
React Native version: 0.64.2
React Native Info
System:
OS: macOS 11.5
CPU: (4) x64 Intel(R) Core(TM) i7-5557U CPU @ 3.10GHz
Memory: 51.27 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.10.0 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.7.0 - /usr/local/bin/npm
Watchman: 4.6.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.8.4 - /Users/II/.rvm/gems/ruby-2.4.0/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
Android SDK:
API Levels: 23, 24, 25, 26, 27, 28, 29
Build Tools: 23.0.1, 23.0.3, 25.0.0, 25.0.2, 25.0.3, 26.0.0, 26.0.0, 26.0.1, 26.0.2, 26.0.3, 27.0.2, 27.0.3, 28.0.0, 28.0.1, 28.0.2, 28.0.3, 29.0.3, 30.0.2
System Images: android-23 | Intel x86 Atom, android-23 | Intel x86 Atom_64, android-27 | Android TV Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Android TV Intel x86
Atom, android-28 | Wear OS Intel x86 Atom, 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 NDK: 18.1.5063045
IDEs:
Android Studio: 2.3 AI-162.4069837
Xcode: 12.5/12E262 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_222 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: ^17.0.2 => 17.0.2
react-native: ^0.64.2 => 0.64.2
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.

rm android/app/src/main/assets/index.android.bundle
react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
abuild --variant=release
Crashes on the app start.

Expected Results
Should either throw a proper error why the issue happens even in the debug mode or should work without crashing.

Can someone please help? @shergin @mdvacca @JoshuaGross @RSNara @hramos

any update on this @roots-ai  ??

any update on this @roots-ai ??

Upgrading the entire package.json resolved that issue, but this new issue came up https://github.com/facebook/react-native/issues/32250


text:
[iOS] [MapView] Support for toggling POI visibility?

Are there any plans for adding the ability to toggle the visibility of POI in the iOS map view?

Would a PR be entertained for this?

@facebook-github-bot close


text:
Use ReactFragment to load the RN page in the two Activities (A, B)

Description
I try to load the RN page with ReactFragment in two Activities (A, B)
When the first Activity (A) is successfully loaded, the DeviceEventManagerModule.emit() method is called to pass parameters to RN, and it can be sent normally.
When the second Activity (B) is successfully used to load the RN page with ReactFragment, Activity (B) can also send normally by calling the DeviceEventManagerModule.emit() method
But when I close Activity(B), Activity(A) cannot pass parameters to RN through DeviceEventManagerModule.emit(), no response!
Has any friend encountered this difficult problem?
Version
0.63.3
Output of npx react-native info
none
Steps to reproduce
I try to load the RN page with ReactFragment in two Activities (A, B)
When the first Activity (A) is successfully loaded, the DeviceEventManagerModule.emit() method is called to pass parameters to RN, and it can be sent normally.
When the second Activity (B) is successfully used to load the RN page with ReactFragment, Activity (B) can also send normally by calling the DeviceEventManagerModule.emit() method
But when I close Activity(B), Activity(A) cannot pass parameters to RN through DeviceEventManagerModule.emit(), no response!
Has any friend encountered this difficult problem?
Snack, code example, screenshot, or link to a repository
I try to load the RN page with ReactFragment in two Activities (A, B)
When the first Activity (A) is successfully loaded, the DeviceEventManagerModule.emit() method is called to pass parameters to RN, and it can be sent normally.
When the second Activity (B) is successfully used to load the RN page with ReactFragment, Activity (B) can also send normally by calling the DeviceEventManagerModule.emit() method
But when I close Activity(B), Activity(A) cannot pass parameters to RN through DeviceEventManagerModule.emit(), no response!
Has any friend encountered this difficult problem?

I need help


text:
Android 13: PermissionsAndroid not showing android.permission.POST_NOTIFICATIONS

Description
In the latest version of PermissionsAndroid it is stated that latest android permission for android push notifications is available but latest react native version 0.70.1 still not contain this permission.
This permission is important to be released because android 13 requires this permission for push notifications now and it is available in code base but not released yet.
Version
0.70.1
Output of npx react-native info
System:
OS: macOS 12.6
CPU: (8) x64 Apple M1
Memory: 24.18 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 14.18.1 - ~/.nvm/versions/node/v14.18.1/bin/node
Yarn: 1.22.18 - /opt/homebrew/bin/yarn
npm: 6.14.15 - ~/.nvm/versions/node/v14.18.1/bin/npm
Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8512546
Xcode: 14.0/14A309 - /usr/bin/xcodebuild
Languages:
Java: javac 15 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: 0.70.1 => 0.70.1
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce

Create a new project
see the latest version of react native in packages.json it should be 0.70.1
Follow steps here to trigger android permission

Snack, code example, screenshot, or link to a repository
Guide for triggering android permissions
https://reactnative.dev/docs/permissionsandroid

In the latest version of PermissionsAndroid it is stated that latest android permission for android push notifications is available but latest react native version 0.70.1 still not contain this permission.

Are you using the TypeScript template?
If so, can you yarn list @types/react-native and make sure you're using the latest types for React Native? I believe your issue might be related to using the 0.69 types on a 0.70 project.

I have created a new project with version 0.70.1 to test it but type was still missing which is being shown here

Can you run the command I suggested and post the output? Thanks

Are you using the TypeScript template?
If so, can you share your NotifPermissionPOC project so we can take a look at it?

I have created a new project with version 0.70.1 to test it but type was still missing which is being shown here

This file has been merged yesterday on main so you won't be using it till we release a new version of React Native (0.71.x).

same issue always getting never_ask_again and also android not showing the popup to ask permission react-native:0.71.2 android target and compile sdk: 33

If you're working on one of the latest version of React Native it seems the problem got fixed on 0.70.7.
For the rest of the unlucky mortals there is a workaround fortunately...
In order to fix this I had to create a patch using patch-package along with postinstall and update my current PermissionAndroid files to support in my case POST_NOTIFICATIONS given I'm using react-native 0.64.4.
So I went ahead and updated these 2 files as detailed below:

/node_modules/react-native/Libraries/PermissionsAndroid/NativePermissionsAndroid.js

...
| 'android.permission.RECEIVE_WAP_PUSH'
| 'android.permission.RECEIVE_MMS'
| 'android.permission.WRITE_EXTERNAL_STORAGE'; <- removed this and
| 'android.permission.WRITE_EXTERNAL_STORAGE' <- added these 2
| 'android.permission.POST_NOTIFICATIONS';
...

/node_modules/react-native/Libraries/PermissionsAndroid/PermissionsAndroid.js

...
RECEIVE_MMS: 'android.permission.RECEIVE_MMS',
READ_EXTERNAL_STORAGE: 'android.permission.READ_EXTERNAL_STORAGE',
WRITE_EXTERNAL_STORAGE: 'android.permission.WRITE_EXTERNAL_STORAGE',
POST_NOTIFICATIONS: 'android.permission.POST_NOTIFICATIONS', <- added this
...
WRITE_CALL_LOG: string,
WRITE_CONTACTS: string,
WRITE_EXTERNAL_STORAGE: string,
POST_NOTIFICATIONS: string, <- added this
....

After this change the PermissionsAndroid module from react-native started to work again as expected without getting any permission is null error.
BTW also don't forget to include the respective permission on the AndroidManifest, in my case was:
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
Finally be sure to set the compileSdkVersion and the targetSdkVersion to 33 and the buildToolsVersion to 33.0.0 for the permission prompt to show up...

If you're working on one of the latest version of React Native it seems the problem got fixed on 0.70.7.
For the rest of the unlucky mortals there is a workaround fortunately...

Closing as this has been merged in main and released 👍

If you're working on one of the latest version of React Native it seems the problem got fixed on 0.70.7. For the rest of the unlucky mortals there is a workaround fortunately...
In order to fix this I had to create a patch using patch-package along with postinstall and update my current PermissionAndroid files to support in my case POST_NOTIFICATIONS given I'm using react-native 0.64.4. So I went ahead and updated these 2 files as detailed below:

/node_modules/react-native/Libraries/PermissionsAndroid/NativePermissionsAndroid.js

...
| 'android.permission.RECEIVE_WAP_PUSH'
| 'android.permission.RECEIVE_MMS'
| 'android.permission.WRITE_EXTERNAL_STORAGE'; <- removed this and
| 'android.permission.WRITE_EXTERNAL_STORAGE' <- added these 2
| 'android.permission.POST_NOTIFICATIONS';
...

/node_modules/react-native/Libraries/PermissionsAndroid/PermissionsAndroid.js

...
RECEIVE_MMS: 'android.permission.RECEIVE_MMS',
READ_EXTERNAL_STORAGE: 'android.permission.READ_EXTERNAL_STORAGE',
WRITE_EXTERNAL_STORAGE: 'android.permission.WRITE_EXTERNAL_STORAGE',
POST_NOTIFICATIONS: 'android.permission.POST_NOTIFICATIONS', <- added this
...
WRITE_CALL_LOG: string,
WRITE_CONTACTS: string,
WRITE_EXTERNAL_STORAGE: string,
POST_NOTIFICATIONS: string, <- added this
....

After this change the PermissionsAndroid module from react-native started to work again as expected without getting any permission is null error.
BTW also don't forget to include the respective permission on the AndroidManifest, in my case was: <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
Finally be sure to set the compileSdkVersion and the targetSdkVersion to 33 for the permission prompt to show up...

Thank you, it's working for me. Could you also provide the patch files? I'm not familiar with creating patch files.

If you're working on one of the latest version of React Native it seems the problem got fixed on 0.70.7. For the rest of the unlucky mortals there is a workaround fortunately...
In order to fix this I had to create a patch using patch-package along with postinstall and update my current PermissionAndroid files to support in my case POST_NOTIFICATIONS given I'm using react-native 0.64.4. So I went ahead and updated these 2 files as detailed below:

/node_modules/react-native/Libraries/PermissionsAndroid/NativePermissionsAndroid.js

...
| 'android.permission.RECEIVE_WAP_PUSH'
| 'android.permission.RECEIVE_MMS'
| 'android.permission.WRITE_EXTERNAL_STORAGE'; <- removed this and
| 'android.permission.WRITE_EXTERNAL_STORAGE' <- added these 2
| 'android.permission.POST_NOTIFICATIONS';
...

/node_modules/react-native/Libraries/PermissionsAndroid/PermissionsAndroid.js

...
RECEIVE_MMS: 'android.permission.RECEIVE_MMS',
READ_EXTERNAL_STORAGE: 'android.permission.READ_EXTERNAL_STORAGE',
WRITE_EXTERNAL_STORAGE: 'android.permission.WRITE_EXTERNAL_STORAGE',
POST_NOTIFICATIONS: 'android.permission.POST_NOTIFICATIONS', <- added this
...
WRITE_CALL_LOG: string,
WRITE_CONTACTS: string,
WRITE_EXTERNAL_STORAGE: string,
POST_NOTIFICATIONS: string, <- added this
....

After this change the PermissionsAndroid module from react-native started to work again as expected without getting any permission is null error.
BTW also don't forget to include the respective permission on the AndroidManifest, in my case was: <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
Finally be sure to set the compileSdkVersion and the targetSdkVersion to 33 for the permission prompt to show up...

Thank you, it's working for me. Could you also provide the patch files? I'm not familiar with creating patch files.

This solution is work for me.  I'm using react-native ^0.67.5  thanks little programmer hero

Its worked for me only in debug mode but dont worked in release mode