XX-net/XX-Net · warning
url in downloading, %s
Error message
url in downloading, %s
What it means
update_from_github.download_file keeps a global progress dict keyed by URL; if an entry exists with status 'downloading', a concurrent call for the same URL is rejected with this warning and returns False, to prevent two threads writing the same file.
Source
Thrown at code/default/launcher/update_from_github.py:92
"host": "127.0.0.1",
"port": 8086,
"user": None,
"pass": None
}, timeout=timeout, cert=cert)
res = client.request("GET", url, read_payload=False)
return res
def download_file(url, filename):
if url not in progress:
progress[url] = {}
progress[url]["status"] = "downloading"
progress[url]["size"] = 1
progress[url]["downloaded"] = 0
else:
if progress[url]["status"] == "downloading":
xlog.warn("url in downloading, %s", url)
return False
for i in range(0, 2):
try:
xlog.info("download %s to %s, retry:%d", url, filename, i)
req = request(url, i, timeout=120)
if not req:
continue
start_time = time.time()
timeout = 300
if req.chunked:
# don't known the file size, set to large for show the progress
progress[url]["size"] = 20 * 1024 * 1024
downloaded = 0
with open(filename, 'wb') as fp:View on GitHub (pinned to cfa5bc17b6)
Solutions
- Wait for the in-flight download to finish and retry the operation once
- If it never clears (stale state after a crash), restart the launcher to reset the progress dict
- Avoid triggering update operations concurrently from the UI
- Code-level: reset progress[url] status in a finally block so failures don't leave 'downloading' state
Example fix
// before (in update_from_github.download_file)
progress[url]["status"] = "downloading"
try:
do_download()
finally:
progress.pop(url, None)
// concept: always clear the per-url lock state so a crashed download does not block the next attempt Defensive patterns
Strategy: validation
Validate before calling
from update_from_github import progress
def url_free(url):
return progress.get(url, {}).get('status') != 'downloading'
assert url_free(url), 'download already in flight; wait or restart' Try / catch
try:
ok = download_file(url, path)
if not ok and progress.get(url,{}).get('status') == 'downloading':
wait_for_download(url) # another thread owns it
except Exception as e:
log.warning('download error: %r', e)
progress.pop(url, None) Prevention
- Avoid triggering concurrent updates of the same module
- Restart the launcher if a URL seems permanently 'downloading' (stale state)
- Wrap download state updates in try/finally to always reset status
When it happens
Trigger: Two callers invoke download_file with the same URL concurrently — e.g. get_github_versions and download_overwrite_new_version racing, or a user double-triggering update while a download is in flight; also stale 'downloading' state left by a crashed thread.
Common situations: Double-clicking update / overlapping update checks in the web UI; a previous download thread died without resetting progress[url]['status'], permanently blocking that URL.
Related errors
- time out
- time out
- get README fail:
- download xxnet zip fail:
- download size:%d, need size:%d, download fail.
AI-assisted analysis of XX-net/XX-Net@cfa5bc17b6 (2026-08-27).
Data as JSON: /api/errors/058829e47d2d2d2b.
Report an issue: GitHub.