Description
The chrome.downloads.download method doesn't appear to work as expected in Brave.
Steps to Reproduce
Create a new directory with the following files:
manifest.json
{
"name": "chrome.downloads.download test",
"version": "0.0.0.1",
"manifest_version": 3,
"permissions": [
"downloads"
],
"background": {
"service_worker": "background.js"
}
}
background.js
chrome.runtime.onInstalled.addListener(() => {
const url = "https://brave.com/static-assets/images/brave-og.png";
chrome.downloads.download({ url }, downloadId => {
console.log(`Download ID is ${downloadId}`);
});
});
Navigate to brave://extensions/ and enable Developer Mode. Then select Load unpacked, and find the extension directory with the contents above.
Actual result:
Nothing happens. No download is initiated, but a download ID is generated and returned.
Brave Nightly 1.26.11

Expected result:
A download should automatically be initiated when the extension is loaded, or refreshed. Clicking the "service worker" link should also reveal a generated download ID in the console.
Chrome Canary 92.0.4505.0

Reproduces how often:
Consistently.
Brave version (brave://version info)
1.26.11
Version/Channel Information:
- Can you reproduce this issue with the current release? Yes
- Can you reproduce this issue with the beta channel? Yes
- Can you reproduce this issue with the nightly channel? Yes
Other Additional Information:
- Is the issue reproducible on the latest version of Chrome? No
Miscellaneous Information:
By hooking into the downloads lifecycle events, we can see that Brave stops around filename determination, whereas Chrome resolves a full path and filename and proceeds with the download:
chrome.downloads.onCreated.addListener( item => {
console.log( "onCreated", item );
});
chrome.downloads.onChanged.addListener( item => {
console.log( "onChanged", item );
});
chrome.downloads.onDeterminingFilename.addListener( item => {
console.log( "onDeterminingFilename", item );
});
chrome.downloads.onErased.addListener( item => {
console.log( "onErased", item );
});


Description
The
chrome.downloads.downloadmethod doesn't appear to work as expected in Brave.Steps to Reproduce
Create a new directory with the following files:
manifest.json
background.js
Navigate to brave://extensions/ and enable Developer Mode. Then select Load unpacked, and find the extension directory with the contents above.
Actual result:
Nothing happens. No download is initiated, but a download ID is generated and returned.
Brave Nightly 1.26.11

Expected result:
A download should automatically be initiated when the extension is loaded, or refreshed. Clicking the "service worker" link should also reveal a generated download ID in the console.
Chrome Canary 92.0.4505.0

Reproduces how often:
Consistently.
Brave version (brave://version info)
1.26.11
Version/Channel Information:
Other Additional Information:
Miscellaneous Information:
By hooking into the downloads lifecycle events, we can see that Brave stops around filename determination, whereas Chrome resolves a full path and filename and proceeds with the download: