Skip to content

iOS 13 - Could not start service com.apple.mobile.house_arrest #4741

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
JakeAi opened this issue Jun 18, 2019 · 37 comments
Closed

iOS 13 - Could not start service com.apple.mobile.house_arrest #4741

JakeAi opened this issue Jun 18, 2019 · 37 comments
Assignees
Labels
debug os: ios run Describes issues related to run command
Milestone

Comments

@JakeAi
Copy link

JakeAi commented Jun 18, 2019

Environment

  • MacOS: Catalina and Mojave
  • XCode: 11
  • iOS: 13
  • CLI: 5.4.1
  • Cross-platform modules: 5.4.0
  • Android Runtime: 5.4.0
  • iOS Runtime: 5.4.2
  • Plugin(s): none

Describe the bug
Creating a brand new app or an existing app produces the following error

Installing on device 00008020-000A555236900000...
Unable to apply changes on device: 00008020-000A555236900000. Error is: Could not start service com.apple.mobile.house_arrest.

To Reproduce
Create a new project, tns debug ios

Expected behavior
App to build and debug

Additional context
I can build the app fine, I can run the app through XCode fine. And it works on iOS 13 Simulators

@rosen-vladimirov rosen-vladimirov added debug os: ios run Describes issues related to run command labels Jun 18, 2019
@JakeAi
Copy link
Author

JakeAi commented Jun 19, 2019

I reformatted my Mac and my iPhone with a fresh restore and no restore from backup.
I get the same problem. Here is a log trade towards the end.

Application com.minnichmfg.minnichmonitor has been uninstalled successfully.
Project dir from hooksArgs is: undefined.
Hooks directories: [ '/Users/jake/Documents/GitHub/MinnichMonitor/hooks' ]
BeforeHookName for command install is before-install
Installing /Users/jake/Documents/GitHub/MinnichMonitor/platforms/ios/build/Debug-iphoneos/MinnichMonitor.ipa on devices with identifiers: 00008020-000A55523690003A.
Received multiple results:
{ '00008020-000A55523690003A':
   [ { deviceId: '00008020-000A55523690003A',
       response: 'Successfully installed application' } ] }
Project dir from hooksArgs is: undefined.
Hooks directories: [ '/Users/jake/Documents/GitHub/MinnichMonitor/hooks' ]
AfterHookName for command install is after-install
Uploading files:
[ { source:
     '/Users/jake/Documents/GitHub/MinnichMonitor/platforms/ios/build/Debug-iphoneos/.nsbuildinfo',
    destination: 'Library/Application Support/LiveSync/.nsbuildinfo' } ]
For application com.minnichmfg.minnichmonitor on device with identifier: 00008020-000A55523690003A.
Error while executing ios device operation: Could not start service com.apple.mobile.house_arrest with code: -402653057
Unable to apply changes on device: 00008020-000A55523690003A. Error is: Could not start service com.apple.mobile.house_arrest.
Will emit event liveSyncError with data { error:
   { code: -402653057,
     deviceId: '00008020-000A55523690003A',
     message: 'Could not start service com.apple.mobile.house_arrest' },
  deviceIdentifier: '00008020-000A55523690003A',
  projectDir: '/Users/jake/Documents/GitHub/MinnichMonitor',
  applicationIdentifier: 'com.minnichmfg.minnichmonitor' }

@JakeAi
Copy link
Author

JakeAi commented Jun 20, 2019

Tested on fresh reformat and installs of Catalina and Mojave. Using iOS 13 Beta 2.

What are you waiting for? Grab that Xcode 11 beta and iOS 13 beta and get to work on the next great NativeScript app!

What is the point of the blog post https://www.nativescript.org/blog/ios-13-sign-in-with-apple-ipados-and-arkit-3-all-on-nativescript if nothing works on iOS 13? lol

@rosen-vladimirov
Copy link
Contributor

Hey @JakeAi ,
Thank you for reporting this unexpected behavior. Please note that Xcode's Beta versions are not officially supported as Apple often break different things even between Beta versions.

However, we would like to investigate this case with your help. In order to have a better idea what does this error mean, I want to give a brief overview of the way NativeScript CLI works with iOS Devices.
NativeScript CLI uses several binary files coming directly from your macOS and calls their methods in order to work with the devices. Some operations, like starting application on iOS device, requires mounting a specific developer image on the device (consider this as enabling developer mode on the device). This image comes directly from Xcode and it is different for each iOS version. Whenever a new iOS is released (as it is the case with iOS 13 Beta), a new Xcode version must be used in order to get the developer image for this iOS version from it. In case there's no matching developer image, the latest available one is used. In most of the cases this leads to the error you've faced.
The way CLI looks for this image is by getting the path to Xcode from the output of xcode-select -print-path and constructs the path to the images from it.

So as a first step in our investigation, can you please execute xcode-select -print-path and ensure the printed path points to your Xcode 11 Beta instance?

@JakeAi
Copy link
Author

JakeAi commented Jun 20, 2019

@rosen-vladimirov It does, that is the only way {N} would work is if I used xcode-select --switch. And on my reformat I ONLY installed the beta.

/Applications/Xcode-beta.app/Contents/Developer

@rosen-vladimirov
Copy link
Contributor

Ok, so the next step is to try restarting the device. I know it sounds weird, but in case there's already mounted incorrect image, the restart will disable it and the new run command should mount the correct one.

@JakeAi
Copy link
Author

JakeAi commented Jun 25, 2019

@rosen-vladimirov this doesn't fix the problem. I have done this multiple times.

Uninstalling com.minnichmfg.Monitor from devices with identifiers: 00008020-000A55523690003A.
Received multiple results:
{ '00008020-000A55523690003A':
   [ { deviceId: '00008020-000A55523690003A',
       response: 'Successfully uninstalled application' } ] }
Application com.minnichmfg.Monitor has been uninstalled successfully.
Project dir from hooksArgs is: undefined.
Hooks directories: [ '/Users/jake/Documents/GitHub/Monitor/hooks' ]
BeforeHookName for command install is before-install
Installing /Users/jake/Documents/GitHub/Monitor/platforms/ios/build/Debug-iphoneos/Monitor.ipa on devices with identifiers: 00008020-000A55523690003A.
Received multiple results:
{ '00008020-000A55523690003A':
   [ { deviceId: '00008020-000A55523690003A',
       response: 'Successfully installed application' } ] }
Project dir from hooksArgs is: undefined.
Hooks directories: [ '/Users/jake/Documents/GitHub/Monitor/hooks' ]
AfterHookName for command install is after-install
Uploading files:
[ { source:
     '/Users/jake/Documents/GitHub/Monitor/platforms/ios/build/Debug-iphoneos/.nsbuildinfo',
    destination: 'Library/Application Support/LiveSync/.nsbuildinfo' } ]
For application com.minnichmfg.Monitor on device with identifier: 00008020-000A55523690003A.
Error while executing ios device operation: Could not start service com.apple.mobile.house_arrest with code: -402653057
Unable to apply changes on device: 00008020-000A55523690003A. Error is: Could not start service com.apple.mobile.house_arrest.
Will emit event liveSyncError with data { error:
   { code: -402653057,
     deviceId: '00008020-000A55523690003A',
     message: 'Could not start service com.apple.mobile.house_arrest' },
  deviceIdentifier: '00008020-000A55523690003A',
  projectDir: '/Users/jake/Documents/GitHub/Monitor',
  applicationIdentifier: 'com.minnichmfg.Monitor' }
Project dir from hooksArgs is: /Users/jake/Documents/GitHub/Monitor.
Hooks directories: [ '/Users/jake/Documents/GitHub/Monitor/hooks' ]
AfterHookName for command watch is after-watch
Executing after-watch hook at location /Users/jake/Documents/GitHub/Monitor/hooks/after-watch/nativescript-dev-sass.js in-process
Validating after-watch arguments.
Executing after-watch hook at location /Users/jake/Documents/GitHub/Monitor/hooks/after-watch/nativescript-dev-typescript.js in-process
Validating after-watch arguments.
Executing after-watch hook at location /Users/jake/Documents/GitHub/Monitor/hooks/after-watch/nativescript-dev-webpack.js in-process
Validating after-watch arguments.
Stopping webpack watch for platform iOS.

@sifex
Copy link

sifex commented Jun 29, 2019

Same problem

@JakeAi
Copy link
Author

JakeAi commented Jul 2, 2019

@sifex I’ve yet to figure it out.

@sifex
Copy link

sifex commented Jul 2, 2019

@sifex I’ve yet to figure it out.

I'd say wait for Dev Beta 3 to determine whether this is an issue worth fixing

@JakeAi
Copy link
Author

JakeAi commented Jul 2, 2019

@rosen-vladimirov @sifex Beta 3 did not fix the problem.

@JakeAi
Copy link
Author

JakeAi commented Jul 24, 2019

@sifex did you figure this out? I'm still left in the dark.

@Fatme
Copy link
Contributor

Fatme commented Jul 24, 2019

@JakeAi,

We're currently working on support for iOS 13 and will write here when we have more information about this issue.

@JakeAi
Copy link
Author

JakeAi commented Jul 24, 2019

@Fatme so it's not actually supported?

@NickIliev
Copy link
Contributor

@JakeAi iOS 13 is not officially released - there are a beta and a preview versions. We will support iOS 13 as soon as there is an official version released (which Apple claims should happen in the fall).

@silviudeac
Copy link

Replicates on Beta 4.

It seems to originate from a method call in IOSDeviceLib to start the com.mobile.house_arrest service.

AMDeviceStartService(devices[device_identifier].device_info, cf_service_name, &socket, NULL);

Converting the resulting error code '-402653057' to hex results in '0xe800007f' which according to this corresponds to 'Device doesn't support wireless sync'.

Tried enabling iTunes Wi-Fi sync as a possible workaround but without success, as this option does not exist anymore in Settings on iOS 13, probably because it was replaced with Finder in Catalina.

@JakeAi
Copy link
Author

JakeAi commented Jul 25, 2019

@NickIliev right. I have iOS 13 Beta on my iPhone and thought it'd be good to get the app updated to the next iOS, also referring to https://www.nativescript.org/blog/ios-13-sign-in-with-apple-ipados-and-arkit-3-all-on-nativescript

What are you waiting for? Grab that Xcode 11 beta and iOS 13 beta and get to work on the next great NativeScript app!

@sifex
Copy link

sifex commented Jul 29, 2019

@sifex did you figure this out? I'm still left in the dark.

Nope, Xcode Beta 4 download didn't help either.

Replicates on Beta 4.

It seems to originate from a method call in IOSDeviceLib to start the com.mobile.house_arrest service.

AMDeviceStartService(devices[device_identifier].device_info, cf_service_name, &socket, NULL);

Converting the resulting error code '-402653057' to hex results in '0xe800007f' which according to this corresponds to 'Device doesn't support wireless sync'.

Tried enabling iTunes Wi-Fi sync as a possible workaround but without success, as this option does not exist anymore in Settings on iOS 13, probably because it was replaced with Finder in Catalina.

It'd be worth deep diving into why this is happening - regarding how debugging works between {N} run/debug and iOS, as release seems to work fine.

Both run/debug and release fail to launch the app, so possibly to do with API changes on how Xcode opens newly built apps.

@yoat
Copy link

yoat commented Sep 23, 2019

@miroslavaivanova I'm still getting this with the public (non-Beta) Xcode 11 and an iPhone with iOS 13. Is the fix specific to NativeScript 6? I am using NS 5.4. Is there anything about the specific "com.apple.mobile.house_arrest" service failure that you can tell me for NS 5.4?

@Fatme
Copy link
Contributor

Fatme commented Sep 23, 2019

@yoat,

The issue is fixed in NativeScript v6.1.0. It is expected to see the error with NativeScript 5.4. You can find more information how to update to NativeScript v6.0
here.

@thomas-alrek
Copy link

thomas-alrek commented Sep 24, 2019

@Fatme I am still experiencing this issue in NativeScript v6.1.2 with iOS 13 devices and Xcode 11.

If I build the project, and then launch it through Xcode, it works, but this makes the development experience very crippled, as I can't use HMR anymore.

@Fatme
Copy link
Contributor

Fatme commented Sep 24, 2019

@thomas-alrek,

Can you execute the command with --log trace and send us the output?

@thomas-alrek
Copy link

@Fatme Uhm, okay, so this is strange. When I run it with --log trance it actually works.

@Nevaan
Copy link

Nevaan commented Sep 24, 2019

I am facing the same issue, but --log trace is not working neither. But I can build it and run via xcode

@nik1st
Copy link

nik1st commented Sep 25, 2019

Same issue, I can't install application with tns debug ios or tns run ios

@jalbatross
Copy link

@yoat,

The issue is fixed in NativeScript v6.1.0. It is expected to see the error with NativeScript 5.4. You can find more information how to update to NativeScript v6.0
here.

Is there any plan moving forward to get this issue fixed for NS5.4, or is the fix to just move to NS6?

@Fatme
Copy link
Contributor

Fatme commented Sep 26, 2019

@jalbatross,

We don't plan to fix it for NS 5.4. The only way is updating to NS 6.1.x.

@saihtethtet
Copy link

saihtethtet commented Sep 30, 2019

I got below error after install ios version 13.1. Nativescript vesion is 5.2.1
Error is: Could not start service com.apple.mobile.house_arrest.
Please, tell me how to fixed when someone face that error.

@Who-Code
Copy link

Who-Code commented Oct 2, 2019

I get the same error on newest NS 6.1 any solutions, this issue makes developing currently quite buggy

@Ivanepp2
Copy link

Ivanepp2 commented Oct 2, 2019

Same issue. Error is: Could not start service com.apple.mobile.house_arrest.

MacOS: Mojave
XCode: 11.0.0
iOS: 13.1
TNS version: 5.2.4
Android Runtime: 5.4.0
iOS Runtime: 5.2.1

@yoat
Copy link

yoat commented Oct 2, 2019

@Ivanepp2 see @Fatme 's comment above: NS 5.x will not be supported. We have to upgrade to NS 6.x to get on-device iOS 13 debugging re-enabled.

@Who-Code
Copy link

Who-Code commented Oct 7, 2019

Same issue. Error is: Could not start service com.apple.mobile.house_arrest.

MacOS: Mojave
XCode: 11.0.0
iOS: 13.1
TNS version: 6.0.2
Android Runtime: 6.0.2
iOS Runtime: 6.0.2

Any ideas or help for solving this.

@Fatme
Copy link
Contributor

Fatme commented Oct 7, 2019

@rkeller1,

See this comment #4741 (comment)

@salvadorcoronel
Copy link

salvadorcoronel commented Oct 24, 2019

MacOS: Catalina 10.15
XCode: Release 11.1
iOS Device: 13.1.2
TNS Version: 5.4.2

Same issue: Could not start service com.apple.mobile.house_arrest with code: -402653057

Error while executing ios device operation: Could not start service com.apple.mobile.house_arrest with code: -402653057 Unable to apply changes on device: 00008020-000C1C260138002E. Error is: Could not start service com.apple.mobile.house_arrest. Will emit event liveSyncError with data { error: { code: -402653057, deviceId: '00008020-000C1C260138002E', message: 'Could not start service com.apple.mobile.house_arrest' }, deviceIdentifier: '00008020-000C1C260138002E', projectDir: '../path_project, applicationIdentifier: 'bundleId' }

@DimitarTachev
Copy link
Contributor

@salvadorcoronel,

You are using [email protected]. See this comment #4741 (comment)

@salvadorcoronel
Copy link

salvadorcoronel commented Oct 25, 2019

@salvadorcoronel,

You are using [email protected]. See this comment #4741 (comment)

I am working on migration but an alternative that has worked in tns version v5.4.2 was...

cd $(npm config get prefix)/lib/node_modules/nativescript
npm install [email protected] [email protected]

@salvadorcoronel
Copy link

salvadorcoronel commented Oct 25, 2019

Same issue. Error is: Could not start service com.apple.mobile.house_arrest.

MacOS: Mojave
XCode: 11.0.0
iOS: 13.1
TNS version: 5.2.4
Android Runtime: 5.4.0
iOS Runtime: 5.2.1

@rkeller1 @Ivanepp2
try this alternative to tns 5.x See this comment: #4741 (comment)

@ihazar
Copy link

ihazar commented Oct 21, 2020

This fixes the "Could not start service com.apple.mobile.house_arrest" problem:

  1. Connect your device to your mac
  2. Open your iOS workspace in xcode
  3. Make sure your device is selected as the target platform and run the project from there (Xcode>Product>Run).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug os: ios run Describes issues related to run command
Projects
None yet
Development

No branches or pull requests