Skip to content
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

TypeError upon evaluation of download() arguments #135

Open
Dcai169 opened this issue Mar 12, 2021 · 1 comment
Open

TypeError upon evaluation of download() arguments #135

Dcai169 opened this issue Mar 12, 2021 · 1 comment

Comments

@Dcai169
Copy link
Contributor

Dcai169 commented Mar 12, 2021

I'm trying to use this module to download a file with the following code:

// Main process

ipcMain.on('downloadFile', (event, args) => {
    download(BrowserWindow.fromId(event.frameId), args.url, { directory: args.path }).then((dl) => {
        console.log(dl.getSavePath())
        event.reply('downloadFile-reply', dl.getSavePath());
    });
});

Every time the render process fires the downloadFile event however, I get the following error:

(node:12263) UnhandledPromiseRejectionWarning: TypeError: Error processing argument at index 0, conversion failure from 
    at /Users/daniel_cai/Documents/GitHub/Destiny-API-Ripper-Extension/node_modules/electron-dl/index.js:204:22
    at new Promise (<anonymous>)
    at module.exports.download (/Users/daniel_cai/Documents/GitHub/Destiny-API-Ripper-Extension/node_modules/electron-dl/index.js:190:54)
    at IpcMainImpl.<anonymous> (/Users/daniel_cai/Documents/GitHub/Destiny-API-Ripper-Extension/src/index.js:170:5)
    at IpcMainImpl.emit (events.js:315:20)
    at Object.<anonymous> (electron/js2c/browser_init.js:157:9051)
    at Object.emit (events.js:315:20)

Google search queries did not yield any results. The full source can be found at Dcai169/Destiny-API-Ripper-Extension@136c9b4.

@dr34-m
Copy link

dr34-m commented Aug 20, 2022

I have the same problem as you, I wrote the download link wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants