Search Issue Tracker
Fixed
Fixed in 1.1.33
Votes
6
Found in [Package]
1.1.30
Issue ID
DSTR-428
Regression
No
[Test Runner][Android] Test runners fails to connect properly to Android devices while in batch mode
Reproduction steps:
1. Download the attached user's project "MiniTestRunner.zip"
2. Change the paths of this command:
"C:\\Program Files\\Unity\\Hub\\Editor\\2021.2.7f1\\Editor\\Unity.exe" -runTests -batchmode -projectPath C:\\Dev\\MiniTestRunner -testResults C:\\Dev\\MiniTestRunner\\TestResults.txt -testPlatform Android -logFile C:\\Dev\\MiniTestRunner\\TestEditor.txt
3. Run the above command with the relevant parts modified to your setup with a Android device connected
Expected result: Test runner does not fail with an Android device connected
Actual result: "TestLaunchFailedException: Timed out trying to connect to the player. Player failed to launch or crashed soon after launching" is outputted in "TestEditor.txt"
Reproduces on: Test-framework 1.1.30 (2021.2.9f1, 2022.1.0b6, 2022.2.0a3)
Could not test below Test-framework 1.1.30 and above due to getting "Player Build Failed" when I try to run batch mode
Could not test below 2021.2 due to errors when downgrading
Stack trace from "TestEditor.txt" log:
TestLaunchFailedException: Timed out trying to connect to the player. Player failed to launch or crashed soon after launching
at UnityEditor.TestTools.TestRunner.AndroidPlatformSetup.PostSuccessfulLaunchAction () \[0x00071] in D:\\Cases\\1398689_MiniTestRunner\\Library\\PackageCache\\com.unity.test-framework@1.1.30\\UnityEditor.TestRunner\\TestLaunchers\\PlatformSetup\\AndroidPlatformSetup.cs:56
at UnityEditor.TestTools.TestRunner.PlatformSpecificSetup.PostSuccessfulLaunchAction () \[0x0001e] in D:\\Cases\\1398689_MiniTestRunner\\Library\\PackageCache\\com.unity.test-framework@1.1.30\\UnityEditor.TestRunner\\TestLaunchers\\PlatformSetup\\PlatformSpecificSetup.cs:92
at UnityEditor.TestRunner.TestLaunchers.RemoteTestRunController.PostSuccessfulLaunchAction () \[0x00001] in D:\\Cases\\1398689_MiniTestRunner\\Library\\PackageCache\\com.unity.test-framework@1.1.30\\UnityEditor.TestRunner\\TestLaunchers\\RemotePlayerTestController.cs:107
at UnityEditor.TestTools.TestRunner.PlayerLauncher.Run () \[0x00168] in D:\\Cases\\1398689_MiniTestRunner\\Library\\PackageCache\\com.unity.test-framework@1.1.30\\UnityEditor.TestRunner\\TestLaunchers\\PlayerLauncher.cs:97
at UnityEditor.TestTools.TestRunner.TestRun.Tasks.LegacyPlayerRunTask+<Execute>d__0.MoveNext () \[0x000bb] in D:\\Cases\\1398689_MiniTestRunner\\Library\\PackageCache\\com.unity.test-framework@1.1.30\\UnityEditor.TestRunner\\TestRun\\Tasks\\LegacyPlayerRunTask.cs:14
at UnityEditor.TestTools.TestRunner.TestRun.TestJobRunner.ExecuteStep () \[0x00088] in D:\\Cases\\1398689_MiniTestRunner\\Library\\PackageCache\\com.unity.test-framework@1.1.30\\UnityEditor.TestRunner\\TestRun\\TestJobRunner.cs:124
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Lightmaps are darker than should be when they are generated through Lightmapper.BakeAsync in batchmode
- Crash on ScriptableBatchRenderer::GenerateBuiltInCBuffer when opening a project after adding HDRP Samples to a specific project
- ArgumentException is thrown and reference is missing when deserializing and using MultiColumnListView
- “You may not pass in objects that are already persistent” error is thrown when entering the Play Mode and the "Active Input Handling" system was changed in a custom Build Profile
- [Linux] Assertion failed on expression 'success && actual == size' error is thrown when building project to another partition with a different file system
suchaolishou
Apr 22, 2022 08:51
This issue also reproduce on Test Framework 1.1.31
TestLaunchFailedException: Timed out trying to connect to the player. Player failed to launch or crashed soon after launching UnityEditor.TestTools.TestRunner.AndroidPlatformSetup.PostSuccessfulLaunchAction () (at Library/PackageCache/com.unity.test-framework@1.1.31/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/AndroidPlatformSetup.cs:56) UnityEditor.TestTools.TestRunner.PlatformSpecificSetup.PostSuccessfulLaunchAction () (at Library/PackageCache/com.unity.test-framework@1.1.31/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/PlatformSpecificSetup.cs:92) UnityEditor.TestRunner.TestLaunchers.RemoteTestRunController.PostSuccessfulLaunchAction () (at Library/PackageCache/com.unity.test-framework@1.1.31/UnityEditor.TestRunner/TestLaunchers/RemotePlayerTestController.cs:107) UnityEditor.TestTools.TestRunner.PlayerLauncher.Run () (at Library/PackageCache/com.unity.test-framework@1.1.31/UnityEditor.TestRunner/TestLaunchers/PlayerLauncher.cs:99) UnityEditor.TestTools.TestRunner.TestRun.Tasks.LegacyPlayerRunTask+<Execute>d__0.MoveNext () (at Library/PackageCache/com.unity.test-framework@1.1.31/UnityEditor.TestRunner/TestRun/Tasks/LegacyPlayerRunTask.cs:14) UnityEditor.TestTools.TestRunner.TestRun.TestJobRunner.ExecuteStep () (at Library/PackageCache/com.unity.test-framework@1.1.31/UnityEditor.TestRunner/TestRun/TestJobRunner.cs:124) UnityEditor.EditorApplication:Internal_CallUpdateFunctions() (at /Users/bokken/buildslave/unity/build/Editor/Mono/EditorApplication.cs:356)