Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

APIEpicFail

#144

When trying to archive apps from phone with ideviceinstaller -a I get this error every time:

Archive - TakingInstallLock (0%)
Archive - EmptyingApplication (2%)
Archive - Error occured: APIEpicFail

Versions used:

ideviceinstaller-ba6d098b6fe12ecdb0cde2c283ff77d2a8a22a06
sbmanager-c2cfddae8fabbb80f8d1b85abf3cea84b13355c8
usbmuxd-1.0.4
libimobiledevice-1.0.1

Reported by Toni · May 28th, 2010 @ 08:43 AM

State: invalid
Milestone: 1.2.0 Release
Assigned to: Nikias Bassen Nikias Bassen

Activity

  1. Martin S.
    Martin S.
    • Milestone set to 1.2.0 Release
    • Tag set to api, ideviceinstaller, installation_proxy
    • State changed from new to open
    • What app exactly do you attempt to archive?

    For instance, some apps installed on jailbroken devices (cydia etc.) can not be archived. In general that would be apps which have not been installed using the "native" way onto the device.

    • Which device and iPhone OS version?

    APIEpicFail is returned if the device receives impossible actions (like archiving Cydia as noted above).

    May 28th, 2010 @ 08:56 AM

  2. Toni
    Toni

    Hello Martin!

    My iPhone is not jailbroken and so forth I don't have cydia installed

    I tried to archive several apps like:

    Skype 1.3.0.275
    Subnet Calc 1.5
    Level 1.1
    Opera Mini 1.0.2

    My phone is 3G ()model MB489KS and OS 3.1.3

    May 28th, 2010 @ 09:26 AM

  3. Martin S.
    Martin S.

    Thanks for the information.
    Could you please supply a log running ideviceinstaller additionally with the "-D" option? It will output the whole communication so we can track down what happens.

    May 28th, 2010 @ 10:07 AM

  4. Martin S.
    Martin S.
    • Assigned user changed from Martin S. to Nikias Bassen

    Adding Nikias to the bunch. :)

    May 28th, 2010 @ 10:09 AM

  5. Toni
    Toni

    As requested:

    There are three logs in the same file, commands witch were run at this order:

    ideviceinstaller -D
    ideviceinstaller -Dl
    ideviceinstaller -D -a com.skype.skype

    May 28th, 2010 @ 10:29 AM

  6. Toni
    Toni

    sorry about typo:

    commands which were run

    -toni-

    May 28th, 2010 @ 10:30 AM

  7. Nikias Bassen
    Nikias Bassen

    OK, could you please do the following:
    run idevicesyslog on one terminal
    then run ideviceinstaller -D -a com.skype.skype on another terminal
    and then copy both outputs to separate logfiles you then post here ;)

    May 28th, 2010 @ 11:36 AM

  8. Toni
    Toni

    Hello Niklas!

    As requested:

    syslog and installerlog

    May 28th, 2010 @ 11:54 AM

  9. Martin S.
    Martin S.

    The issue is clearly this:

    Fri May 28 14:51:54 unknown mobile_installationd[3608] <Error>: 00808a00 store_binary_dict: Could not create /private/var/mobile/Library/MobileInstallation/ArchivedApplications.plist: Permission denied
    Fri May 28 14:51:54 unknown mobile_installationd[3608] <Error>: 00808a00 : stat /private/var/mobile/Library/MobileInstallation/ArchivedApplications.plist uid=0 gid=501 p=100644
    Fri May 28 14:51:54 unknown mobile_installationd[3608] <Error>: 00808a00 : stat /private/var/mobile/Library/MobileInstallation uid=501 gid=501 p=40755
    Fri May 28 14:51:54 unknown mobile_installationd[3608] <Error>: 00808a00 MobileInstallationArchive: Could not store /private/var/mobile/Library/MobileInstallation/ArchivedApplications.plist
    Fri May 28 14:51:54 unknown mobile_installationd[3608] <Error>: 00808a00 handle_archive: API failed
    

    It is unable to write the ArchivedApplications.plist file on your device. Why it fails to do so is a different question... ;)

    May 28th, 2010 @ 12:18 PM

  10. Toni
    Toni

    I agree, fortunately I don't have to figure that out ;)

    Please let me know if I can assist in any way however...

    May 28th, 2010 @ 12:27 PM

  11. Martin S.
    Martin S.

    You might try to think of why it can't do that to help. This is certainly your device filesystem permissions being screwed up for some reason and this is not an ideviceinstaller bug. ;)

    Did you ever sync apps with iTunes?
    Did you update or did you restore to 3.1.3? If you did, from which previous OS version?
    Can you think of anything you did (or even forget to do compared to iTunes app sync) related to apps?

    May 28th, 2010 @ 12:37 PM

  12. Toni
    Toni

    Okay here are some background:

    When I bought this phone it had OS version 2.0
    Almost the first thing I did ( after using it couple of months ) was jailbreak with pwnage.
    After Apple released 2.5 ( ? or something like that ) I restored the phone and upgraded to that version.
    Since that I have only had official OS version installed. Of course I have upgrade first to OS 3.0 and then OS 3.1.3

    I do sync the phone regularly with iTunes ( Mac version ), some of the apps are purchased with iTunes and then installed to the iphone. All the apps appear in the iTunes.

    I can't think any strange functioning going on, sorry but I don't think this has helped you very much...

    May 28th, 2010 @ 12:56 PM

  13. Martin S.
    Martin S.

    Ok, could you please try to "buy" whatever free app on your device, install it, then connect to iTunes and verify if iTunes "synced" that app/IPA file onto your computer please?

    According to what we see here this should fail.

    May 28th, 2010 @ 01:22 PM

  14. Toni
    Toni

    Just ahead of you !

    I did that, sync to iPhone worked like a charm.
    Then I tried to archive the app with ideviceinstall but that is no-go.

    Then I did purchase with iPhone, sync again, then archiving with ideviceinstall but... still error.

    Purchase and sync didn't make any difference.

    I'm leaving away for the weekend, but I do get back to this first thing on Monday morning.

    May 28th, 2010 @ 01:34 PM

  15. Nikias Bassen
    Nikias Bassen

    Hi,

    you can try the following.
    1. download the attached archive
    2. extract it, go to idevicefileinject and type make
    3. run ./idevicefileinject with your device plugged in
    4. wait for restore process to complete

    This will overwrite the file mentioned in the device's syslog with an empty one with correct ownership information.

    May 28th, 2010 @ 01:54 PM

  16. Nikias Bassen
  17. Toni
    Toni

    Good morning everyone!

    @Niklas:

    I did the procedure you instructed, but it's still no-go.

    Here is log file, if you can that there is something different this time.

    May 31st, 2010 @ 06:03 AM

  18. Nikias Bassen
    Nikias Bassen

    Hi,
    the log does not show anything different. Can you please create another log just as before using idevicesyslog ? This one showed the problem in detail last time.
    Thanks

    May 31st, 2010 @ 02:34 PM

  19. Toni
  20. Nikias Bassen
    Nikias Bassen

    Hi, nothing to see in the syslog... make sure to start idevicesyslog before running ideviceinstaller. If you did that, then there's no hint on what's going wrong in the syslog. Sorry. If you had jailbroken your device you could just check and change the permissions but it's up to you.

    June 1st, 2010 @ 02:52 PM

  21. Toni
    Toni

    Hi Niklas, as mentioned before this phone is not jailbroken any more. Maybe I'll just wait for the next update and try this again.

    Thank you all for your efforts.

    June 2nd, 2010 @ 05:45 AM

  22. Nikias Bassen
    Nikias Bassen
    • State changed from open to invalid

    OK I'm setting this ticket to invalid since the error is not libimobiledevice/ideviceinstaller-related.

    June 2nd, 2010 @ 07:04 AM

  23. Toni
    Toni

    I'll have to disagree on that since iTunes works just fine (sync, backup and restore). Also ideviceinstaller does list installed software and starts archiving but fails to finish it I do believe the error is very much ideviceinstaller-related.

    June 2nd, 2010 @ 07:32 AM

  24. Toni
    Toni

    I did recheck the last log file attached and for some reason it's different from the one on my disk.

    There for I did run these commands again:

    First terminal:

    idevicesyslog > idevicesyslog.log

    Second terminal:

    ideviceinstaller -a com.logitech.TouchMouse

    The resulting log-file attached. Please consider looking into this before closing this ticket.

    June 2nd, 2010 @ 07:52 AM

  25. Martin S.
    Martin S.

    Hehe, judging from the last log, it's still a permission issue:

    Wed Jun  2 10:41:08 unknown mobile_installationd[594] <Error>: 00808a00 store_binary_dict: Could not create /private/var/mobile/Library/MobileInstallation/ArchivedApplications.plist: Permission denied
    Wed Jun  2 10:41:08 unknown mobile_installationd[594] <Error>: 00808a00 : stat /private/var/mobile/Library/MobileInstallation/ArchivedApplications.plist uid=0 gid=501 p=10064
    Wed Jun  2 10:41:08 unknown mobile_installationd[594] <Error>: 00808a00 MobileInstallationArchive: Could not store /private/var/mobile/Library/MobileInstallation/ArchivedApplications.plist
    Wed Jun  2 10:41:08 unknown mobile_installationd[594] <Error>: 00808a00 handle_archive: API failed
    Wed Jun  2 10:41:08 unknown mobile_installation_proxy[613] <Error>: handle_archive: Uninstallation failed
    

    Are you sure you can "install an app" on the device, then sync with iTunes and it will sync the app correctly onto your computer (and create an ipa file)?

    Also this is the request ideviceinstaller makes:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>ApplicationIdentifier</key>
        <string>com.skype.skype</string>
        <key>ClientOptions</key>
        <dict>
            <key>SkipUninstall</key>
            <true/>
        </dict>
        <key>Command</key>
        <string>Archive</string>
    </dict>
    </plist>
    

    It lists SkipUninstall:True, yet still the device appears to try to uninstall during archiving... why?

    I think the easiest fix for you might be to do an erase restore to 3.1.3 and retry it.
    It should fix permissions and traces you might have from older jailbreaks/modifications.

    June 2nd, 2010 @ 09:05 AM

  26. Toni
    Toni

    Hello Martin!

    Yes, I can install an app on iPhone, then sync it to iTunes, even arrange icons in the iTunes and then sync arranged set of icons back to iPhone.

    I tested this the other way around by installing an app into iTunes and then syncing it into iPhone.

    I did full backup and restore with iTunes, but that didn't make any difference. Is it even possible that this is somehow desktop OS related? I'm using Ubuntu 10.4, but I can install whatever OS necessary with VBox.

    Or then we just let this go, and I'll wait the next version and try that :)

    June 2nd, 2010 @ 09:21 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.