Skip to content
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

New architecture support (status: v9.1.2 should work, headlessJS needs general upstream fix in react-native) #1077

Open
1 of 4 tasks
elsa17z opened this issue Aug 8, 2024 Discussed in #795 · 21 comments
Open
1 of 4 tasks
Labels
Help: Good First Issue If you want to help out, try these issues help wanted Keep Open this label avoids the stale bot

Comments

@elsa17z
Copy link

elsa17z commented Aug 8, 2024

Discussed in #795

Originally posted by ravindraguptacapgemini June 13, 2023
Need to know if library support new architecture of React Native with Fabric and Turbo Module.

Currently this module will not work with react-native in new architecture mode, bridgeless or otherwise.

The first step is to get it working in bridgeless mode at minimum. These issues block that:

Update status here when complete: https://reactnative.directory/?search=%40notifee%2Freact-native

This comment was marked as outdated.

@elsa17z

This comment was marked as outdated.

@radko93

This comment was marked as outdated.

@blumk

This comment was marked as duplicate.

@mikehardy

This comment was marked as outdated.

@mikehardy
Copy link
Contributor

Just chatted with the ever-benevolent (I mean that!) overlords @ Invertase and I can check this repo for RN76 compat, so I'll have a go myself but I will always welcome information + help + advice from anyone else so please chime in if you are reading this and you're looking at it too. Hopefully it's easy!

This comment was marked as outdated.

@mikehardy

This comment was marked as resolved.

@mikehardy mikehardy added Keep Open this label avoids the stale bot and removed Type: Stale labels Oct 14, 2024
@mikehardy

This comment was marked as resolved.

@mikehardy mikehardy changed the title New architecture support? New architecture support tracking issue Oct 18, 2024
@mikehardy

This comment was marked as resolved.

@Rexogamer

This comment was marked as resolved.

@mikehardy

This comment was marked as resolved.

@mikehardy mikehardy changed the title New architecture support tracking issue New architecture support (status: v9.1.2 should work, headlessJS needs general upstream fix in react-native) Oct 20, 2024
@mikehardy mikehardy pinned this issue Oct 20, 2024
@mikehardy
Copy link
Contributor

This is supposed to be fixed in react-native 0.76.1, it needs a retest to see if background handling works again with new architecture. It may take me some time to get a suitable reproduction environment set up and I would welcome anyone to post success or failure on 0.76.1 if they are able to test this before I get to it.

@mikehardy mikehardy added help wanted Help: Good First Issue If you want to help out, try these issues labels Oct 30, 2024
@netdown
Copy link

netdown commented Oct 30, 2024

I've just upgraded to 0.76.1 and foreground service does not work with new arch. It works while the app is opened, but gets stuck if I close it. No error messages, I haven't digged it up.

@mikehardy
Copy link
Contributor

That's surprising! That's worse than I was hoping to hear 😆 . I want to put a sad face or a thumbs-down reaction on your comment but it's the content, not for you as a messenger of course @netdown.

Were you able to test if headlessJS works? As that is a separate issue from foreground service

I'll add foreground service testing to the status list above.

@netdown
Copy link

netdown commented Oct 30, 2024

I use foreground service only.

@InSaine2k13
Copy link

Same issue @netdown my foreground service freezes completely on new architecture once the app is out of focus

@lovegaoshi
Copy link

lovegaoshi commented Nov 5, 2024

at RNTP which also uses headlessJsTaskService, I believe my issue has the same root to what you have. my patch seems to work when app is minimized and/or resumed, but now I'm noticing the Js code executed on event listening does not complete fetch requests. I'm opening an issue in the discussion group in case anyone is interested.


i have a better understanding of the issue i had - setTimeout will cause problems when app is minimized and resumed, as clearFrameCallback will only be called when there is no active headlessJsTask, and setTimeout lingering will simply fail after onHostResume it seems like. I have no idea why it worked with the old arch. and if I apply my "patch", all setTimeout will stop to function when app is minimized. Since whatwg-fetch uses a setTimeout with xhr.onLoad, it "breaks."

@mikehardy
Copy link
Contributor

@lovegaoshi definitely interested and I read through the related information from RNTP with great interest earlier, I appreciate the cross-posting an the work you've put in to making headlessJS work on Fabric so far! Hopefully we all get through this in once piece 😆

@netdown
Copy link

netdown commented Nov 16, 2024

@mikehardy Foreground service seems to be fine in 0.76.2! Probably fixed by facebook/react-native@ee7b4e2

@mikehardy
Copy link
Contributor

Fantastic news! Now we just need background messages to work correctly per the latest one facebook/react-native#47570

We're getting there, bit by bit...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help: Good First Issue If you want to help out, try these issues help wanted Keep Open this label avoids the stale bot
Projects
None yet
Development

No branches or pull requests

8 participants