You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "GitToTheHub (via GitHub)" <gi...@apache.org> on 2026/10/26 03:40:38 UTC
[PR] fix(devicectl): retain USB discovery when listing fails [cordova-ios]
GitToTheHub opened a new pull request, #1745:
URL: https://github.com/apache/cordova-ios/pull/1745
### Platforms affected
iOS device discovery and automatic run destination selection.
### Motivation and Context
When `devicectl list` fails, or its output cannot be parsed into a device list, `devicectl` does not provide the expected JSON. Dereferencing `.json.result.devices` then throws a TypeError before USB discovery runs. Connected legacy USB devices consequently cannot be discovered through the existing fallback.
### Description
Check the command result and device-list shape before reading it. On failure, emit a diagnostic and continue with an empty devicectl list so USB discovery still runs. Successful wired-device selection and deduplication keep their existing behavior.
Add regression coverage for command failure, a subprocess error, missing JSON, a missing/invalid device list, and an empty successful result.
### Testing
- `npm run lint` passed.
- `npm run cover`: 371 specs, 0 failures, including macOS project creation/build checks.
- Failure injection confirms USB discovery runs and returns the fixture's three devices after devicectl failure.
- `git diff --check` passed.
### Checklist
- [x] Ran lint and the JavaScript test suite successfully
- [x] Added automated regression coverage
- [x] Commit uses the repository's `fix(devicectl):` convention (iOS-only repository)
- [x] No existing issue to link
- [x] Documentation changes are not needed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix(devicectl): retain USB discovery when listing fails [cordova-ios]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #1745:
URL: https://github.com/apache/cordova-ios/pull/1745#issuecomment-6407711637
## [Codecov](https://app.codecov.io/gh/apache/cordova-ios/pull/1745?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 75.77%. Comparing base ([`f9bb658`](https://app.codecov.io/gh/apache/cordova-ios/commit/f9bb658eff94169adb45791d61ca703d96259e9f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`ea54ea7`](https://app.codecov.io/gh/apache/cordova-ios/commit/ea54ea773c7e0706cc4854e15302169ea0b9eea6?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
> :exclamation: There is a different number of reports uploaded between BASE (f9bb658) and HEAD (ea54ea7). Click for more details.
>
> <details><summary>HEAD has 23 uploads less than BASE</summary>
>
>| Flag | BASE (f9bb658) | HEAD (ea54ea7) |
>|------|------|------|
>||24|1|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #1745 +/- ##
==========================================
- Coverage 82.72% 75.77% -6.96%
==========================================
Files 17 17
Lines 5234 5242 +8
==========================================
- Hits 4330 3972 -358
- Misses 904 1270 +366
```
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/cordova-ios/pull/1745?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org