-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix broken events in Bridgeless mode (React Native New Architecture) #2370
base: main
Are you sure you want to change the base?
Conversation
I have test this patch with new arch react native 0.75.3. But i got this kotlin error : |
This probably is caused by the fact that the old RN is used (RN patch was not applied or it was not built from source) |
Thanks for your reply, and how can i fix that ? My steps :
|
Yes the only file i not have the same as you is settings.gradle (i have the default one). If add your modifications, i have an other error : `Could not determine the dependencies of task ':react-native:packages:react-native:ReactAndroid:hermes-engine:configureBuildForHermes'.
|
so u r having compilation issues. if u dont add that in, ie. https://reactnative.dev/contributing/how-to-build-from-source, ur not compiling RN and not applying any changes. this is outside the scope of this PR and u should seek help in the general RN community. |
Now that 0.76 has been released, should we pick up again on this PR? Ref. #2290 |
with 0.76.1 released these prs can finally be tested. for the lazy folks my example is now upgraded to newarch + 0.76.1. |
in new architecture the app crashes while setupPlayer so will this PR covered that issue as well? |
like i said my example app runs. so presumably yes.
…On Thu, Oct 31, 2024, 11:59 AM Syed Shoaib Ali ***@***.***> wrote:
Now that 0.76 has been released, should we pick up again on this PR?
Ref. #2290
<#2290>
in new architecture the app crashes while setupPlayer so will this PR
covered that issue as well?
—
Reply to this email directly, view it on GitHub
<#2370 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZMOVVTUY5Q3D56O6YSFBJ3Z6J4XXAVCNFSM6AAAAABOFEDBAGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJQGYYTIOJVHA>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Merge that for god sake! |
I patched this along w/ the required other changes (from 1st comment), and I'm seeing NPEs on Some context:
My thoughts:
|
thats an interesting report. i actually use the null safe call myself. I do see from time to time that event emitting becomes unresponsive until the Activity is brought back to the foreground, which explains the reactContext loss and could have the same root as ur report. Though I then deemed the newarch to be unusable and didnt pursue further. Id start from headlessJsTaskService's getReactContext and find out the status of the reactHost and reactContext (u do need to build ur own RN for this). With the difficulty to reproduce this I wouldnt have high hope though. |
@mihaibulic2 apologies for the ping, did you perhaps see with new arch android the app becomes unresponsive (from being frozen for several seconds, to a whilte screen) when the app is left running at the background for a long period of time (5+ minutes)? I found the longer I left it, the longer it froze/shows a whit screen of death instead. I'm suspecting its my app's issue and about to test the example app, but also curious to see if this is somethign cmmon. also i dumped more time to testing my android new arch app since react 19 is likely to dump old arch for good, and i'm actually yet to see the js events not being responsive. every event emitted via the notification panel works, despite the view actually crashes out. |
I haven't gotten any reports of that (so far I've had ~100k user sessions
in prod across Android and iOS on the new arch)
… Message ID:
***@***.***
com>
|
thx for the reply! i indeed could not reproduce with the example app. back to the grind. I narrowed down to anything using useProgress for anyone interested. My current hypothesis and experiments point to useProgress updating states even when the app is in background, causing a lag in state updates when the app is resumed in the new architecture. a simple if app is background check in useProgress will solve this issue |
Thanks, I did my local changes and it's now working on my one |
This PR fixes broken event emitting in React Native new architecture.
EDIT: This is breaking change, and mostly acts as a preview. I will try to come up with a solution for it if time allows.
This is a partial solution, and requires: