Open fireattack opened 1 year ago
This a legacy bug from Chrome. Just wait for a workaround or Chrome bug fix, please.
After a investigation, we found maybe there is no solution or workaround to deal with this conflict. The only method is turning off the auto-capture function at this situation which is caused by the defect of Chrome extension API.
Thanks for the investigation. Would you mind to elaborate the bug, so I can report it to Chrome team?
Thanks for the investigation. Would you mind to elaborate the bug, so I can report it to Chrome team?
You can refer to this Zhihu article https://zhuanlan.zhihu.com/p/432549456, which summarized the whole detail. And I also gave a comment below.
The key point is that when extension uses onDeterminingFilename
API, Chrome pass in a original filename
of DownloadItem
object which is not the one set by download
API from other extension.
PS: We must use onDeterminingFilename
API to capture the Chrome download task
Describe the bug When auto capture is enabled, Aria2 for Chrome causes other extensions that download file to lose their assigned filename. I experienced it in the extension rajiko, but there could be others.
To Reproduce Steps to reproduce the behavior:
Enable auto capture when download file size ..
option. Size limit does not matter.Expected behavior The downloaded file should be named
QRR_20230101233000_20230102000000.aac
.Observed behavior But when auto capture is enabled, the filename becomes
eddb6791-7878-434e-87cb-452fa933304f.aac
or some other UUID-like random filename.Desktop (please complete the following information):
Additional context
rajiko uses
chrome.downloads.download()
to download the file, and it supplies a proper filename:https://github.com/jackyzy823/rajiko/blob/e2600c3397c1e93c465b46666878d21554a5614a/background.js#L694-L696
However once auto capture is enabled in Aria2 for Chrome, even when the file isn't actually captured (blacklist, too small, etc.), the filename is not actually used in download for some reason.