Skip to content

Conversation

@gosha212
Copy link
Contributor

@gosha212 gosha212 commented Oct 8, 2025

Description

In this pull request, I have fixed detox to support RN 81


For features/enhancements:

  • I have added/updated the relevant references in the documentation files.

For API changes:

  • I have made the necessary changes in the types index file.

@gosha212 gosha212 requested a review from asafkorem as a code owner October 8, 2025 18:21
@gosha212 gosha212 mentioned this pull request Oct 9, 2025
2 tasks
@Baer05
Copy link

Baer05 commented Oct 14, 2025

Hi, what is the current status on this? When can we expect a new version that supports React Native 0.81.4?

@gosha212
Copy link
Contributor Author

@Baer05 i will creat a preview right now still have problems with a few tests

@jawadkhan653
Copy link

Hi,

Could you please share an update on when this PR (#4847) is expected to be merged?
We’re currently blocked by the NativeWorklets / NullPointerException issue when running Detox with React Native, and it seems this PR addresses it.

Appreciate your time and effort on this — having a timeline or status update would really help us plan our next steps. 🙏

@noomorph
Copy link
Collaborator

@gosha212 , what do you say if we release some smoke, next, preview tag?

@gosha212
Copy link
Contributor Author

Please check the latest @alpha version 20.44.x

@cleathley
Copy link

cleathley commented Oct 15, 2025

I've just tested it on my app (RN .82.0 so a little newer than .81.x) and can confirm that it now launches my app and tests are running (this is a new install as I've only just started using detox on this app)

Before it would come up with a refelection error (this is not the case anymore)

@Thread main(2):
    org.joor.ReflectException: org.joor.ReflectException: java.lang.NoSuchFieldException: mViewCommandMountItems
    	at org.joor.Reflect.field(Reflect.java:294)

on a side note for others with the newer build process, if you are going down the releaseE2E route (to keep the production release as pro-guarded as possible) you may need to add

manifestPlaceholders = [usesCleartextTraffic: "true"]

to app\build.gradle under buildTypes { releaseE2E { ... } }

@mduchev
Copy link

mduchev commented Oct 15, 2025

Same on my end. I can also confirm that I'm getting the java.lang.NoSuchFieldException: mViewCommandMountItems error.

@gosha212
Copy link
Contributor Author

@mduchev Can you check that you are on 20.44 and you run detox build

@gosha212
Copy link
Contributor Author

@cleathley Thanks for the note. We are looking on a solution that will do it automatically.

@mduchev
Copy link

mduchev commented Oct 15, 2025

@gosha212 I was in fact using the latest alpha version and I did run build beforehand. Can it be a cache issue maybe then?

@gosha212
Copy link
Contributor Author

@mduchev Try to clean everything with git clean -fdx or clean checkout.

@jawadkhan653
Copy link

I am using alpha version , getting the below errors . can you please help me to fix .

OK Screenshot 2025-10-15 at 09 33 42

@mduchev
Copy link

mduchev commented Oct 15, 2025

@gosha212 Clearing cache and clean checkout didn't help. I had to recreate the package-lock file. I guess npm messed that up again. I can confirm that it's working as expected now. Thank you for your effort.

@jawadkhan653
Copy link

detox , with gesture handler creating issue.
Screenshot 2025-10-16 at 09 31 06

@Maschga
Copy link

Maschga commented Oct 16, 2025

@jawadkhan653
Copy link

@Maschga any fix for below error ?
Screenshot 2025-10-16 at 09 52 24

@Maschga
Copy link

Maschga commented Oct 16, 2025

This error should be fixed with this PR.

@jawadkhan653
Copy link

@Maschga so nothing need to change from my side or ... ?

@gosha212
Copy link
Contributor Author

Here is a support for 0.82: #4853.

@Maschga
Copy link

Maschga commented Oct 16, 2025

Thank you @gosha212 .
I was in the wrong PR.

Copy link
Collaborator

@d4vidi d4vidi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty good but there's a blocker

@jawadkhan653
Copy link

@cleathley can you please let me know , how did you fixed java.lang.NoSuchFieldException: error.

@gosha212
Copy link
Contributor Author

@jawadkhan653 You need to upgrade to the latest alpha and rebuild your app. Try git clean -fdx

@gosha212 gosha212 merged commit c354ecd into master Oct 19, 2025
2 of 3 checks passed
@gosha212 gosha212 deleted the feat/rn_81 branch October 19, 2025 14:05
@cleathley
Copy link

cleathley commented Oct 20, 2025

@cleathley can you please let me know , how did you fixed java.lang.NoSuchFieldException: error.

_@jawadkhan653 you want to use the 44.alpha tag.. ie in your package.json

"detox": "20.44.0-alpha.0"

Works fine under .82 (and I'm using all the usual libs (raw RN app not expo))._

EDIT: looks like 20.44.0 has been offically released now so best to use that and not a testing branch. I just tested it on my app and works fine accross multiple devices (still doesn't want to test my spash screen (which is part of the app and not the system one but I think thats a different issue as it doesn't pick up the app being idle until it transitions to the home screen)

@gosha212
Copy link
Contributor Author

20.44.0 is out

@gosha212
Copy link
Contributor Author

@cleathley you can use waitFor in this case

@jawadkhan653
Copy link

@gosha212 20.44.0 will work fine for 0.82?

@cleathley
Copy link

@cleathley you can use waitFor in this case

@gosha212 I've tried that (aswell as wrapping the test with disableSync). Looking at the console it's not even attempting the test until the splash screen times out (just a setInterval, navigate combo). even setting the timeout to say 10 seconds it still won't process the test until after the transition

@gosha212
Copy link
Contributor Author

Can you share a simple demo app?
Is it android or iOS? This should work out of the box

@cleathley
Copy link

cleathley commented Oct 20, 2025

@gosha212 Will work on a app tommorow (I'm in Australia). I've recorded a video of the launch and put a few console logs in but yes it should be quiet basic as it's just launchs the emulator and has a single test. I've tried launching the emualator by both a beginALL in the actual test and an a beginALL() in a setup file and passing it into jest.

{
  setupFilesAfterEnv: ['<rootDir>/e2e/detox.setup.ts'],
}

https://youtu.be/893w9YMIBcE

The test in the video is just an empty it('') block but it doesn't run to after the app has transisioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants