Skip to content
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

Getting timeout on a flutter driver command #673

Open
veydecapia opened this issue Mar 20, 2024 · 6 comments
Open

Getting timeout on a flutter driver command #673

veydecapia opened this issue Mar 20, 2024 · 6 comments

Comments

@veydecapia
Copy link

veydecapia commented Mar 20, 2024

Getting timeout error on a click command. I have added a setFrameSync before and after the click command.

    await driver.execute('flutter:setFrameSync', true, 5000);
    await driver.elementClick(this.otpTextbox);
    await driver.execute('flutter:setFrameSync', false, 5000);

Terminal output:

  [0-0] 2024-03-20T10:30:47.886Z INFO webdriver: COMMAND elementClick("eyJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSIsImtleVZhbHVlU3RyaW5nIjoidGV4dGZpZWxkT25lIiwia2V5VmFsdWVUeXBlIjoiU3RyaW5nIn0")
  [0-0] 2024-03-20T10:30:47.886Z INFO webdriver: [POST] http://127.0.0.1:4723/session/db0179dd-3334-42a8-b93d-3bf5cf5e92d2/element/eyJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSIsImtleVZhbHVlU3RyaW5nIjoidGV4dGZpZWxkT25lIiwia2V5VmFsdWVUeXBlIjoiU3RyaW5nIn0/click
  [0-0] Error in "Login Scenario.should be able to login successfully"
  Error: Timeout
      at listOnTimeout (node:internal/timers:573:17)
      at processTimers (node:internal/timers:514:7)
  [0-0] 2024-03-20T10:33:45.204Z DEBUG @wdio/utils:shim: Finished to run "after" hook in 0ms
  [0-0] 2024-03-20T10:33:45.204Z INFO webdriver: COMMAND deleteSession()
  [0-0] 2024-03-20T10:33:45.206Z INFO webdriver: [DELETE] http://127.0.0.1:4723/session/db0179dd-3334-42a8-b93d-3bf5cf5e92d2
  [0-0] 2024-03-20T10:33:45.499Z INFO webdriver: RESULT null
  2024-03-20T10:33:45.614Z DEBUG @wdio/local-runner: Runner 0-0 finished with exit code 1
  [0-0] FAILED in Android - file:///tests/specs/sanity/app.login.spec.ts

I have followed and applied the fix in this issue.

Added await driver.execute('flutter:setFrameSync', true, 5000); before and after the click command.

See full appium logs here

@SyedAshiqSorife
Copy link

facing same issue. can any one help ?

2024-03-27T11:46:27.565Z INFO webdriver: COMMAND executeScript("flutter:setFrameSync", )
[0-0] 2024-03-27T11:46:27.571Z INFO webdriver: [POST] http://127.0.0.1:4723/session/1ac3c16d-28d8-4975-8c54-c443ace51204/execute/sync
[0-0] 2024-03-27T11:46:27.572Z INFO webdriver: DATA { script: 'flutter:setFrameSync', args: [ true, 5000 ] }
[0-0] 2024-03-27T11:46:27.624Z INFO webdriver: RESULT {
[0-0] isError: false,
[0-0] response: {},
[0-0] type: '_extensionType',
[0-0] method: 'ext.flutter.driver'
[0-0] }
[0-0] 2024-03-27T11:46:27.625Z INFO webdriver: COMMAND elementClick("<Screenshot[base64]>")
[0-0] 2024-03-27T11:46:27.627Z INFO webdriver: [POST] http://127.0.0.1:4723/session/1ac3c16d-28d8-4975-8c54-c443ace51204/element/eyJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSIsImtleVZhbHVlU3RyaW5nIjoiSE9NRV9TQ1JFRU5fVEFCX0JBUl9NT05USCIsImtleVZhbHVlVHlwZSI6IlN0cmluZyJ9/click

after this it hangs

@SyedAshiqSorife
Copy link

@veydecapia did you get any solution?

@veydecapia
Copy link
Author

@SyedAshiqSorife No, I'm stucked. Checking on other alternatives.

@SyedAshiqSorife
Copy link

@veydecapia try this if your locator is correct then it will work.
await driver.execute('flutter:setFrameSync', false, 5000);
await driver.elementClick(this.otpTextbox);
await driver.execute('flutter:setFrameSync', true, 5000);

@veydecapia
Copy link
Author

@SyedAshiqSorife did this approach work on your end?

@zerock54
Copy link

zerock54 commented Jul 5, 2024

I have the same issue and the setFrameSync tip did not work

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

No branches or pull requests

3 participants