-
Notifications
You must be signed in to change notification settings - Fork 28
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
Download timeout error #2
Comments
这里的原理是:使用一个 watcher 来监测本地文件的变化,如果监测的对应文件被创建并且成功写入后表示下载完成,超时表示文件没有写入完成,所以先从下面两个方面看下有没有问题:
|
你可以打印看看 docurl 是否正确,是否可以直接在浏览器中下载 你可以修改 https://github.com/renyunkang/yuque-exporter/blob/master/main.js#L41C1-L41C87 为 |
感谢,按照建议,观察了下浏览器的运行状态。解析知识库及文档都很正常,就是进入到下载环节,就开始报错了。 chrome只提供了一个帮助文档的链接:https://support.google.com/chrome/answer/2898334?hl=zh-Hans&ctx=1&visit_id=638245973802105273-1324968125&p=ui_download_errors&rd=1 请教下如何能进一步定位下载遇到的具体问题呢?谢谢! |
没遇到过这个问题,你看看是不是权限的问题,用 admin 运行 cmd 或者 powershell 试试 |
直接运行会超时,{ headless: false }看了下发现会404,把ACCESSURL去掉域名 https://www.yuque.com/ 就可以成功下载了 |
按照@ideapad460的办法修改过, ACCESSURL已经将域名去掉了, 但还是在下载这步时出现一样的问题. 但是如果将在cmd打印出来的URL复制到edge中, 是可以下载的. 已排除文件夹操作权限的问题. |
windows10, node v16.18.0 相同的问题,浏览器下载时控制台报错: import { win32 } from "node:path";
...
...
const client = await page.target().createCDPSession();
const options = { output: folderPath };
await client.send("Browser.setDownloadBehavior", {
behavior: "allow",
downloadPath: win32.resolve(win32.normalize(options.output)),
// folderPath,
}); |
和之前有位同学反应的情况类似,也是出现download timeout的错误,提示如下:
Error: Download timed out
at Timeout._onTimeout (file:///C:/Users/Administrator/main.js:256:16)
at listOnTimeout (node:internal/timers:569:17)
at process.processTimers (node:internal/timers:512:7)
The text was updated successfully, but these errors were encountered: