-
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
Android tap, swipe, scroll, and scrollTo do not work #4240
Comments
Do you think this is a regression from 20.13.1? Could you downgrade to 20.13.0 and check again? Please don't mix everything into one pile, try to isolate each piece that is not working as expected. Attaching a video with your commentary would be helpful too (e.g. code, ios video vs. android video). |
@noomorph |
I apologize, but your descriptions are currently quite vague, making it challenging to understand your actions and what was removed. Please try to provide more specific information in your responses to avoid any confusion. Please attach videos, code snippets and everything that we can find necessary for understanding. |
@noomorph Thank you for your efforts to help.
Here is a portion of my test code.
|
Could you also try this version of Detox: 20.13.2-smoke.0 ? |
@noomorph I install "detox": "20.13.2-smoke.0". |
Okay, so far we can conclude that you have an issue with You also mentioned that you have tap issues, but I don't see any code snippet that would demonstrate that from your code. Could you elaborate on this as well? Supposedly, the tap issues have been fixed in 20.13.1, and your bugreport seems disturbing. |
@noomorph I used And it's the same with tapping. I am trying to tap the and error message is this.
|
Yes, I was using version 18 of Detox (I'm sorry, I can't remember the exact previous version number). I upgraded to 20.13.1 after seeing that the issue with the tap function was resolved. |
Hm, this starts to look more like ProGuard issue. Can you reproduce that in a debug build? |
On RN
|
Managed to get it to work. |
@eugenezhernakov Are you seeing that error on build process? |
Now, I'm wondering if I need to upgrade the React Native version. |
Not during build process, but when running |
In the end, I succeeded on the emulator. However, on the attached device I kept trying, the same issue persisted even after I upgraded the Kotlin version. |
So, do I understand right we're talking about reflection methods being cast over too old (or too new) APIs? |
@noomorph I don't understand what is that meaning. I just know I'm facing that error on attached device when test running.
|
@juls-k try to clean up both your device and your computer – delete app apk and delete test apk. Rebuild your APKs and then re-run tests. It looks like a discrepancy between native and JS code. We had this change in signature in September (20.12.0), so maybe you have an old code deployed to your mobile phone: P.S. Another way to test that – downgrade Detox to 20.11.4 (don't rebuild anything) and re-run tests. If that works, this confirms the theory above – you just need to upload the new binaries. |
Having same problem. Tests work fine on iOS, but on Android swipe gestures don't work (taps might not work either, but my app's first screen needs to be swiped away first to try that). They don't fail either, detox thinks it has done them and continues the script, and then some later action fails because it didn't. Using detox Any suggestions to go around this? I don't mind having to downgrade API level or detox/jest versions. Thanks in advance for any help! |
Hey @ianspektor 👋 just thought I'd let you know that it turns out simply downgrading from 33 -> 32 wasn't the solution for me. We were previously using emulators with Google API, however we switched over to using the Google Play API (and went to 32) then it worked. May have had something to do with one of our dependencies requiring Google Play APIs to work🤷♀️ However, it seems odd to me as we didn't need them before 🤔 Also doesn't make sense, as there didn't seems to be any errors relating to anything like that in our trace logs that would specifically only impact swipe actions. As you mentioned, it was as if Detox thought it had successfully completed the swipe action and carrys on with the next action, only falling over when something wasn't where we expected later. There was a bit too many moving parts to be able troubleshoot this one for sure in my project as I think it may have been a compound effect. We were upgrading React Native from 0.69 -> 0.72.5. Then during that the yarn.lock file was regenerated and increased all the dependencies versions. This bumped us from Detox 20.0.03 -> 20.13.0 We had been holding off upgrading it recently because we were waiting for #3762 So it could be that something else in the RN upgrade/yarn.lock file changes caused our issues with now needing to use Google Play APIs for swipe actions to work but we didn't see it until we were finally able to upgrade Detox and also upgrade the API. Thought I'd mention this on the off chance it helps you 😅 |
Thanks for the input @Seraphiyra! I'm currently using |
@Seraphiyra Hi. Could you tell what image do you use? |
Hey @Seraphiyra When can we expect a resolution for this issue? It's impacting our ability to run tests on API levels 33 and 34, which is a major hurdle for us right now. Any update on the timeline for fixing this would be greatly appreciated! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! For more information on bots in this repository, read this discussion. |
Adding a +1 as I'm also running into this with detox 20.13.0, trying to get some old tests up and running again :/ |
Any updates on this ? it('show see the toast', async () => {
await elementById('SCROLL_VIEW').scrollTo('bottom');
await expect(elementById('SHOW_BTN')).toBeVisible();
await elementById('SHOW_BTN').tap();
// await expect(elementById('TOAST')).toBeVisible();
await waitFor(elementById('TOAST')).toBeVisible().withTimeout(2000);
}); According to the screenshots made on Test Failed: 2.0sec timeout expired without matching of given matcher: (view has effective visibility <VISIBLE> and view.getGlobalVisibleRect() covers at least <75> percent of the view's area)
32 | await elementById('SHOW_BTN').tap();
33 | // await expect(elementById('TOAST')).toBeVisible();
> 34 | await waitFor(elementById('TOAST')).toBeVisible().withTimeout(2000);
| ^
35 | });
36 | }); // package.json
"detox": "^20.23.0",
"react-native": "0.74.3", Edit: it('scroll to the bottom', async () => {
await elementById('SCROLL_VIEW').scrollTo('bottom');
});
it("should show see the toast", async () => {
await expect(elementById("SHOW_BTN")).toBeVisible();
await elementById("SHOW_BTN").tap();
await expect(elementById('TOAST')).toBeVisible();
}); |
What happened?
I was able to confirm that the detox build and test work properly on iOS. On Android, the detox build works fine, but the following error occurs in the test.
At first, I had speculated that this error was due to not finding the
testID
on Android. However, my first test is to find thescrollView
id on the initial screen.await expect(element(by.id('dashboardScrollView'))).toBeVisible();
Given that this is successful, it seems that it's correctly identifying the
testID
.What was the expected behaviour?
The
tap
,swipe
,scroll
,scrollTo
function should work properly.Was it tested on latest Detox?
Did your test throw out a timeout?
Help us reproduce this issue!
No response
In what environment did this happen?
Detox version:
20.13.1
React Native version:
0.67.5
Has Fabric (React Native's new rendering system) enabled: no
Node version:
v16.19.0
Device model:
Samsung Galaxy Note10
Android version:
12
Test-runner (select one): jest
Detox logs
Detox logs
Device logs
Device logs
More data, please!
No response
The text was updated successfully, but these errors were encountered: