Closed ShootingKing-AM closed 2 months ago
Please use the following action to debug this issue further:
uses: EnricoMi/publish-unit-test-result-action/macos@debug-checkrun-anotations
The problem is with the second annotation, it has a None
path:
{'path': None, 'start_line': 0, 'end_line': 0, 'annotation_level': 'warning', 'message': 'Test suite None has the following stderr output (see Raw output).', 'title': 'Logging on stderr of test suite None', 'raw_details': '...'}
Investigating how this can be.
Issue fixed, please rerun with above debug branch.
Is there a chance to upload test result files code/mobile/android/PhoneVR/app/build/outputs/androidTest-results/**/TEST-*.xml
as artifacts so I can inspect them?
Please use the following action to debug this issue further:
uses: EnricoMi/publish-unit-test-result-action/macos@debug-checkrun-anotations
i re-ran with this 10hrs ago (15mins after you last suggested the debug version of action. run link: https://github.com/alvr-org/PhoneVR/actions/runs/10683954200/job/29613219448?pr=376
2024-09-03 14:17:27 +0000 - publish - DEBUG - action triggered by 'pull_request' event
2024-09-03 14:17:27 +0000 - publish - DEBUG - Settings: Settings(token='***', actor='github-actions', api_url='https://api.github.com/', graphql_url='https://api.github.com/graphql', api_retries=10, event={'action': 'synchronize', 'after': '58261cbf67756b858a31619ca59b148b0ff2b14d', 'before': '2ea57f71dfdd7c9c5be44eba3fa31a15667d4973', 'number': 376, 'organization': {'avatar_url': 'https://avatars.githubusercontent.com/u/74990209?v=4', 'description': '', 'events_url': 'https://api.github.com/orgs/alvr-org/events', 'hooks_url': 'https://api.github.com/orgs/alvr-org/hooks', 'id': 74990209, 'issues_url': 'https://api.github.com/orgs/alvr-org/issues', 'login': 'alvr-org', 'members_url': '[https://api.github.com/orgs/alvr-org/members{/member}](https://api.github.com/orgs/alvr-org/members%7B/member%7D)', 'node_id': 'MDEyOk9yZ2FuaXphdGlvbjc0OTkwMjA5', 'public_members_url': '[https://api.github.com/orgs/alvr-org/public_members{/member}](https://api.github.com/orgs/alvr-org/public_members%7B/member%7D)', 'repos_url': 'https://api.github.com/orgs/alvr-org/repos', 'url': 'https://api.github.com/orgs/alvr-org'}, 'pull_request': {'_links': {'comment
2024-09-03 14:17:27 +0000 - publish - INFO - Available memory to read files: 7.6 GiB
2024-09-03 14:17:27 +0000 - publish - INFO - Reading files code/mobile/android/PhoneVR/app/build/outputs/androidTest-results/**/TEST-*.xml (2 files, 15.9 KiB)
2024-09-03 14:17:27 +0000 - publish - DEBUG - reading files ['code/mobile/android/PhoneVR/app/build/outputs/androidTest-results/connected/debug/flavors/noGvr/TEST-Pixel_2(AVD) - 11-_app-noGvr.xml', 'code/mobile/android/PhoneVR/app/build/outputs/androidTest-results/connected/debug/flavors/gvr/TEST-Pixel_2(AVD) - 11-_app-gvr.xml']
2024-09-03 14:17:27 +0000 - publish - INFO - Detected 2 JUnit XML files (15.9 KiB)
2024-09-03 14:17:27 +0000 - publish - DEBUG - detected JUnit XML files ['code/mobile/android/PhoneVR/app/build/outputs/androidTest-results/connected/debug/flavors/noGvr/TEST-Pixel_2(AVD) - 11-_app-noGvr.xml', 'code/mobile/android/PhoneVR/app/build/outputs/androidTest-results/connected/debug/flavors/gvr/TEST-Pixel_2(AVD) - 11-_app-gvr.xml']
2024-09-03 14:17:27 +0000 - publish - INFO - Finished reading 2 files in 0.00 seconds
2024-09-03 14:17:27 +0000 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.github.com:443
2024-09-03 14:17:27 +0000 - urllib3.connectionpool - DEBUG - [https://api.github.com:443](https://api.github.com/) "GET /repos/alvr-org/PhoneVR HTTP/11" 200 None
2024-09-03 14:17:27 +0000 - publish - INFO - Publishing failure results for commit 58261cbf67756b858a31619ca59b148b0ff2b14d
2024-09-03 14:17:27 +0000 - publish - DEBUG - Publishing UnitTestRunResults(files=2, errors=[], suites=2, duration=1725373658, suite_details=[UnitTestSuite(name=None, tests=0, skipped=0, failures=0, errors=0, stdout=None, stderr='Exception thrown during onBeforeAll invocation of plugin AndroidTestApkInstallerPlugin: ErrorName: UNKNOWN\nNameSpace: DdmlibAndroidDeviceController\nErrorCode: 1\nErrorType: TEST\nMessage: Failed to install split APK(s): [/Users/runner/work/PhoneVR/PhoneVR/code/mobile/android/PhoneVR/app/build/outputs/apk/noGvr/debug/PhoneVR-v2.0.0-beta-noGvr-debug.apk]\nFailed to install split APK(s): [/Users/runner/work/PhoneVR/PhoneVR/code/mobile/android/PhoneVR/app/build/outputs/apk/noGvr/debug/PhoneVR-v2.0.0-beta-noGvr-debug.apk]\nFailed to commit install session 540840919 with command package install-commit 540840919. Error: Unknown failure: cmd: Failure calling service package: Broken pipe (32)\ncom.android.ddmlib.InstallException: Failed to commit install session 540840919 with command packa
2024-09-03 14:17:27 +0000 - publish - DEBUG - comparing against before=2ea57f71dfdd7c9c5be44eba3fa31a15667d4973
2024-09-03 14:17:28 +0000 - urllib3.connectionpool - DEBUG - [https://api.github.com:443](https://api.github.com/) "GET /repos/alvr-org/PhoneVR/commits/2ea57f71dfdd7c9c5be44eba3fa31a15667d4973 HTTP/11" 200 None
2024-09-03 14:17:28 +0000 - urllib3.connectionpool - DEBUG - [https://api.github.com:443](https://api.github.com/) "GET /repos/alvr-org/PhoneVR/commits/2ea57f71dfdd7c9c5be44eba3fa31a15667d4973/check-runs?per_page=1 HTTP/11" 200 None
2024-09-03 14:17:28 +0000 - publish - DEBUG - found 6 check runs for commit 2ea57f71dfdd7c9c5be44eba3fa31a15667d4973
2024-09-03 14:17:29 +0000 - urllib3.connectionpool - DEBUG - [https://api.github.com:443](https://api.github.com/) "GET /repos/alvr-org/PhoneVR/commits/2ea57f71dfdd7c9c5be44eba3fa31a15667d4973/check-runs?per_page=100 HTTP/11" 200 None
2024-09-03 14:17:29 +0000 - publish - DEBUG - there are 0 check runs with title Test Results
2024-09-03 14:17:29 +0000 - publish - DEBUG - stats with delta: UnitTestRunResults(files=2, errors=[], suites=2, duration=1725373658, suite_details=[UnitTestSuite(name=None, tests=0, skipped=0, failures=0, errors=0, stdout=None, stderr='Exception thrown during onBeforeAll invocation of plugin AndroidTestApkInstallerPlugin: ErrorName: UNKNOWN\nNameSpace: DdmlibAndroidDeviceController\nErrorCode: 1\nErrorType: TEST\nMessage: Failed to install split APK(s): [/Users/runner/work/PhoneVR/PhoneVR/code/mobile/android/PhoneVR/app/build/outputs/apk/noGvr/debug/PhoneVR-v2.0.0-beta-noGvr-debug.apk]\nFailed to install split APK(s): [/Users/runner/work/PhoneVR/PhoneVR/code/mobile/android/PhoneVR/app/build/outputs/apk/noGvr/debug/PhoneVR-v2.0.0-beta-noGvr-debug.apk]\nFailed to commit install session 540840919 with command package install-commit 540840919. Error: Unknown failure: cmd: Failure calling service package: Broken pipe (32)\ncom.android.ddmlib.InstallException: Failed to commit install session 540840919 with comman
2024-09-03 14:17:29 +0000 - publish - DEBUG - creating check with 2 annotations:
2024-09-03 14:17:29 +0000 - publish - DEBUG - [{'path': 'viritualisres.phonevr.ALVRActivityTest', 'start_line': 0, 'end_line': 0, 'annotation_level': 'warning', 'message': 'code/mobile/android/PhoneVR/app/build/outputs/androidTest-results/connected/debug/flavors/gvr/TEST-Pixel_2(AVD) - 11-_app-gvr.xml\u2003[took 1m 45s]', 'title': 'saveDeviceScreenBitmap (viritualisres.phonevr.ALVRActivityTest) failed', 'raw_details': "androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: view.getId() is <2131296742/viritualisres.phonevr:id/ui_settings_button>\n\nView Hierarchy:\n+>DecorView{id=-1, visibility=VISIBLE, width=1080, height=1920, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params={(0,0)(fillxfill) ty=BASE_APPLICATION wanim=0x10302fe\nfl=LAYOUT_IN_SCREEN LAYOUT_INSET_DECOR SPLIT_TOUCH HARDWARE_ACCELERATED DRAWS_SYSTEM_BAR_BACKGROUNDS\npfl=FO
2024-09-03 14:17:30 +0000 - urllib3.connectionpool - DEBUG - [https://api.github.com:443](https://api.github.com/) "POST /repos/alvr-org/PhoneVR/check-runs HTTP/11" 422 202
Traceback (most recent call last):
File "/Users/runner/work/_actions/EnricoMi/publish-unit-test-result-action/debug-checkrun-anotations/macos/../python/publish_test_results.py", line 546, in <module>
main(settings, gha)
File "/Users/runner/work/_actions/EnricoMi/publish-unit-test-result-action/debug-checkrun-anotations/macos/../python/publish_test_results.py", line 269, in main
Publisher(settings, gh, gha).publish(stats, results.case_results, conclusion)
File "/Users/runner/work/_actions/EnricoMi/publish-unit-test-result-action/debug-checkrun-anotations/python/publish/publisher.py", line 233, in publish
data = self.publish_check(data)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/runner/work/_actions/EnricoMi/publish-unit-test-result-action/debug-checkrun-anotations/python/publish/publisher.py", line 462, in publish_check
check_run = self._repo.create_check_run(name=self._settings.check_name,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/runner/work/PhoneVR/PhoneVR/enricomi-publish-action-venv/lib/python3.12/site-packages/github/Repository.py", line 3793, in create_check_run
headers, data = self._requester.requestJsonAndCheck(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/runner/work/PhoneVR/PhoneVR/enricomi-publish-action-venv/lib/python3.12/site-packages/github/Requester.py", line 537, in requestJsonAndCheck
return self.__check(*self.requestJson(verb, url, parameters, headers, input, self.__customConnection(url)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/runner/work/PhoneVR/PhoneVR/enricomi-publish-action-venv/lib/python3.12/site-packages/github/Requester.py", line [598](https://github.com/alvr-org/PhoneVR/actions/runs/10683954200/job/29613219448?pr=376#step:20:607), in __check
raise self.createException(status, responseHeaders, data)
github.GithubException.GithubException: 422 {"message": "Validation Failed", "errors": [{"resource": "CheckRun", "code": "invalid", "field": "annotations"}], "documentation_url": "https://docs.github.com/rest/checks/runs#create-a-check-run", "status": "422"}
Error: Process completed with exit code 1.
Issue fixed, please rerun with above debug branch.
Is there a chance to upload test result files
code/mobile/android/PhoneVR/app/build/outputs/androidTest-results/**/TEST-*.xml
as artifacts so I can inspect them?
Done. Re-run running at https://github.com/alvr-org/PhoneVR/actions/runs/10683954200/job/29642007254 just now (it will take some time 30-40mins to complete)
The test results will be available as a artifact in run/check summary, which should be after 30-40mins. For example, this run: https://github.com/alvr-org/PhoneVR/actions/runs/10678178487 's if you scroll down there are "Test Results" attachment.
Btw, thanks for your quick reply.
Seems Like the issue is solved in with the debug action. Just the timing seems like a little off
The test result file TEST-Pixel_2(AVD) - 11-_app-gvr.xml
says
<testsuite tests="0" failures="0" errors="0" skipped="0" time="1.725350038727E9" timestamp="2024-09-03T07:53:58" hostname="localhost">
So there is nothing the action can do about.
I will fix the None
path bug in main branch. Thanks for reporting!
Fix released.
Thankyou for your quick response :)
The error is stated in the Title. Repo Run: https://github.com/alvr-org/PhoneVR/actions/runs/10678178487 Repo: https://github.com/alvr-org/PhoneVR PR: https://github.com/alvr-org/PhoneVR/pull/376
Full Error: