leancodepl / patrol

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

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

Closed Dbis7 closed 4 months ago

Dbis7 commented 5 months 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 5 months 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 5 months 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 5 months 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 5 months 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 5 months ago

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

github-actions[bot] commented 4 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue.