-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Saddenly "save dialog" open duration downloading #19
Comments
i am too facing it now days, even though we have downloadpath. |
Can any of you guys provide a simple project in which I can reproduce this bug? I need to see it myself to debug it |
@thehatami can you provide more code to your example please? If your intention is to loop and execute async functions, that is not the best approach. |
i have the same issues. in my case, ive used the remote to call the app, browser windows and net. is it the problem causing the dialog? And Im using the electron-react-boilerplate |
I've experienced this issue as well while iterating over an array of signed URL's received from a server. I'm doing this so I can show the download state in my UI via onProgress option callback. Strangely, it works in development mode but not production for my application. I am calling it from the renderer process with remote. Something similar to: files.forEach(file => {
require("electron").remote.require("electron-download-manager").download({
url: file.url,
onProgress: (progress, item) => updateDownloadState(file, progress, item)
}, (error, info) => {
// ...rest of code
})
})
}) I'll have to dig in further, but from my initial experimentation calling download will push an item into the queue as expected and then The 'will-download' event occurs and the listener function (set via |
I'm having the same issue. Has anyone made any progress. Weirdly it seems to work sometimes, not other... I have not got it working on a final built app yet. Hoping someone else has uncovered more? |
@danielnieto I have emailed you some example code :) |
I got it work by adding electron-download-manager as dependence inside app/package.json to resolve the remote require problem. And avoid using remote to register the download path. |
I resolved this problem by adding to the const DownloadManager = require("electron-download-manager");
DownloadManager.register({downloadFolder: yourpath }); |
Issue randomly appeared after I haven't changed anything. Any one found a solution for this, yet? |
I'll bump the dependencies versions and see if this still happens, I'm thinking this might be an issue from Electron itself |
Does this still happens? Otherwise I can close this issue |
It's still a problem. |
I have the same problem with my Electron app (use lastest version of Electron and download manager). That means user can't change the download folder at runtime... and it's a problem. |
I have the same problem. And I found that, if the url contains the port number then download box will be appeared instead of store file into the defined folder automatically. IMO, It is a bug. |
|
I've fixed my problem by editing hope this helpful.
|
In Electron 7 is not working anymore. You need to change in |
download the homepage as html is not working on homepages main.js const DownloadManager = require("electron-download-manager");
DownloadManager.register({downloadFolder: __dirname + "/siteColorDownloads"}); renderer.js / devtool console (from chromium) const dl = app.require("electron-download-manager")
dl.download({
url: "http://youtube.com",
path: ""
}, function (error, finished, errors) {
if (error) {
console.log("finished: " + finished);
console.log("errors: " + errors);
return;
}
console.log("site download finished");
}); |
We also have similar problems with both this project and electron-dl. We're sending them one at a time (after the download, we do some processing and send out the next dl after that) via IPC. Sometimes there is no actual response from electron-download-manager, sometimes it shows the Save as dialog, sometimes it throws an "Object has already been destroyed" error.
And in the main process we use electron-download-manager like so:
|
I have the same problem with bulkDownload.
If urls contains only one element everything is fine, but if I pass 2 or more elements sometimes the savefile dialog appears. |
I have the same problem, but i solved it by reading the doc more carefully. |
Because of the unbelievable crappiness of electron that manages to f*ck up even a most basic task like downloading a file, I have come up with this
|
i try download multi files by .map and {download} function. but sometime save dialog open and try somthing called "download", how can i manage it?
The text was updated successfully, but these errors were encountered: