bug: cordova run ios -> The "=" in the "--target" of cordova build command is missing

Đang mở
#4,723 1 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
ios, node.js, typescript
Lĩnh vực
cli, mobile-dev

Hướng nghiên cứu

Bắt đầu với việc xử lý đối số của cordova run ios và phần mã lắp ráp lệnh build Cordova, sau đó tái hiện lệnh được báo cáo với --target=... và kiểm tra đầu ra verbose. Hoàn tất khi lệnh được tạo ra giữ nguyên dạng = cho --target và quá trình chạy iOS tiếp tục mà không gặp lỗi native-run đã được báo cáo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

triage

Bug Report

Ionic version:
Ionic CLI : 6.16.3
Ionic Framework : @ionic/angular 5.6.9

Current behavior:
I have typed the following command
$ npx ionic cordova run ios --debug --livereload --device --buildConfig --target=92ca35bb8667caceedf9ca2447af64eca6f97d77 --verbose

In that case, I am getting the following error in the cordova build process.

2021-06-21 20:47:18.090 xcodebuild[4667:84952]  DTDKRemoteDeviceConnection: Failed to start remote service "com.apple.mobile.notification_proxy" on device. Error: Error Domain=com.apple.dtdevicekit Code=811 "Failed to start remote service "com.apple.mobile.notification_proxy" on device." UserInfo={NSUnderlyingError=0x7fa9bdb75890 {Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402653158 "The device is passcode protected." UserInfo={MobileDeviceErrorCode=(0xE800001A), com.apple.dtdevicekit.stacktrace=(

I am attaching the log at the end of this report.
The cordova build command is output in the log, but it is clearly "--target [device id]" and you can see that "=" is missing.

Finally, the app fails to run with an error in native-run.

[native-run] ERR_DEVICE_LOCKED: Device still locked after 1 minute. Aborting.
[ERROR] An error occurred while running subprocess native-run.

Expected behavior:
I can run apps on my iPhone connected to my Mac.

Other information:
package.json

{
  "name": "mg_answer_202106",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "https://ionicframework.com/",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "build:ios": "npx ionic cordova build ios --debug --buildConfig",
    "build:and": "npx ionic cordova build android --debug",
    "device:ios": "npx ionic cordova run ios --list",
    "device:and": "npx ionic cordova run android --list",
    "run:emu:ios": "npx ionic cordova run ios  --debug --livereload --emulator --buildConfig",
    "run:emu:and": "npx ionic cordova run android  --debug --livereload --emulator",
    "run:dev:ios": "npx ionic cordova run ios  --debug --livereload --device --buildConfig",
    "run:dev:and": "npx ionic cordova run android  --debug --livereload --device --no-build --no-native-run"
  },
  "private": true,
  "dependencies": {
    "@angular/common": "~12.0.1",
    "@angular/core": "~12.0.1",
    "@angular/forms": "~12.0.1",
    "@angular/platform-browser": "~12.0.1",
    "@angular/platform-browser-dynamic": "~12.0.1",
    "@angular/router": "~12.0.1",
    "@ionic-native/app-version": "^5.33.1",
    "@ionic-native/device": "^5.33.1",
    "@ionic-native/file": "5.33.1",
    "@ionic-native/http": "5.33.1",
    "@ionic/angular": "^5.5.2",
    "@ionic/cli": "6.16.3",
    "cordova": "10.0.0",
    "ios-deploy": "1.11.4",
    "native-run": "1.4.0",
    "rxjs": "~6.6.0",
    "tslib": "^2.0.0",
    "zone.js": "~0.11.4"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~12.0.1",
    "@angular-eslint/builder": "~12.0.0",
    "@angular-eslint/eslint-plugin": "~12.0.0",
    "@angular-eslint/eslint-plugin-template": "~12.0.0",
    "@angular-eslint/template-parser": "~12.0.0",
    "@angular/cli": "~12.0.1",
    "@angular/compiler": "~12.0.1",
    "@angular/compiler-cli": "~12.0.1",
    "@angular/language-service": "~12.0.1",
    "@ionic/angular-toolkit": "^4.0.0",
    "@types/jasmine": "~3.6.0",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "^12.11.1",
    "@typescript-eslint/eslint-plugin": "4.16.1",
    "@typescript-eslint/parser": "4.16.1",
    "cordova-android": "^9.1.0",
    "cordova-browser": "^6.0.0",
    "cordova-ios": "^6.2.0",
    "cordova-plugin-advanced-http": "^3.1.0",
    "cordova-plugin-app-version": "^0.1.12",
    "cordova-plugin-device": "^2.0.3",
    "cordova-plugin-file": "^6.0.2",
    "cordova-plugin-ionic-keyboard": "^2.0.5",
    "cordova-plugin-ionic-webview": "^4.0.0",
    "cordova-plugin-splashscreen": "5.0.2",
    "cordova-plugin-statusbar": "2.4.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "eslint": "^7.6.0",
    "eslint-config-prettier": "8.3.0",
    "eslint-plugin-import": "2.22.1",
    "eslint-plugin-jsdoc": "30.7.6",
    "eslint-plugin-prefer-arrow": "1.2.2",
    "jasmine-core": "~3.7.1",
    "jasmine-spec-reporter": "~5.0.0",
    "karma": "~6.3.2",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage": "~2.0.3",
    "karma-coverage-istanbul-reporter": "~3.0.2",
    "karma-jasmine": "~4.0.0",
    "karma-jasmine-html-reporter": "^1.5.0",
    "prettier": "2.3.1",
    "protractor": "~7.0.0",
    "ts-node": "~8.3.0",
    "typescript": "~4.2.4"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-whitelist": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-file": {},
      "cordova-plugin-advanced-http": {},
      "cordova-plugin-device": {},
      "cordova-plugin-app-version": {}
    },
    "platforms": [
      "ios",
      "android",
      "browser"
    ]
  }
}

Ionic info:

$ npx ionic info
Ionic:

   Ionic CLI                     : 6.16.3
   Ionic Framework               : @ionic/angular 5.6.9
   @angular-devkit/build-angular : 12.0.4
   @angular-devkit/schematics    : 12.0.4
   @angular/cli                  : 12.0.4
   @ionic/angular-toolkit        : 4.0.0

Cordova:

   Cordova CLI       : 10.0.0
   Cordova Platforms : 6.0.0, android 9.1.0, browser, ios 6.2.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 7 other plugins)

Utility:

   cordova-res : not installed globally
   native-run  : 1.4.0

System:

   ios-deploy : 1.11.4
   ios-sim    : 8.0.2
   NodeJS     : v16.0.0 (/Users/tns-macmini/.nvm/versions/node/v16.0.0/bin/node)
   npm        : 7.10.0
   OS         : macOS Catalina
   Xcode      : Xcode 12.4 Build version 12D4e

log.txt

Ngôn ngữ chính
TypeScript
Star
2k
Fork
681
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ionic-team/ionic-cli

Tất cả issue của ionic-team/ionic-cli

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.