I can't log in my Apple ID
I reinstalled the latest version of AltStore. When I try to log in, it prompted me Failed to log in. The data is not in the correct format. What should I do?
I reinstalled the latest version of AltStore. When I try to log in, it prompted me Failed to log in. The data is not in the correct format. What should I do?
I had the same iPhone-side AltStore login error:
"Failed to Log In" "The data couldn't be read because it isn't in the correct format."
In my case, AltServer itself was working correctly. Running AltServer from Terminal showed that the iPhone successfully requested and received Anisette data:
Received request: anisetteData(...) Received request with result: success(...) Sent response AnisetteDataResponse(...) with result: success()
The problem was the iPhone's network path to Apple's authentication servers.
I was using Potatso Lite on the iPhone, and even though the VPN was enabled, Apple traffic was apparently not being proxied correctly.
What fixed it for me was routing the iPhone through the Mac's ClashX proxy:
-
Run ClashX on the Mac.
-
Make sure LAN access is enabled.
-
Get the Mac's LAN IP:
ipconfig getifaddr en0
-
In ClashX, use the proxy port, not the API/controller port. In my case:
- Proxy port: 7890
- API port: 55600
-
On the iPhone: Settings -> Wi-Fi -> current Wi-Fi -> Configure Proxy -> Manual
-
Set:
- Server: Mac's LAN IP
- Port: 7890
- Authentication: Off
-
Keep AltServer running and try logging into AltStore again.
After doing this, AltStore logged in successfully.
So if AltServer shows successful Anisette responses but AltStore still reports "The data couldn't be read because it isn't in the correct format", check whether the iPhone's Apple/GSA traffic is actually being routed through the proxy.
Simply having a VPN enabled on the iPhone was not enough in my case.
Same root cause as #1699 (outdated User-Agent → Apple returns an HTML 503 on the apptokens request, which AltSign then tries to parse as a plist). There's a consolidated fix write-up there, including a since-found fix for AltStore's own sign-in on iOS: https://github.com/altstoreio/AltStore/issues/1699#issuecomment-5565539975