leancodepl / patrol

Flutter-first UI testing framework. Ready for action!
https://patrol.leancode.co
Apache License 2.0
814 stars 116 forks source link

During a test, the app crashes on a physical iOS device #2230

Closed Dbis7 closed 4 days ago

Dbis7 commented 2 weeks ago

Steps to reproduce

  1. connect real device to Mac
  2. patrol test -t PATH --release --flavor=FLAVOR --dart-define=APP_ENV=ENV
  3. error

iOS 17.5

Actual results

We are trying to run a login test on a physical iOS device, however, the test stops during interaction with a textField in a webview while the interaction with the location permissions popup works correctly. The error only occurs on the physical device while everything works fine on the simulator and android.

I have redacted the sensitive information that I cannot share

Logs

Logs ``` ```

Patrol version

^3.0.1

Patrol Doctor output

Patrol Doctor output ``` ```

Flutter Doctor output

Flutter Doctor output ``` ```
jBorkowska commented 1 week ago

Hi @Dbis7 , thank you for reporting this issue.

From logs that you shared, it looks like the http connection is lost, though there are no other traces, so it's hard to guess what's wrong. I faced a similar problem, but it was caused by the app, that was sending way too many requests at some point, which led to saturation of internet connection. If you are sure that is an issue with patrol, please send us a minimal reproducible example with this bug.

Dbis7 commented 1 week ago

Hi, I tried adding a delay in the test and manually entering the credentials in the app, and the problem does not occur. Additionally, with the tap() method, the app continues to function and the textField is clicked correctly, but if I try to enter the text, it crashes.

jBorkowska commented 1 week ago

I have another question - can you show the code responsible for interacting with that textfield? We noticed some issues when trying to enterText() on an already focused textfield, but it was some time ago and it was gone in next patrol update

Dbis7 commented 1 week ago

Thank you, I will try updating Patrol to a more recent version.

this is the code: await loginPage.login(Constants.email, Constants.password);

class LoginPage { final UtilityManager utils;

LoginPage(this.utils);

Future login(String email, String password) async { await utils.waitForDefaultTime(); await utils.enterTextInNativeFieldByIndex(email, Mapping.emailFieldIndex); await utils.enterTextInNativeFieldByIndex(password, Mapping.passwordFieldIndex); } }

I have also tried all the other enterText() methods

jBorkowska commented 1 week ago

Ok but I need to know what utils.enterTextInNativeFieldByIndex is doing :)

github-actions[bot] commented 5 days ago

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it. Feel free to open a new issue with all the required information provided, including a minimal, reproducible sample. Make sure to diligently fill out the issue template. Thanks for your contribution.

github-actions[bot] commented 5 days ago

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it. Feel free to open a new issue with all the required information provided, including a minimal, reproducible sample. Make sure to diligently fill out the issue template. Thanks for your contribution.

github-actions[bot] commented 4 days ago

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it. Feel free to open a new issue with all the required information provided, including a minimal, reproducible sample. Make sure to diligently fill out the issue template. Thanks for your contribution.

github-actions[bot] commented 4 days ago

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it. Feel free to open a new issue with all the required information provided, including a minimal, reproducible sample. Make sure to diligently fill out the issue template. Thanks for your contribution.

github-actions[bot] commented 4 days ago

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it. Feel free to open a new issue with all the required information provided, including a minimal, reproducible sample. Make sure to diligently fill out the issue template. Thanks for your contribution.

github-actions[bot] commented 4 days ago

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it. Feel free to open a new issue with all the required information provided, including a minimal, reproducible sample. Make sure to diligently fill out the issue template. Thanks for your contribution.

github-actions[bot] commented 4 days ago

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it. Feel free to open a new issue with all the required information provided, including a minimal, reproducible sample. Make sure to diligently fill out the issue template. Thanks for your contribution.

github-actions[bot] commented 4 days ago

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it. Feel free to open a new issue with all the required information provided, including a minimal, reproducible sample. Make sure to diligently fill out the issue template. Thanks for your contribution.

github-actions[bot] commented 4 days ago

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it. Feel free to open a new issue with all the required information provided, including a minimal, reproducible sample. Make sure to diligently fill out the issue template. Thanks for your contribution.

github-actions[bot] commented 4 days ago

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it. Feel free to open a new issue with all the required information provided, including a minimal, reproducible sample. Make sure to diligently fill out the issue template. Thanks for your contribution.

github-actions[bot] commented 4 days ago

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it. Feel free to open a new issue with all the required information provided, including a minimal, reproducible sample. Make sure to diligently fill out the issue template. Thanks for your contribution.

github-actions[bot] commented 4 days ago

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it. Feel free to open a new issue with all the required information provided, including a minimal, reproducible sample. Make sure to diligently fill out the issue template. Thanks for your contribution.

github-actions[bot] commented 4 days ago

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it. Feel free to open a new issue with all the required information provided, including a minimal, reproducible sample. Make sure to diligently fill out the issue template. Thanks for your contribution.

github-actions[bot] commented 4 days ago

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it. Feel free to open a new issue with all the required information provided, including a minimal, reproducible sample. Make sure to diligently fill out the issue template. Thanks for your contribution.

github-actions[bot] commented 4 days ago

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it. Feel free to open a new issue with all the required information provided, including a minimal, reproducible sample. Make sure to diligently fill out the issue template. Thanks for your contribution.

github-actions[bot] commented 4 days ago

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it. Feel free to open a new issue with all the required information provided, including a minimal, reproducible sample. Make sure to diligently fill out the issue template. Thanks for your contribution.

github-actions[bot] commented 4 days ago

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it. Feel free to open a new issue with all the required information provided, including a minimal, reproducible sample. Make sure to diligently fill out the issue template. Thanks for your contribution.

github-actions[bot] commented 4 days ago

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it. Feel free to open a new issue with all the required information provided, including a minimal, reproducible sample. Make sure to diligently fill out the issue template. Thanks for your contribution.

github-actions[bot] commented 4 days ago

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it. Feel free to open a new issue with all the required information provided, including a minimal, reproducible sample. Make sure to diligently fill out the issue template. Thanks for your contribution.

github-actions[bot] commented 4 days ago

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it. Feel free to open a new issue with all the required information provided, including a minimal, reproducible sample. Make sure to diligently fill out the issue template. Thanks for your contribution.