File downloads not working via authenticated proxy (2001635380)
I'm having issues syncing files from external to a PC. Adding them locally and syncing them to the cloud is not a problem.
May this be a firewall issue when connecting to wss://stream.zotero.org?
May this be a firewall issue when connecting to wss://stream.zotero.org?
It looks like the implemention changed slightly.
How can I assist in debugging this issue?
BTW: Disabling WebSockets does not help. The error message is:
[JavaScript Error: "S3 returned 0 for 2228042/7QVTDDUC -- retrying download" {file: "chrome://zotero/content/xpcom/storage/zfs.js" line: 177}]
Zotero.Sync.Storage.Mode.ZFS.prototype.downloadFile</listener<.onStop<@chrome://zotero/content/xpcom/storage/zfs.js:177:32
(As I've explained before, the WebSockets connection is totally irrelevant.)
In Zotero 7 I'v enabled the Network monitoring in the console and see the GET request to the file:
GET /users/xxxxxx/items/YYYYYYY/file HTTP/1.1
Host: api.zotero.org
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:115.0) Gecko/20100101 Zotero/7.0.12
But this request is blocked with "407 authenticationrequired" which means the proxy authentication does not work for the file requests:
HTTP/1.1 407 authenticationrequired
Date: Mon, 24 Feb 2025 16:01:05 GMT
Content-Type: text/html
Cache-Control: no-cache
Content-Length: 3996
X-Frame-Options: deny
Proxy-Connection: Keep-Alive
Proxy-Authenticate: Basic realm="McAfee Web Gateway"
The next entry in the console is the error posted above:
S3 returned 0 for 1/YYYYYYY -- retrying download zfs.js:177
onStop chrome://zotero/content/xpcom/storage/zfs.js:177
In Zotero 6 there is no possibility to enable the network monitoring but the download simply works. I assume that there is a difference in the proxy authentication of Zotero 7. Will dig into it further.
zfs.js
and found no significant difference between Zotero 6 and Zotero 7. ThedownloadFile
function callsZotero.Utilities.Internal.saveURI
to start the download process (the initial GET request mentioned above).Comparing the
saveURI
function ofutilities_internal.js
between Z6 and Z7 shows IMHO significant differences in the parameters passing tonsIWebBrowserPersist.saveURI
, i.e.Services.scriptSecurityManager.createNullPrincipal({})
is used as the second parameter in Z7 compared tonull
in Z6. I believe that this is relevant.The signature of the function
nsIWebBrowserPersist.saveURI
changed from eight parameters to ten. Unfortunately, I cannot find the recent interface documentation ofnsIWebBrowserPersist
to dig into it deeper.BTW: the download of files via proxy works in general in Z7 but not if the proxy requires authentication.