facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
119.39k stars 24.36k forks source link

bugs: Attempt to invoke virtual method 'void com.facebook.react.uimanager.UlManagerModule.onBatchComplete()' on a null object reference #47662

Open Chasen-Zhang opened 4 days ago

Chasen-Zhang commented 4 days ago

Description


import React from 'react';

import {StyleSheet, TextInput} from 'react-native';

function App(): React.JSX.Element {
  return <TextInput inputMode="text" style={styles.input} />;
}
const styles = StyleSheet.create({
  input: {
    flex: 1,
    height: 40,
    borderWidth: 1,
    borderColor: '#ddd',
    borderRadius: 8,
    paddingHorizontal: 8,
    marginHorizontal: 10,
  },
});

export default App;

Steps to reproduce

When TextInput appear, focus it, and then errors. image

React Native Version

0.73.2

adnroid

14

Affected Platforms

Runtime - Android

Output of npx react-native info

0 verbose cli /Users/chasen/.nvm/versions/node/v22.3.0/bin/node /Users/chasen/.nvm/versions/node/v22.3.0/lib/node_modules/npm/bin/npm-cli.js
1 info using npm@10.8.1
2 info using node@v22.3.0
3 silly config load:file:/Users/chasen/.nvm/versions/node/v22.3.0/lib/node_modules/npm/npmrc
4 silly config load:file:/Users/chasen/wangmin/xiangqu/.npmrc
5 silly config load:file:/Users/chasen/.npmrc
6 silly config load:file:/Users/chasen/.nvm/versions/node/v22.3.0/etc/npmrc
7 verbose title npm exec react info
8 verbose argv "exec" "--" "react" "info"
9 verbose logfile logs-max:10 dir:/Users/chasen/.npm/_logs/2024-11-18T12_07_41_756Z-
10 verbose logfile /Users/chasen/.npm/_logs/2024-11-18T12_07_41_756Z-debug-0.log
11 silly logfile start cleaning logs, removing 2 files
12 silly packumentCache heap:4345298944 maxSize:1086324736 maxEntrySize:543162368
13 silly logfile done cleaning log files
14 verbose shrinkwrap failed to load node_modules/.package-lock.json missing from lockfile: node_modules/rn-placeholder
15 verbose stack Error: could not determine executable to run
15 verbose stack     at getBinFromManifest (/Users/chasen/.nvm/versions/node/v22.3.0/lib/node_modules/npm/node_modules/libnpmexec/lib/get-bin-from-manifest.js:17:23)
15 verbose stack     at exec (/Users/chasen/.nvm/versions/node/v22.3.0/lib/node_modules/npm/node_modules/libnpmexec/lib/index.js:198:15)
15 verbose stack     at async Npm.exec (/Users/chasen/.nvm/versions/node/v22.3.0/lib/node_modules/npm/lib/npm.js:207:9)
15 verbose stack     at async module.exports (/Users/chasen/.nvm/versions/node/v22.3.0/lib/node_modules/npm/lib/cli/entry.js:74:5)
16 verbose pkgid react@18.3.1
17 error could not determine executable to run
18 verbose cwd /Users/chasen/wangmin/xiangqu
19 verbose os Darwin 23.6.0
20 verbose node v22.3.0
21 verbose npm  v10.8.1
22 verbose exit 1
23 verbose code 1
24 error A complete log of this run can be found in: /Users/chasen/.npm/_logs/2024-11-18T12_07_41_756Z-debug-0.log

Stacktrace or Logs

Attempt to invoke virtual method 'voidcom.facebook.react.uimanager.UlManagerModule.onBatchComplete()' on a nullobject reference
run
RuntimeUtils.java:12
handleCallback
Handler.java:958
dispatchMessage
Handler.java:99
dispatchMessage
MessageQueueThreadHandler.java:27
loopOnce
Looperjava:257
loop
Looper.java:368
lambda$startNewBackgroundThread$2
MessageQueueThreadlmpl.java:217
run
D8$$SyntheticClass
run
Thread.java:1012

Reproducer

https://snack.expo.dev/WxSzNT5G5M9ff3hqMHZ35

Screenshots and Videos

image

react-native-bot commented 4 days ago

[!WARNING] Unsupported version: It looks like your issue or the example you provided uses an unsupported version of React Native.

Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.

react-native-bot commented 4 days ago

[!WARNING] Missing reproducer: We could not detect a reproducible example in your issue report. Please provide either:

react-native-bot commented 4 days ago

[!WARNING] Unsupported version: It looks like your issue or the example you provided uses an unsupported version of React Native.

Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.