googlesamples / mlkit

A collection of sample apps to demonstrate how to use Google's ML Kit APIs on Android and iOS
Apache License 2.0
3.55k stars 2.93k forks source link

[Bug report] Can not build app #604

Closed fukemy closed 1 year ago

fukemy commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

Details

Unable to install "VisionExample"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402653103
User Info: {
    DVTErrorCreationDateKey = "2022-12-29 03:27:35 +0000";
    IDERunOperationFailingWorker = IDEInstalliPhoneLauncher;
}
--
Could not inspect the application package.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402653103
User Info: {
    DVTRadarComponentKey = 282703;
    MobileDeviceErrorCode = "(0xE8000051)";
    "com.apple.dtdevicekit.stacktrace" = (
    0   DTDeviceKitBase                     0x00000001170082bc DTDKCreateNSErrorFromAMDErrorCode + 300
    1   DTDeviceKitBase                     0x000000011703c3c0 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 136
    2   DVTFoundation                       0x0000000104e95ec8 DVTInvokeWithStrongOwnership + 76
    3   DTDeviceKitBase                     0x000000011703c144 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1196
    4   IDEiOSSupportCore                   0x0000000116627c08 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.147 + 2328
    5   DVTFoundation                       0x0000000104fa0784 __DVT_CALLING_CLIENT_BLOCK__ + 16
    6   DVTFoundation                       0x0000000104fa11f0 __DVTDispatchAsync_block_invoke + 152
    7   libdispatch.dylib                   0x00000001aab725f0 _dispatch_call_block_and_release + 32
    8   libdispatch.dylib                   0x00000001aab741b4 _dispatch_client_callout + 20
    9   libdispatch.dylib                   0x00000001aab7b8a8 _dispatch_lane_serial_drain + 668
    10  libdispatch.dylib                   0x00000001aab7c404 _dispatch_lane_invoke + 392
    11  libdispatch.dylib                   0x00000001aab86c98 _dispatch_workloop_worker_thread + 648
    12  libsystem_pthread.dylib             0x00000001aad34360 _pthread_wqthread + 288
    13  libsystem_pthread.dylib             0x00000001aad33080 start_wqthread + 8
);
}
--

Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_model" = "iPhone12,5";
    "device_osBuild" = "16.2 (20C5049e)";
    "device_platform" = "com.apple.platform.iphoneos";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = arm64;
    "operation_duration_ms" = 8496;
    "operation_errorCode" = "-402653103";
    "operation_errorDomain" = "com.apple.dt.MobileDeviceErrorDomain";
    "operation_errorWorker" = IDEInstalliPhoneLauncher;
    "operation_name" = IDEiPhoneRunOperationWorkerGroup;
    "param_consoleMode" = 0;
    "param_debugger_attachToExtensions" = 0;
    "param_debugger_attachToXPC" = 1;
    "param_debugger_type" = 5;
    "param_destination_isProxy" = 0;
    "param_destination_platform" = "com.apple.platform.iphoneos";
    "param_diag_MainThreadChecker_stopOnIssue" = 0;
    "param_diag_MallocStackLogging_enableDuringAttach" = 0;
    "param_diag_MallocStackLogging_enableForXPC" = 1;
    "param_diag_allowLocationSimulation" = 1;
    "param_diag_checker_tpc_enable" = 1;
    "param_diag_gpu_frameCapture_enable" = 0;
    "param_diag_gpu_shaderValidation_enable" = 0;
    "param_diag_gpu_validation_enable" = 0;
    "param_diag_memoryGraphOnResourceException" = 0;
    "param_diag_queueDebugging_enable" = 1;
    "param_diag_runtimeProfile_generate" = 0;
    "param_diag_sanitizer_asan_enable" = 0;
    "param_diag_sanitizer_tsan_enable" = 0;
    "param_diag_sanitizer_tsan_stopOnIssue" = 0;
    "param_diag_sanitizer_ubsan_stopOnIssue" = 0;
    "param_diag_showNonLocalizedStrings" = 0;
    "param_diag_viewDebugging_enabled" = 1;
    "param_diag_viewDebugging_insertDylibOnLaunch" = 1;
    "param_install_style" = 0;
    "param_launcher_UID" = 2;
    "param_launcher_allowDeviceSensorReplayData" = 0;
    "param_launcher_kind" = 0;
    "param_launcher_style" = 0;
    "param_launcher_substyle" = 0;
    "param_runnable_appExtensionHostRunMode" = 0;
    "param_runnable_productType" = "com.apple.product-type.application";
    "param_runnable_type" = 2;
    "param_testing_launchedForTesting" = 0;
    "param_testing_suppressSimulatorApp" = 0;
    "param_testing_usingCLI" = 0;
    "sdk_canonicalName" = "iphoneos16.1";
    "sdk_osVersion" = "16.1";
    "sdk_variant" = iphoneos;
}
--

System Information

macOS Version 12.6 (Build 21G115)
Xcode 14.1 (21534.1) (Build 14B47b)
Timestamp: 2022-12-29T10:27:35+07:00

To Reproduce Example Steps to reproduce the behavior in sample app:

  1. run pod install
  2. open xcodeworkspace
  3. run project

If applicable, please include code snippet and sample input(image, video, text, etc)

Screen Shot 2022-12-29 at 10 28 54

Expected behavior A clear and concise description of what you expected to happen.

SDK Info:

pod 'GoogleMLKit/BarcodeScanning', '3.2.0'
pod 'GoogleMLKit/FaceDetection', '3.2.0'
pod 'GoogleMLKit/ImageLabeling', '3.2.0'
pod 'GoogleMLKit/ImageLabelingCustom', '3.2.0'
pod 'GoogleMLKit/ObjectDetection', '3.2.0'
pod 'GoogleMLKit/ObjectDetectionCustom', '3.2.0'
pod 'GoogleMLKit/PoseDetection', '3.2.0'
pod 'GoogleMLKit/PoseDetectionAccurate', '3.2.0'
pod 'GoogleMLKit/SegmentationSelfie', '3.2.0'
pod 'GoogleMLKit/TextRecognition', '3.2.0'
pod 'GoogleMLKit/TextRecognitionChinese', '3.2.0'
pod 'GoogleMLKit/TextRecognitionDevanagari', '3.2.0'
pod 'GoogleMLKit/TextRecognitionJapanese', '3.2.0'
pod 'GoogleMLKit/TextRecognitionKorean', '3.2.0'

Smartphone:

Development Environment: (For Android issue feel free to skip this section)

robinmo commented 1 year ago

Try cmd+option+shift+k to clean build folder and run again

fukemy commented 1 year ago

tried but not working

miworking3 commented 1 year ago
  1. com.apple.dt.MobileDeviceErrorDomain suggest that it is related to a signing problem: https://stackoverflow.com/questions/64294387/unable-to-install-ios-app-on-device-domain-com-apple-dt-mobiledeviceerrordomai
  2. If you are getting this error when installing the app to a real device, you might try this solution by adding this part to the end of the Podfile and run pod deintegrate && pod install --repo-update again:
    # Disable signing for pods
    post_install do |installer|
    installer.generated_projects.each do |project|
    project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
         end
    end
    end
    end

    Xcode 14 change the behavior of signing for each pod bundles, this extra config will exempt you from signing them one by one. ML Kit will add this change on our next release, but for now, please use this change to work around the problems. Thanks.