appium / appium/appium-flutter-driver

Getting timeout on a flutter driver command

Open
#673 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
539
Forks
195
Avg merge
1h 11m
Merged PRs (30d)
4

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported driver.execute('flutter:setFrameSync') and elementClick sequence, then review the linked full Appium logs. Reproduce the timeout around the OTP textbox click and determine whether the failure is in frame synchronization or click handling; done means the command completes reliably without timing out.

Written by the indexing model from the issue text.

Assessment

Tech stack
flutter, typescript
Domain
mobile-dev, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.