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

Hangs test execution due to flutter locater not present on screen or app/screen crashed #733

Open
TestMagic0989 opened this issue Sep 14, 2024 · 4 comments

Comments

@TestMagic0989
Copy link

Hangs whole execution of test at the same test step when do not find flutter widget with byValuekey or byText.
please find logs:

[6bd5f8b2][FlutterDriver@fb8a] >>> {"command":"waitForAbsent","finderType":"ByValueKey","keyValueString”:”my_key","keyValueType":"String"}

[d44564a3][FlutterDriver@fb8a] Connection to ws://127.0.0.1:41293/Zw4g5AV3WERD=/ws closed

[6bd5f8b2][AndroidUiautomator2Driver@4ba2] Shutting down because we waited 60 seconds for a command

[6bd5f8b2][AndroidUiautomator2Driver@4ba2] Deleting UiAutomator2 session

[6bd5f8b2][AndroidUiautomator2Driver@4ba2] Deleting UiAutomator2 server session

[6bd5f8b2][AndroidUiautomator2Driver@4ba2] Matched '/' to command name 'deleteSession'

[6bd5f8b2][AndroidUiautomator2Driver@4ba2] Proxying [DELETE /] to [DELETE http://127.0.0.1:8200/session/74345tfca-18bd-4b50-8a3d-23edsf5e345e] with no body

[6bd5f8b2][AndroidUiautomator2Driver@4ba2] socket hang up

[6bd5f8b2][AndroidUiautomator2Driver@4ba2] Did not get confirmation UiAutomator2 deleteSession worked; Error was: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up

[d44564a3][AndroidUiautomator2Driver@4ba2] [Instrumentation] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:

[d44564a3][AndroidUiautomator2Driver@4ba2] [Instrumentation] The process has exited with code null, signal SIGTERM

[6bd5f8b2][ADB] Running '/usr/local/share/android-sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys activity services io.appium.settings/.recorder.RecorderService'

[6bd5f8b2][ADB] Running '/usr/local/share/android-sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop group.my.app'

[6bd5f8b2][ADB] Removing forwarded port socket connection: 8200 

[6bd5f8b2][ADB] Running '/usr/local/share/android-sdk/platform-tools/adb -P 5037 -s emulator-5554 forward --remove tcp:8200'

[6bd5f8b2][AndroidUiautomator2Driver@4ba2] Restoring hidden api policy to the device default configuration

[6bd5f8b2][ADB] Running '/usr/local/share/android-sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy''

[6bd5f8b2][Logcat] Stopping logcat capture

Appium 2.0
desired capabilities:
"platformName": "Android",
"platformVersion": "13.0",
"deviceName": "emulator-5554",
"automationName": "Flutter",
"retryBackoffTime": 500

@TestMagic0989
Copy link
Author

@KazuCocoa do you have any idea about this. If yes please help e out with this issue. Thank you!

@KazuCocoa
Copy link
Member

What about adding timeout like

await driver.execute('flutter:waitForAbsent', buttonFinder, {durationMilliseconds: 'malformed input'});
?

@TestMagic0989
Copy link
Author

TestMagic0989 commented Sep 25, 2024

@KazuCocoa I tried what you suggested but it doesn't seem to work, I think it is bug while we use automationName as Flutter and use these functions and if element/widgets are hidden not visible or not founds on screen these test hangs and does not properly shut down appium flutter driver and appium server.
Btw, just to mention In my case, I am switching context between NATIVE_APP and FLUTTER multiple times in use cases.
So please suggest how we can address this issue and if this is known issue then do we have any workaround or solution for the same.

@TestMagic0989
Copy link
Author

TestMagic0989 commented Sep 26, 2024

Anyone any clue!!

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

2 participants