Comments (11)
@cortinico can confirm that I have run into this. I meant to reach out about it but I wanted to investigate myself first as it doesn't repro reliably and I'm not sure of the cause
from react-native.
Missing Reproducible Example | |
---|---|
ℹ️ | We could not detect a reproducible example in your issue report. Please provide either:
|
from react-native.
@NiuGuohui Just to confirm, you're on New Architecture right?
from react-native.
@NiuGuohui Just to confirm, you're on New Architecture right?
I tried again. Now AppState seems to be working properly. But I found that this error still occurs when enable bridgeless, and after disabled bridgeless, it no longer reports an error.
from react-native.
@cortinico can confirm that I have run into this. I meant to reach out about it but I wanted to investigate myself first as it doesn't repro reliably and I'm not sure of the cause
Great thanks for confirming it 👍
from react-native.
@alanjhughes @NiuGuohui can we isolate what's the problem here?
I've tried to reproduce, and yes, the:
Unhandled SoftException
com.facebook.react.bridge.ReactNoCrashSoftException: Tried to access onWindowFocusChange while context is not ready
gets fired but that's unrelated. I was able to successfully use the AppState
API with the provided reproducer.
repro.mov
from react-native.
@alanjhughes @NiuGuohui can we isolate what's the problem here?
I've tried to reproduce, and yes, the:
Unhandled SoftException com.facebook.react.bridge.ReactNoCrashSoftException: Tried to access onWindowFocusChange while context is not ready
gets fired but that's unrelated. I was able to successfully use the
AppState
API with the provided reproducer.repro.mov
I think AppState
works fine now.
But the error still occurred.
I tried to open ReactHostImpl.class (the built-in decompilation tool in Android Studio) and noticed that it seems not quite consistent with the code in the repository. I'm not sure if this decompiled code is reliable for reference.
This is my decompiled ReactHostImpl.class content:
@ThreadConfined("UI")
public void onWindowFocusChange(boolean hasFocus) {
String method = "onWindowFocusChange(hasFocus = \"" + hasFocus + "\")";
this.log(method);
ReactContext currentContext = this.getCurrentReactContext();
if (currentContext != null) {
currentContext.onWindowFocusChange(hasFocus);
}
ReactSoftExceptionLogger.logSoftException("ReactHost", new ReactNoCrashSoftException("Tried to access onWindowFocusChange while context is not ready"));
}
from react-native.
I tried to open ReactHostImpl.class (the built-in decompilation tool in Android Studio) and noticed that it seems not quite consistent with the code in the repository. I'm not sure if this decompiled code is reliable for reference.
That's because you're looking at the class in main
while you should be looking at the same class on the 0.74-stable branch:
@alanjhughes what was the error you were facing?
from react-native.
@cortinico its this error but it's only happening on app launch and not every time. Kudo reproduced in a RN project without expo. I'll speak to him today and see if he found a reliable way to reproduce.
from react-native.
I tried to open ReactHostImpl.class (the built-in decompilation tool in Android Studio) and noticed that it seems not quite consistent with the code in the repository. I'm not sure if this decompiled code is reliable for reference.
That's because you're looking at the class in
main
while you should be looking at the same class on the 0.74-stable branch:
So, should an else
or return
statement be added to line 664 in 0.74-stable ReactHostImpl.java?
from react-native.
I tried to open ReactHostImpl.class (the built-in decompilation tool in Android Studio) and noticed that it seems not quite consistent with the code in the repository. I'm not sure if this decompiled code is reliable for reference.
That's because you're looking at the class in
main
while you should be looking at the same class on the 0.74-stable branch:
0.74-stable
/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.javaSo, should an
else
orreturn
statement be added to line 664 in 0.74-stable ReactHostImpl.java?
We could pick ac3261f on the 0.74 release branch that would solve this
from react-native.
Related Issues (20)
- libgojni.so MTE crash (memory unsafe code) HOT 5
- couldn't find DSO to load: libhermes.so SoSource 0: com.facebook.soloader.ApkSoSource HOT 3
- App State 0.74 in DEVELOPMENT HOT 5
- I compare 0.72.5 and 0.74.0 react native android app size,0.74.0 is 50MB,And 0.72.5 is 21.7 MB.How to reduce 0.74.0 android app size? HOT 14
- WebSocket on android works slower than on ios HOT 1
- @react-native/typescript-config causes type check error for dependencies HOT 1
- CellRendererComponent with onViewableItemsChanged HOT 3
- Can't display Image with source as required() HOT 10
- iOS 17使用调试本地资源,调用网络请求就会闪退,非调试功能下正常 HOT 2
- 'React/JSCExecutorFactory.h' file not found HOT 2
- 'yoga/Yoga.h' file not found HOT 2
- npm can't find tesseract-ocr HOT 3
- Build failed with an exception HOT 2
- Project initialization hangs HOT 1
- React Native requires XCode >= 14.3. Found 14.2 HOT 10
- [0.74] npx react-native init should warn users but it's currently not HOT 2
- Priavacy Policy aggregation errors on empty dict HOT 9
- UI get Rerender on keyboard dismiss and background color changes in Android on React native V 0.72.12 HOT 3
- [0.74.0] Missing concurrentRoot in initialProps on android new architecture HOT 2
- Failure of pod install for the React Native project using Yarn Berry - Yarn 3.x or 4.x. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native.