-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Epic] React Native 68 compliance #3344
Comments
Just saw this myself today and headed over to see if anyone else had logged it. Here's the stack on android
Here's your commit with the diff that broke Detox+RN68+ facebook/react-native@ce74aa4 Commit log is pretty helpful:
Here's your call site Detox/detox/android/detox/src/full/java/com/wix/detox/reactnative/ReactNativeLoadingMonitor.kt Line 38 in 679ac4c
I see other minor-version-specific workarounds like this, would something like this be suitable, to use one API or the other? Detox/detox/android/detox/src/full/java/com/wix/detox/reactnative/ReactNativeExtension.kt Lines 135 to 145 in 679ac4c
I think you have other machinery involved in building vs different react-native versions as well though, to deal with symbol availability depending on what version is in use? Not sure how exactly to do that, but hopefully this helps as a start at minimum |
Hey guess what! It's just a typing change on their part for the listener type - the listener APIs are taking the interface type parent of the one we are using. Basically it appears to be a Java "binary compatibility break" but the code still works as source based on my testing, as long as you install Detox as a compile dependency so you recompile it to get the new type signature of the listener for the API you are calling. @xiongemi you logged the other issue for react-native 0.68+ - if you re-integrate Detox, but as a compile dependency, does it work for you? I think it will. https://wix.github.io/Detox/docs/introduction/android#setting-detox-up-as-a-compiling-dependency |
Hey! was also having this issue and this resolved it for me. Thank you 👍🏻 |
@d4vidi looks like we have confirmation from two people (myself and @thelazurite-cell) that Detox does not currently seem to need a forward port just to work on RN68, though it will need a recompile + rn68-specific binary distribution to handle the listener interface hierarchy / java binary compatibility break. There are changes in RN68 that would be good to adopt in order to be ready for the "non-bridge" / "Fabric" future, but just to run? A recompile might be all that's needed. |
@mikehardy thanks for this amazing research work! Hopefully you are right regarding the rebuild, although, Detox is meant to work seamlessly with all supported versions. We might have to put in an extra effort and actually change the listener registration code to use reflection 😢 |
Just wait till you try to support fabric / new architecture 😂, multiple aars one per version probably in detox future |
Sounds like a proper challenge 😅 |
Is there a rough timeline on basic 0.68 support? (Not the optional fabric/non-bridge stuff) |
Roughly a matter of weeks. I'm afraid we are caught up by other things at the moment. |
@MrRio to confirm: you have integrated Detox in the source method and you still have a problem? Because as far as I was able to see, if you integrate it in the optional source style, there were no problems, it works/worked with 0.68 |
@mikehardy Also works for me, thanks! Was able to fix my PR upleveled/hotline-bling-codealong#47 with these changes to the GitHub Actions workflow (running this using Expo): |
Just a note here: @mikehardy fix for the typing change helped me w/ a 0.68 upgrade, confirmation here as well. Also, I ran into issues on 0.68 with an |
i got an error |
Hi @xiongemi 👋 - I have seen you post error messages in other places, and have never seen you post enough information to help, e.g.. reactwg/react-native-releases#21 (comment) https://stackoverflow.com/help/how-to-ask Please consult those links and take their advice to heart, it will help you interact with any open source community. Until then, there is not enough information to say what may cause your problem. |
thanks. it works when I change it to compiling dependency. |
Great job guys. We've started moving forward with this one. I'm sure your inputs would be helpful. |
Hey guys! Great work so far. I've been upgrading to 0.68 (while knowing Detox doesn't really support it yet) and I managed to get the tests running by switching to compiling dependency. However I only get the first test to run and the rest fail with:
This is in CI with release build. I understand that 0.68 support isn't quite there, but it's very promising that I get the first one green so I might as well ask if this error points to something you guys would know about. Thanks! |
This:
Looks like the sort of command you could run locally in an environment that emulates CI as much as possible (or you could add a step in CI that runs it, or you could run Right now unfortunately your error report may be reduced to "hey I tried it, and a command failed", which is not enough information to make progress |
Hey I tried it, a command failed, and I took a shot in the dark to ask a question if this was something that would trigger an immediate light bulb. Thanks for the reply, I'll continue debugging this with the help of logcat. |
maddening for sure - in my experience having those logcat generation / save steps in a workflow gives you a logcat that is ignored 99.99% of the time until all the sudden like now it is vital, so I add them to all my android workflows. We have similar ones for iOS for same reason - hopefully they are useful as you dig more |
I see some Android workarounds were posted. Do we know the fix on iOS for this yet? |
This comment was marked as outdated.
This comment was marked as outdated.
50% of the time I am receiving the following error on iOS when running a Detox test for iOS sim:
I assumed that everyone would be getting this but it sounds like that's not the case? Problem is present on React Native 0.68.2. |
You still need the kotlin part from the setup
I had to set the kotlin version to '1.6.0' to get it to work with RN 0.69 |
I have a general question about building Detox to compile. It seems when I do this I trigger a bunch of other dependencies' problems in their |
@shamilovtim not the best context... Maybe try our Discord, instead? |
I resolved most of the issues but have found in general that Android emulator is too slow and UI thread too bottlenecked to be able to use Detox on it 😐 |
In case anyone else is bitten by "the soloader" issue (facebook/SoLoader#94) - resulting in android crash on running androidTests - that one is fixed in soloader 0.10.4, which is not pulled in by default in react-native 0.69.x or (unless it is fixed) in 0.70.x. You can probably override it in your |
I've gotten past the original issue by applying the detox setup as a compiling dependency. However, I'm now getting this new error while running the test. The app is trying to connect to a server and this happens,
|
Reanimated issue, looks like, or combination react native / reanimated |
@mikehardy Thanks for looking into. Do you have any suggestions for a workaround? Thanks in advance! |
When might the RN 0.68 compliance be available on the master branch for starters? |
@shamilovtim may I suggest: https://support.genymotion.com/hc/en-us/articles/4414396695569-Scale-your-e2e-React-Native-UI-testing-with-Detox-on-Genymotion-SaaS-Cloud-Android-virtual-devices That works a millions times better than any locally hosted Google Emulator that we've tried. We are working on announcing official support in Detox v20 |
@siddhantsoni asking for ETA's in the open source cosmos is largely tricky. Nevertheless in this case I expect things to be ready by the end of this week. |
After the upgrade to Detox 19.8.2 I am still getting the error, check out the logs when I try to run the tests. It boots up the emulator successfully and then gives the following error instantly
Emulator: Pixel_4_XL_API_31 |
Thanks for the report @anshulkapoor0018 |
TODO: New architecture
The text was updated successfully, but these errors were encountered: