Repository navigation
fix: use compatible device fingerprint for fresh Apple Music login - #24
Conversation
|
@glomatico — I have opened this contribution for review: PR #24. The important point is that this is now backed by a second, clean x86_64 reproduction: fresh Wrapper setup under openSUSE Tumbleweed/WSL on Windows 10 IoT Enterprise LTSC 2021, Gamdl installed separately on Windows, successful 2FA, session recovery after worker recycle, and HTTP 200 responses from playback and The PR credits @rocketguedes for the original diagnostic lead and deliberately keeps the ARM64 result marked unverified. The first Actions run associated with the PR currently reports |
|
Updated the PR to the cleaned-up branch head The README is now a concise entry point; the complete installation procedure is maintained only in The latest upstream Actions run is |
|
Thanks. |
Summary
Fixes the fresh-install Apple Music authentication failure documented in issue #23.
The critical diagnostic lead came from @rocketguedes in comment 7162866962. That report identified a device fingerprint configuration that completed Apple login and 2FA in the reporter's environment.
Failure and diagnostic
The original generated value in
src/device_info.rsused:The successful override reported by @rocketguedes used:
The original failure produced
response_type=Some(4),apple_error_code=None, and no HSA2 challenge despite the credential and known dialog callbacks being handled.The report kept the image, network, DNS, account, and credentials unchanged and changed only
WRAPPER_DEVICE_INFO; login progressed to 2FA and then authenticated. The experiment changed both the client tuple and suffix length together, so it did not isolate which field triggered Apple's rejection.Code changes
In
src/device_info.rs:Music/5.0.2/Android/10/Pixel 8/7663314/en-US/en-US./dev/urandom, rendered as 16 lowercase hexadecimal characters (64 bits).WRAPPER_DEVICE_INFOoverrides..wrapper-device-info, native.worker-devicehash, or cached session.Independent successful reproduction
A separate clean installation completed with:
The supplied Docker logs confirm:
POST /session/loginreturned HTTP 202 for the pending 2FA challenge.session.authenticatedwas logged.GET /sessionandGET /session/credentialsreturned HTTP 200.session.recoveredwas logged./keyrequests returned HTTP 200.The initial
session.restoreresponse wassession_expired(HTTP 403), after which the fresh login completed successfully. This does not reproduce the originalauthentication_failedresult.Documentation and repository cleanup
docs/clean-install-linux.mdthe single detailed installation runbook.The detailed evidence and remaining limitations are in the source audit.
Validation scope and limitations
Verified in the reported environment: clean x86_64 deployment, fresh login, 2FA, credential retrieval, worker recycling/session recovery, playback, and successful
/keyHTTP responses.Not verified: ARM64 build, live ARM64 login/2FA, ARM64 playback/context capture, every playback/media edge case, or the internal correctness of all returned context bytes. The changed identity code is shared Rust code and is expected to apply to ARM64, but that remains unverified.
The patch deliberately does not change native authentication logic, the session-validation request header, or proprietary ABI/capture code. The successful reproduction points to the generated device fingerprint; changing unrelated native paths without evidence would add risk and confound the fix.
No Apple Music package, proprietary Apple libraries, credentials, 2FA codes, cookies, tokens, or account/session data are included in this PR.