-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Mobilebackup2Service.Backup results in an exception with the message "InvalidService" #63
Comments
Good catch, and you're right I might have not been very smart about the way I put in the service name switching. Could you test #64 for me and see if that works? Let me know if there are still some other issues and I'll see what I can do about fixing them |
I will try to get to it this afternoon - may be tomorrow morning before I can, though. |
It got farther - this is probably a separate issue - but it failed to run the backup with this exception, now:
If it helps, it's a 9th gen iPad with iOS 18.1.1 on it. I tried a couple different arguments, tried reauthorizing the device... still came up with the same issue each time. |
Hmm that's odd, it's like it's just closing the AFC connection for no reason. One thing you could do to see if it will work is temporarily remove the InfoPlist creation which should be here, just replace it with I'll have to look on Monday as I'll have a few different iOS devices then to see what's going on. |
So a small update for you, I found some things and fixed them. However it still seems to be doing the same error, when we reach this creating the info plist: byte[] dataBuffer = await afc.GetFileContents(filePath, cancellationToken).ConfigureAwait(false) ?? [];```
The first time it runs and basically does what I expect, then the second time it comes to run the service has closed itself and I can't work out why yet. |
I fixed it 😄 turns out I'm stupid. @MarkFassett could you give this a test when you get a moment and check that it's working properly for you please? |
Oh - sorry for not seeing this - was working on a different project for a couple days :) I'll check it now. |
No worries, I did some more testing and it seems to be working properly now... I think Feel free to re-open or create a new issue if it's still a problem or there's something new 😄 |
We're having trouble with doing a backup using 2.0. It throws an exception every time trying to create the AFC service.
using var lockdown = MobileDevice.CreateUsingUsbmux(_deviceSerial, logger: logger, pairingRecordsCacheDir: Paths.PairingRecordsCacheDir); using var backupJob = new MobileBackup2Service(lockdown, logger); ... set up the callbacks ... await backupJob.backup(true, backupPath)
Stack Trace:
"error":"InvalidService","stacktrace":" at Netimobiledevice.Lockdown.LockdownClient.Request(String request, DictionaryNode options, Boolean verifyRequest) in ...\backupDevice\NetIMobileDevice\Netimobiledevice\Lockdown\LockdownClient.cs:line 162 at Netimobiledevice.Lockdown.LockdownClient.GetServiceConnectionAttributes(String name, Boolean useEscrowBag, Boolean useTrustedConnection) in ...\backupDevice\NetIMobileDevice\Netimobiledevice\Lockdown\LockdownClient.cs:line 128 at Netimobiledevice.Lockdown.LockdownClient.StartLockdownService(String name, Boolean useEscrowBag, Boolean useTrustedConnection) in ...\backupDevice\NetIMobileDevice\Netimobiledevice\Lockdown\LockdownClient.cs:line 531 at Netimobiledevice.Lockdown.LockdownService..ctor(LockdownServiceProvider lockdown, String serviceName, ServiceConnection service, Boolean useEscrowBag, ILogger logger) in ...\backupDevice\NetIMobileDevice\Netimobiledevice\Lockdown\LockdownService.cs:line 21 at Netimobiledevice.Afc.AfcService..ctor(LockdownServiceProvider lockdown, String serviceName, ILogger logger) in ...\backupDevice\NetIMobileDevice\Netimobiledevice\Afc\AfcService.cs:line 26 at Netimobiledevice.Afc.AfcService..ctor(LockdownServiceProvider lockdown, ILogger logger) in ...\backupDevice\NetIMobileDevice\Netimobiledevice\Afc\AfcService.cs:line 31 at Netimobiledevice.Backup.Mobilebackup2Service.Backup(Boolean fullBackup, String backupDirectory, CancellationToken cancellationToken) in ...\backupDevice\NetIMobileDevice\Netimobiledevice\Backup\Mobilebackup2Service.cs:line 381 at backupDevice.iOS.BackupiOS.Execute(String backupPath, String deviceIp) in ...\backupDevice\backupDevice\iOS\BackupiOS.cs:line 366","details":null}
When I look into it - even though we're doing USBMux (and not the remote one), it is using the AfcService constructor that uses the RSD_SERVICE_NAME, not LOCKDOWN_SERVICE_NAME. The other constructor has zero references.
The text was updated successfully, but these errors were encountered: