libimobiledevice / ideviceinstaller

Manage apps of iOS devices
https://libimobiledevice.org
GNU General Public License v2.0
1.25k stars 261 forks source link

AFC Write error: 30 #56

Open JasonHXiang opened 8 years ago

JasonHXiang commented 8 years ago

hi, something awkward happended. when I run 'ideviceinstaller -u -i wzry.ipa' in my terminal, log shows below:

WARNING: could not locate iTunesMetadata.plist in archive!
WARNING: could not locate Payload/wzry.app/SC_Info/wzry.sinf in archive!
Copying 'wzry.ipa' to device... AFC Write error: 30
Error: wrote only 0 of 1048576

what does AFC error code 30 stand for? how can I solve this? Thanks in advance

MarSoft commented 5 years ago

In my experience this might mean either that the device's storage is full, or that there is just some temporary issue which will vanish after several retries. Chances for this error are seemingly bigger when you do something on the device during installation. According to source code, error code 30 might mean AFC_E_MUX_ERROR: http://www.libimobiledevice.org/docs/html/afc_8h.html

nikias commented 5 years ago

MUX Error might also indicate a communication error caused by a bad cable. Can you run idevicesyslog in another terminal while trying to install?

vivek-git-checkout commented 1 year ago

If minimum version required by app is say 15 but iPhone had 14

vivek-git-checkout commented 1 year ago

Still getting this error. Works on some iphones but fails on some, even with iOS 16.3.1

ideviceinstaller --version ideviceinstaller 1.1.1

ZasadaTalosa commented 1 year ago

I had the same error on multiple iPhone models and iOS versions. As @nikias wrote before, in my case the problem was in bad cable and cable position. If the cable is not original (like mine) then you have to play with moving/bending the cable or rotating the plugin 180 degrees. Sounds like voodoo, but works for me. My colleague has the original cable and the same 'ideviceinstaller -i' command passes every time on his setup, I on the other hand have to find the "optimal position" of the cable.

MarSoft commented 1 year ago

It's not a voodoo, it's just bad quality electric contacts. If they are worse on one side than in another side of the connector then rotating it 180° will work

342261733 commented 1 year ago

Strange problem, just try again a few times then it works

chanchifan commented 1 year ago

when I update my mac to macos 13, this error happens

kraftydevil commented 1 year ago

I'm skeptical that the issue is always from a faulty cable or physical connection.

This error occurs somewhat randomly, but trying again in Xcode produces a successful install every time.

If the issue is with the cable, then how is Xcode able to install using the faulty connection?

This reminds me of the original NES cartridges where people thought you had to blow on it to get it to work - when really you just had to take it out / reinsert the cartridge and it didn't matter what you did in between trying again.

Update:

I've now also tried installing using the ios-deploy tool and it works every time. No errors with a sample set of 10 tries.

menvol3 commented 1 year ago

I have the same issue with my app. Also, I can confirm that using ios-deploy there were no errors during the app deploy

krishtoautomate commented 1 year ago

im using go-ios and i dont see any issue. with ideviceinstaller, yes iam facing issue

EthanArbuckle commented 11 months ago

I'm also encountering device connectivity issues (AFC_E_MUX_ERROR when installing apps, timeouts from idevicesyslog, etc.) after updating machines to Ventura.

This is happening consistently across a handful of (x86) Mac Minis and ~70 iPads, iOS versions 15.0 - 16.x. Using both first-party and third-party lightning cables.

These devices / cables / usb-hubs worked without issue on older macOS versions. The only change made to the setup was upgrading to Ventura.

I also confirm what someone above said: for whatever reason, ios-deploy has a higher success rate than ideviceinstaller.

I'll follow up here with debug logs, but nothing has stood out in my investigations thus far (aside from seeing a lot of timeouts):

Call graph:
    845 Thread_18925569   DispatchQueue_1: com.apple.main-thread  (serial)
      845 start  (in dyld) + 1903  [0x7ff81084841f]
        845 main  (in ideviceinstaller) + 5537  [0x10567cef5]
          845 afc_upload_dir  (in ideviceinstaller) + 438  [0x10567e308]
            845 afc_upload_dir  (in ideviceinstaller) + 438  [0x10567e308]
              845 afc_upload_dir  (in ideviceinstaller) + 455  [0x10567e319]
                845 afc_upload_file  (in ideviceinstaller) + 229  [0x10567e614]
                  845 afc_file_write  (in libimobiledevice-1.0.6.dylib) + 175  [0x1056fe5ca]
                    845 afc_receive_data  (in libimobiledevice-1.0.6.dylib) + 84  [0x1056fdaba]
                      845 service_receive_with_timeout  (in libimobiledevice-1.0.6.dylib) + 52  [0x1056facd1]
                        845 idevice_connection_receive_timeout  (in libimobiledevice-1.0.6.dylib) + 229  [0x1056fa5a2]
                          845 usbmuxd_recv_timeout  (in libusbmuxd-2.0.6.dylib) + 21  [0x1056e36d5]
                            845 socket_receive_timeout  (in libusbmuxd-2.0.6.dylib) + 36  [0x1056e5897]
                              845 socket_check_fd  (in libusbmuxd-2.0.6.dylib) + 248  [0x1056e56e2]
                                845 __select  (in libsystem_kernel.dylib) + 10  [0x7ff810b6c292]