Skip to content

NSCocoaErrorDomain 3840 #1776

Open
Open

Description

@lingyeliu678-oss

Guys, I'm running into this problem while using it. Do you know what could be causing it? I can't install the app properly - my IPA file won't workSideloadlyI installed the app normally, but I can't use italtstoreDo you know what's causing the problem with installing apps on my phone? I'm on iOS 26.5, and I got my IPA files through Demons Unpacker. I used another phone to download the apps I wanted, then unpacked them with Demons Unpacker, and sent the unpacked files over to my iOS 26 phone to install them, but they won't install properlyimageimage

Activity

  1. TaylorFan01313 commented on Sep 2, 2026

    @TaylorFan01313

    I got this a lot when my AltStore worked. Usually ending the task in task manager and relaunching it works

  2. ruthloose88 commented on Sep 2, 2026

    @ruthloose88

    I too am running into this error code on my iPhone and IPad. I am trying to refresh my AltStore app and uYourEnhanced. I am able to get the AltStore app to "reinstall" but sideloaded apps will not refresh.

    Here's the error log details:

    Debug Description
    Encountered unknown tag html on line 1

    Error Description
    The data couldn’t be read because it isn’t in the correct format.

    Failure Reason
    The data is not in the correct format.

    Title
    Failed to Refresh YouTube

    kCFPropertyListOldStyleParsingError
    Error Domain=NSCocoaErrorDomain Code=3840 "Malformed data byte group at line 1; invalid hex" UserInfo={NSDebugDescription=Malformed data byte group at line 1; invalid hex}

  3. koushik-09 commented on Sep 2, 2026

    @koushik-09
    1. Connect iphone to you pc/mac and open altserver in it.
    2. Now open the altstore app in iphone go to settings and sign out of apple account and close the app by removing it from recents
    3. open the altstore again and now from my apps section click on the days icon of the app that you want to refresh it will get refreshed
  4. Pranav593 commented on Sep 2, 2026

    @Pranav593

    I can vouch for this issue. When trying to click refresh or sideload an IPA file, I'm hit with the NSCocoaErrorDomain 3840 error. I've tried many 'solutions', but none of them have worked. Hopefully, this gets fixed soon.

    In the meantime, here are some workarounds I found:

    • If refreshing apps gives you the NSCocoaErrorDomain 3840 error, make sure you are on the same wifi as the server, go to the homescreen of your iPhone, swipe down, and search AltStore. You should see a shortcut next to the app icon called 'refresh all apps.' Click that, and it should work.

    • If downloading an IPA from your iPhone gives you the NSCocoaErrorDomain 3840 error, you can install it through your altstore server. Just follow these steps:

    1. Connect your iPhone to the Mac by cable.
    2. Click on the AltServer diamond in the menu bar.
    3. Hold the Option key
    4. The 'install altstore...' should be replaced by 'Sideload .ipa…'
    5. Choose your phone
    6. Select the IPA file
    7. Enter your credentials in the Apple ID prompt.

    That should work. The only downside is that you can't refresh the IPA anymore. You have to manually follow those steps each time the IPA expires.

  5. acoustic-git-tar commented on Sep 3, 2026

    @acoustic-git-tar

    Neither of these options work. I can't install Altstore on my iPhone 15 Pro anymore either:

    Image
  6. matmat37000 commented on Sep 3, 2026

    @matmat37000

    Neither of AltDaemon nor AltServer works and following the options above doesn't work either, even with different ansiette server. I can't log in or refresh apps. I'm using AltStore Classic through AltStore PAL, not the beta.

    I'm using ios 17.5.1.

  7. pizzasdu83 commented on Sep 3, 2026

    @pizzasdu83

    same problem on iOS26, I could download altstore, but i can't anymore :/

  8. iywdde commented on Sep 3, 2026

    @iywdde

    Same error, tried other mac + fresh altserver install, other iphone, hotspot,vpn, nothing works, interesting to know Sidestore had the same error when try to login in app, so this error maybe is caused by the 2FA or something else related to apple servers and login communication

    Temporally its possible to install .ipa from iloader until this issue is solved

  9. mnlsrv commented on Sep 3, 2026

    @mnlsrv

    Seems a 503 from Apple's GrandSlam API.

    Task <...>.<18> sent request, body S 2184
    Task <...>.<18> received response, status 503 content K
    Task <...>.<18> summary for task success {response_status=503, response_bytes=477, ...}

    That's the auth POST to https://gsa.apple.com/grandslam/GsService2 - TLS handshake completed fine but the server returned 503 with a 477 byte body. A raw curl to the same endpoint gets a clean response from Apple, so the endpoint is reachable. It's specifically the authenticated GrandSlam request that's failing server-side.

  10. MeemeeLab commented on Sep 3, 2026

    @MeemeeLab

    Hitting same issue on iPad OS 26.2 for past week. I'm not being able to refresh my apps and it's now expired.

    Received auth response status code: 503

  11. ruthloose88 commented on Sep 3, 2026

    @ruthloose88

    I saw it posted on Reddit from a couple months ago but my temporary workaround solution has been a bit silly and also points to there being some sort of iPv6 issue possibly or Apple server issue. It involves enabling and disabling Airplane Mode while connected to the Mac with a USB cable.

    1. Connect device to Mac running AltServer with a USB cable
    2. Open AltStore on device
    3. Go to My Apps tab
    4. Go to Control Center and Enable Airplane Mode briefly
    5. Disable Airplane Mode and wait for WiFi to reestablish a connection to local network
    6. Hit Refresh All (it may take a couple of attempts if the WiFi is still connecting
    7. This should allow any sideloaded apps to refresh very slowly
  12. TaylorFan01313 commented on Sep 3, 2026

    @TaylorFan01313

    Neither of these options work. I can't install Altstore on my iPhone 15 Pro anymore either:

    Image

    Same here. I missed the window for the refresh and can't install AltStore now either. So can't sign out of it

  13. francomendoza commented on Sep 3, 2026

    @francomendoza

    I saw it posted on Reddit from a couple months ago but my temporary workaround solution has been a bit silly and also points to there being some sort of iPv6 issue possibly or Apple server issue. It involves enabling and disabling Airplane Mode while connected to the Mac with a USB cable.

    1. Connect device to Mac running AltServer with a USB cable
    2. Open AltStore on device
    3. Go to My Apps tab
    4. Go to Control Center and Enable Airplane Mode briefly
    5. Disable Airplane Mode and wait for WiFi to reestablish a connection to local network
    6. Hit Refresh All (it may take a couple of attempts if the WiFi is still connecting
    7. This should allow any sideloaded apps to refresh very slowly

    this worked for me, thank you. unfortunately not able to update apps with this method though

  14. ruthloose88 commented on Sep 3, 2026

    @ruthloose88

    I have found the Airplane Mode workaround does not appear to work for me any longer. I tried it on both my iPad and iPhone running a VPN on both connected to a US server as well as not connected to a VPN (I am US based). I'm going to guess this is a greater Apple server or handshake issue.

  15. LoadRates commented on Sep 3, 2026

    @LoadRates

    I have tried logging out of alt server Apple ID and now trying to login again and failed to do so. It says every time I click sign in:

    Failed to Log In

    The data couldn't be read because it isn't in the correct format.

  16. 48 remaining items

  17. kisnner26 commented on Sep 8, 2026

    @kisnner26

    @angel-knights Glad that worked, and thank you for reporting back — that's 1.6.2 on 10.15 confirmed, which I could verify only up to the signature check from here. Your two notes are worth pulling out because they'll catch other people:

    • The support folder path differs by version. On 1.6.2 it's ~/Library/Application Support/com.rileytestut.AltServer; newer builds use ~/Library/Application Support/AltServer.
    • Rebooting the phone after the manual sideload. @infamousdimsum hit the same thing earlier in this thread, so that's two independent reports — if a freshly sideloaded AltStore keeps throwing the same error, reboot the device before assuming the patch failed.

    I've added both to the consolidated write-up in #1699.


    @Sebastin3244 Here it is step by step:

    1. Quit AltServer — right-click its icon in the system tray (bottom-right, near the clock) and choose Quit. It has to be closed or the file is locked.
    2. Press Start, type powershell, then right-click "Windows PowerShell" and choose Run as administrator. This matters — the script writes into Program Files and will fail without it.
    3. Copy the whole block below, paste it into the blue PowerShell window (right-click pastes), and press Enter:
    $exe = "C:\Program Files\AltServer\AltServer.exe"
    if (!(Test-Path $exe)) { $exe = "C:\Program Files (x86)\AltServer\AltServer.exe" }
    if (!(Test-Path $exe)) { Write-Error "AltServer.exe not found - locate it and set `$exe manually"; exit 1 }
    
    $bytes = [System.IO.File]::ReadAllBytes($exe)
    $old = [System.Text.Encoding]::Unicode.GetBytes("akd/1.0 CFNetwork/978.0.7 Darwin/18.7.0")
    $new = [System.Text.Encoding]::Unicode.GetBytes("AuthKit/1 (com.apple.dt.Xcode/3594.4.1)")
    
    $idx = -1
    for ($i = 0; $i -le $bytes.Length - $old.Length; $i++) {
        $match = $true
        for ($j = 0; $j -lt $old.Length; $j++) { if ($bytes[$i+$j] -ne $old[$j]) { $match = $false; break } }
        if ($match) { $idx = $i; break }
    }
    if ($idx -lt 0) { Write-Error "String not found - already patched, or a different AltServer version"; exit 1 }
    
    Copy-Item $exe "$exe.bak" -Force
    Write-Host "Backup: $exe.bak"
    
    [Array]::Copy($new, 0, $bytes, $idx, $new.Length)
    [System.IO.File]::WriteAllBytes($exe, $bytes)
    
    Write-Host ("Patched 1 occurrence at offset 0x{0:X}." -f $idx)
    1. You should see Backup: ... and Patched 1 occurrence at offset 0x14D6A8. If instead it says "String not found", either it's already patched or you have a version I haven't checked — say which version and I'll look.
    2. Reopen AltServer and sign in again.

    To undo at any point: delete AltServer.exe and rename AltServer.exe.bak back to AltServer.exe.


    @a7medpa Agreed, and that's the right end state — this shouldn't need manual patching. The changes are small and there are open PRs for all of them (AltSign#50, AltSign#51, and AltServer-Windows#51 for the Windows side). They're waiting on maintainer review rather than on anyone writing code. Adding a 👍 to those PRs is probably the most useful thing any of us can do at this point.

  18. BorbushArtem commented on Sep 8, 2026

    @BorbushArtem

    Windows ``
    First of all, a big thank you to @kisnner26.
    I’d just like to summarize, since a lot of things didn't work out for me.

    1. So, first.
      Run the PowerShell script.
      `$exe = @(
      "${env:ProgramFiles(x86)}\AltServer\AltServer.exe",
      "$env:ProgramFiles\AltServer\AltServer.exe"
      ) | Where-Object { Test-Path $_ } | Select-Object -First 1

    if (-not $exe) { Write-Error "AltServer.exe not found - pass the path manually."; exit 1 }
    Write-Host "Found: $exe"

    $bytes = [System.IO.File]::ReadAllBytes($exe)
    $old = [System.Text.Encoding]::Unicode.GetBytes("akd/1.0 CFNetwork/978.0.7 Darwin/18.7.0")
    $new = [System.Text.Encoding]::Unicode.GetBytes("AuthKit/1 (com.apple.dt.Xcode/3594.4.1)")

    if ($old.Length -ne $new.Length) { Write-Error "Length mismatch - aborting."; exit 1 }

    ISO-8859-1 maps bytes 0-255 to chars 1:1, so this round-trips losslessly.

    $latin1 = [System.Text.Encoding]::GetEncoding(28591)
    $hay = $latin1.GetString($bytes)
    $needle = $latin1.GetString($old)
    $idx = $hay.IndexOf($needle, [System.StringComparison]::Ordinal)

    if ($idx -lt 0) {
    Write-Host "String not found - already patched, or a different AltServer build."
    exit 0
    }
    if ($hay.IndexOf($needle, $idx + 1, [System.StringComparison]::Ordinal) -ge 0) {
    Write-Error "More than one occurrence found - aborting so nothing unexpected is touched."
    exit 1
    }

    Copy-Item $exe "$exe.bak" -Force
    Write-Host "Backup: $exe.bak"

    [Array]::Copy($new, 0, $bytes, $idx, $new.Length)
    [System.IO.File]::WriteAllBytes($exe, $bytes)

    Write-Host ("Patched 1 occurrence at offset 0x{0:X}." -f $idx)
    Write-Host "Restart AltServer and sign in again."`

    1. After that, install the AltStore as you usually do. (AltServer- Install Altstore - Iphone...)
    2. So, AltStore should appear on your phone again, but you won't be able to log in using your Apple ID.
      Don't patch the Altstore.IPA
      Download the necessary .ipa files to your Windows PC (specifically, the apps you want to use on your phone). Place them on your system drive (for some reason, it didn't work on other drives). Launch the Altserver; In the Windows system tray, hold down Shift and right-click the AltServer icon.. Click "Sideload .ipa," select "iPhone....," and specify the path to where you saved the .ipa file. Wait for the installation to complete—it may take a while.
  19. a7medpa commented on Sep 8, 2026

    @a7medpa

    @angel-knights Glad that worked, and thank you for reporting back — that's 1.6.2 on 10.15 confirmed, which I could verify only up to the signature check from here. Your two notes are worth pulling out because they'll catch other people:

    • The support folder path differs by version. On 1.6.2 it's ~/Library/Application Support/com.rileytestut.AltServer; newer builds use ~/Library/Application Support/AltServer.
    • Rebooting the phone after the manual sideload. @infamousdimsum hit the same thing earlier in this thread, so that's two independent reports — if a freshly sideloaded AltStore keeps throwing the same error, reboot the device before assuming the patch failed.

    I've added both to the consolidated write-up in #1699.


    @Sebastin3244 Here it is step by step:

    1. Quit AltServer — right-click its icon in the system tray (bottom-right, near the clock) and choose Quit. It has to be closed or the file is locked.
    2. Press Start, type powershell, then right-click "Windows PowerShell" and choose Run as administrator. This matters — the script writes into Program Files and will fail without it.
    3. Copy the whole block below, paste it into the blue PowerShell window (right-click pastes), and press Enter:
    $exe = "C:\Program Files\AltServer\AltServer.exe"
    if (!(Test-Path $exe)) { $exe = "C:\Program Files (x86)\AltServer\AltServer.exe" }
    if (!(Test-Path $exe)) { Write-Error "AltServer.exe not found - locate it and set `$exe manually"; exit 1 }
    
    $bytes = [System.IO.File]::ReadAllBytes($exe)
    $old = [System.Text.Encoding]::Unicode.GetBytes("akd/1.0 CFNetwork/978.0.7 Darwin/18.7.0")
    $new = [System.Text.Encoding]::Unicode.GetBytes("AuthKit/1 (com.apple.dt.Xcode/3594.4.1)")
    
    $idx = -1
    for ($i = 0; $i -le $bytes.Length - $old.Length; $i++) {
        $match = $true
        for ($j = 0; $j -lt $old.Length; $j++) { if ($bytes[$i+$j] -ne $old[$j]) { $match = $false; break } }
        if ($match) { $idx = $i; break }
    }
    if ($idx -lt 0) { Write-Error "String not found - already patched, or a different AltServer version"; exit 1 }
    
    Copy-Item $exe "$exe.bak" -Force
    Write-Host "Backup: $exe.bak"
    
    [Array]::Copy($new, 0, $bytes, $idx, $new.Length)
    [System.IO.File]::WriteAllBytes($exe, $bytes)
    
    Write-Host ("Patched 1 occurrence at offset 0x{0:X}." -f $idx)
    1. You should see Backup: ... and Patched 1 occurrence at offset 0x14D6A8. If instead it says "String not found", either it's already patched or you have a version I haven't checked — say which version and I'll look.
    2. Reopen AltServer and sign in again.

    To undo at any point: delete AltServer.exe and rename AltServer.exe.bak back to AltServer.exe.


    @a7medpa Agreed, and that's the right end state — this shouldn't need manual patching. The changes are small and there are open PRs for all of them (AltSign#50, AltSign#51, and AltServer-Windows#51 for the Windows side). They're waiting on maintainer review rather than on anyone writing code. Adding a 👍 to those PRs is probably the most useful thing any of us can do at this point.

    Ended up just following those instructions. Worked perfectly, thank you. Liked the PRs you shared too.

  20. kisnner26 commented on Sep 8, 2026

    @kisnner26

    @BorbushArtem your version of the script is better than mine and I'd point people to it over the one I posted — checking both Program Files paths, asserting the length match before writing, and aborting if there's more than one occurrence are all things mine should have done. The ISO-8859-1 round-trip is a neater way to do the search than my byte loop, too.

    Two corrections from your write-up that I got wrong or left out, now fixed in the #1699 summary:

    • On Windows the tray modifier is Shift + right-click, not Option. Option is the macOS one — I described the macOS gesture and never specified the Windows equivalent, which would have left people hunting for a menu item that never appeared.
    • The .ipa may need to be on the system drive. You found it wouldn't work from another drive. I have no explanation for that one, but it's worth knowing.

    Your route also sidesteps patching the IPA entirely: patch AltServer.exe, install stock AltStore, then sideload your .ipa files straight from the tray. For anyone who only wants to install a few apps and doesn't need AltStore's own refresh, that's simpler than patching the IPA — worth stating as the default path on Windows.

    @a7medpa glad it worked, and thanks for upvoting the PRs — that's the part that actually gets this fixed for everyone instead of one machine at a time.

    Running tally of confirmed-working reports, for anyone still deciding whether this is worth trying: @Scope666, @akgang-rgb, @BorbushArtem, @angel-knights, @a7medpa — across Windows, macOS 27 beta, and macOS 10.15 with AltServer 1.6.2.

  21. Sebastin3244 commented on Sep 8, 2026

    @Sebastin3244

    Thank you all for helping me. Now I am able to refresh my apps. I love Altstore. I love commercial free youtube.

  22. akgang-rgb commented on Sep 9, 2026

    @akgang-rgb

    Thank you ! case closed for me this morning 1.7.5 + 2.2.2 work fine signing in and install on windows (win11+iphone iOS26.6.1).

    With proper procedure applied (deinstall first…) !

    Spent time on this for myself (I was stuck) ! I now nearly (compile run sign & install ok with AltStore 2.2.2) have an x64Altserver+windows_anisette VS project almost functional. Happy to share if someone is interested (but I had to start from 1.1.2.0.)

  23. infamousdimsum commented on Sep 10, 2026

    @infamousdimsum

    Thanks! Updated to the latest 1.7.5 on Macos 12 and 2.2.2 on the iPad. Had to delete the old altserver folder first. No more issues!

  24. kevintosh commented on Sep 11, 2026

    @kevintosh

    (this edit deletes my previous ask for help)

    WELL, take a look at that... Just update to 1.7.6 from the top menu, and it works again...

    THANKS

    Image
  25. Scope666 commented on Sep 11, 2026

    @Scope666

    The patched version worked for me a few days ago, but today it's back to the same error ... wondering if Apple picked up on the new useragent.

    Image
  26. angel-knights commented on Sep 11, 2026

    @angel-knights

    @kisnner26 and @a7medpa - bad news. It does not appear that AltServer team has released an official update for 1.6.2 on 10.15. And the worse news, the patch that we recently performed and tested, has since stopped working. The app is throwing the "Data not in the correct format" error.

    I have tried again from scratch, staring with clean AltServer 1.6.2, applying the patch, and then attempting to manually sideload the patched IPA. But AltServer is failing to even manually sideload the IPA, with the previous error:

    Error Domain=NSCocoaErrorDomain Code=3840 "Malformed data byte group at line 1; invalid hex" UserInfo={NSDebugDescription=Malformed data byte group at line 1; invalid hex}

    Thoughts?

  27. kisnner26 commented on Sep 11, 2026

    @kisnner26

    @angel-knights @a7medpa Confirmed the first half: checked the update feed directly, and both 1.7.5 and 1.7.6 declare minimumSystemVersion: 11.0. There is no official build that installs on 10.15 — that's not something you're doing wrong, it's a real gap for anyone on that OS.

    On the patch breaking: @Scope666 reported the exact same regression a few hours before your comment, on the same day, and floated the same theory — Apple may have started rejecting the specific spoofed User-Agent string (AuthKit/1 (com.apple.dt.Xcode/3594.4.1)) that this whole thread converged on. Two independent reports of the identical symptom on the same day is a real signal, not a coincidence on your machine specifically. Given how this entire saga went — Apple adjusting its validation every time a workaround got popular — I'd bet on that over anything specific to your setup.

    I don't have a 10.15 machine to verify this myself, so take the following as a starting point rather than a tested fix:

    • The manual patch is now a moving target. If Apple is filtering that specific string, trying a different (still plausible) Xcode version in the same UA format might buy a few more days, but it'll likely get caught again — this isn't a durable fix, it's whack-a-mole against Apple's fraud detection.
    • The durable fix needs macOS 11+. If there's any way to run AltServer from a different, newer machine — even temporarily (a VM, a borrowed Mac, a Hackintosh, whatever you have access to) — that gets you onto the actual patched 1.7.6 build instead of chasing the string. AltServer just needs to reach the phone over the network; it doesn't need to live permanently on the 10.15 machine.

    Sorry I can't give you a tested answer this time — this one's past what I can verify without the hardware.

  28. a7medpa commented on Sep 11, 2026

    @a7medpa

    @kisnner26 and @a7medpa - bad news. It does not appear that AltServer team has released an official update for 1.6.2 on 10.15. And the worse news, the patch that we recently performed and tested, has since stopped working. The app is throwing the "Data not in the correct format" error.

    I have tried again from scratch, staring with clean AltServer 1.6.2, applying the patch, and then attempting to manually sideload the patched IPA. But AltServer is failing to even manually sideload the IPA, with the previous error:

    Error Domain=NSCocoaErrorDomain Code=3840 "Malformed data byte group at line 1; invalid hex" UserInfo={NSDebugDescription=Malformed data byte group at line 1; invalid hex}

    Thoughts?

    Despite what @ksinner26 said, I tested his powershell patch for altserver on Windows not mac os. Now alt server 17.5.0 has been released a patch, it has been working just fine.

  29. MeemeeLab commented on Sep 11, 2026

    @MeemeeLab

    I can confirm that User-Agent fix is no longer working. I tried changing it to different one and applying it to other GrandSlam requests but still getting 503.

    I'll try poking around user agents and device strings of anisette server since it makes GrandSlam requests too.

  30. MeemeeLab commented on Sep 11, 2026

    @MeemeeLab

    Update, I changed clientInfo of anisette-v3-server (https://github.com/Dadoum/anisette-v3-server):

    enum clientInfo = "<MacBookPro13,2> <macOS;13.1;22C65> <com.apple.AuthKit/1 (com.apple.dt.Xcode/3594.4.19)>";

    to

    enum clientInfo = "<MacBookPro13,2> <macOS;13.1;22C65> <com.apple.AuthKit/1 (com.apple.iCloud/7.21)>";

    If there's any string Xcode in clientInfo it seems to trigger something and results in 503, I'm not sure why.

    I've recompiled it, it seems to work, I can install apps but can't open because of "signature error", same exact issue as #1794 from few hours ago so I guess it's separate issue being added on top of this already unstable mess.

    EDIT: I forgot that AltServer doesn't use Anisette servers. Either way, the fix is to replace device string:

    deviceDescription: "<MacBookPro15,1> <Mac OS X;10.15.2;19C57> <com.apple.AuthKit/1 (com.apple.dt.Xcode/3594.4.19)>",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions