xtool auth login fails with HTTPClientError.connectTimeout after entering 2FA code on Linux (intermittent TLS stall to gsa.apple.com)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 50/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- swift
- Lĩnh vực
- authentication, networking
Hướng nghiên cứu
Start by tracing xtool auth login from the 2FA submission through the sequential requests to gsa.apple.com; the payload does not name source files or tests. Check the HTTP client’s connection and TLS timeout handling and whether those requests can be retried safely. Done means intermittent stalls no longer force users to restart login, with retry behavior covered by an appropriate test.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Environment
- xtool 1.24.0 (AppImage, x86_64)
- Debian 13, Linux 6.12, Swift 6.4.2
- Network: cloud VM behind a transparent proxy (fake-IP DNS, outbound HTTPS only)
Steps to reproduce
xtool auth login- Choose
1: Password - Enter Apple ID and password; receive and enter the 2FA code
Actual result
Logging in...
Code: ******
Error: HTTPClientError.connectTimeout
xtool auth status still reports Logged out. Anisette provisioning had already succeeded (files written under ~/.config/xtool/data) and the 2FA code was delivered, so the first auth round worked.
Investigation
- Every host used by the login flow was tested from the same machine:
developerservices2.apple.com,idmsa.apple.comandmac-ani.jkcoxson.com(HTTPS and wss) always answered in about 0.15 s. gsa.apple.comoccasionally stalls right after the TLS ClientHello and never replies (curl stops atTLS handshake, Client hello). This happened in about 1 of 8 to 1 of 150 attempts.- After the 2FA step, the client makes several sequential requests to
gsa.apple.com, so a single stall makes the whole login fail. Because the connect timeout is fixed at 60 s and there is no retry, the user has to start over and get a new 2FA code. Which request stalled could not be seen directly, so this part is an inference.
Workaround
I ran a small local CONNECT proxy that re-dials when the server has not sent a byte within 6 s (safe, because nothing has been received yet), and pointed xtool at it:
XTL_HTTP_PROXY=127.0.0.1:18080 XTL_DEBUG_ERRORS=1 xtool auth login
With it, login succeeded. In 300 test connections to gsa.apple.com through the proxy there were 0 failures, and one stall was recovered on retry. During the successful login itself no stall happened, so that run did not need the retry.
Suggestions
- Retry the connection or TLS handshake (with a shorter per-attempt timeout) for idempotent auth requests, especially those after the 2FA code is submitted.
- Optionally make the connect timeout configurable (e.g.
XTL_CONNECT_TIMEOUT). - Document
XTL_HTTP_PROXY/XTL_DEBUG_ERRORSin the README for users on restricted networks.
- Ngôn ngữ chính
- Swift
- Star
- 5.5k
- Fork
- 163
- Merge trung bình
- 1 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 33
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của xtool-org/xtool
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 46/100
xtool-org/xtool#407 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Error: exited(127)Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
xtool-org/xtool#376 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Feature Request] Add `xtool update` command for automatic CLI updatesCó thể đã có người làm @Madhav008 đã nhận 8 ngày trước. Đang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
xtool-org/xtool#365 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của xtool-org/xtool
Issue tương tự
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
manaflow-ai/cmux#32617 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
skiptools/skip-fuse-ui#166 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
runjuu/InputSourcePro#153 · 1 bình luận ·
-
Requirement is wrongĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
remko/age-plugin-se#25 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
peteromallet/desloppify#942 ·