Skip to content
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

MacLessManager #16

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Conversation

123FLO321
Copy link
Collaborator

@123FLO321 123FLO321 commented May 14, 2020

Description

  • Adds MacLessManager for restarting frozen devices
  • This is useful for 5S devices that get stuck regularly but not required for macless.
  • Automatically checks all connected devices.
  • Requires idevicediagnostics to be installed
  • Run in MacLessManager directory for help. swift run MacLessManager --help
  • Run in MacLessManager directory with: swift run MacLessManager --backend https://rdm.url --username bot --password password

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

}
self.logger.info("\(devices.count) devices connected")
guard let statusse = try? getAllDeviceStatusse(), !statusse.isEmpty else {
self.logger.error("Failed to laod statusse")
Copy link

@clburlison clburlison May 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

load status

while running {
runningLock.unlock()
guard let devices = try? getAllDevices(), !devices.isEmpty else {
self.logger.error("Failed to laod devices (or none connected)")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

load

@unseenmagik
Copy link

unseenmagik commented Jun 9, 2020

Been running the MacLessUIC PR now for a around 24hrs and I am getting this error after a few hours of the UIC running.

*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff32defb79 __exceptionPreprocess + 256
	1   libobjc.A.dylib                     0x00007fff5d5633c6 objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff32def9ab +[NSException raise:format:] + 193
	3   Foundation                          0x00007fff35001a88 -[NSConcreteTask launchWithDictionary:error:] + 3172
	4   MacLessManager                      0x00000001046e5084 $sSo6NSTaskC8ShellOutE10launchBash33_839723A297212BDF262C1834C3E29C1FLL4with12outputHandle05errorN0S2S_So06NSFileN0CSgAKtKF + 1844
	5   MacLessManager                      0x00000001046e4726 $s8ShellOut05shellB02to9arguments2at7process12outputHandle05errorI0S2S_SaySSGSSSo6NSTaskCSo06NSFileI0CSgANtKF + 1094
	6   MacLessManager                      0x00000001046e071b $s14MacLessManagerAAC13getAllDevices33_8B84F0D64675BF433CA51B1096360C7DLLSDyS2SGyKF + 875
	7   MacLessManager                      0x00000001046dc9fb $s14MacLessManagerAAC3run33_8B84F0D64675BF433CA51B1096360C7DLLyyF + 507
	8   MacLessManager                      0x00000001046dc38b $s14MacLessManagerAAC5startyyFyycfU_ + 27
	9   MacLessManager                      0x00000001046dc3cd $sIeg_IeyB_TR + 45
	10  libdispatch.dylib                   0x00007fff5ecda5f8 _dispatch_call_block_and_release + 12
	11  libdispatch.dylib                   0x00007fff5ecdb63d _dispatch_client_callout + 8
	12  libdispatch.dylib                   0x00007fff5ece18e0 _dispatch_lane_serial_drain + 602
	13  libdispatch.dylib                   0x00007fff5ece2396 _dispatch_lane_invoke + 385
	14  libdispatch.dylib                   0x00007fff5ecea6ed _dispatch_workloop_worker_thread + 598
	15  libsystem_pthread.dylib             0x00007fff5ef1b611 _pthread_wqthread + 421
	16  libsystem_pthread.dylib             0x00007fff5ef1b3fd start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6```


@unseenmagik
Copy link

Im getting this error and the UIC just stops.

2020-06-10 17:57:10.518 MacLessManager[68198:1379259] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Failed to set posix_spawn_file_actions for fd -1 at index 0 with errno 9'

@unseenmagik
Copy link

@123FLO321 Have you had any time to look at this error on MacLessManager ?
It runs for no more than an hour or so then crash....

image

@unseenmagik
Copy link

@123FLO321 The MaclessManager has been working flawless for me for months. Now I can't seem to get the manager to see the devices. The devices are connected, Xcode can see them iPhoneController and ideviceiagnostics can see them but the manager cannot. Any idea on this one ?
image

@unseenmagik
Copy link

unseenmagik commented Jan 6, 2021

@123FLO321 Trying to get this running on my new Catalina MacBook and im getting an error.
Any idea?
/Users/pokemon/RealDeviceMap-UIControl/MacLessManager/Sources/MacLessManager/main.swift:21:40: error: failed to produce diagnostic for expression; please file a bug report let frontendURL = CommandLine.arguments[frontendURLIndex + 1]

Using MacOS 10.15.7 - Catalina
Xcode 12.3

123FLO321 and others added 3 commits January 29, 2021 14:17
Sometimes it's not possible to fetch a name from a single udid from idevice-id --list. This causes error like "Failed to load devices (or none connected)"
For running in endless loop to handle NSException
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants