登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
模力方舟
AI 队友
登录
注册
轻量养虾,开箱即用!低 Token + 稳定算力,Gitee & 模力方舟联合出品的 PocketClaw 正式开售!点击了解详情
代码拉取完成,页面将自动刷新
仓库状态说明
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
18
Star
18
Fork
222
OpenHarmony
/
request_request
关闭
代码
Issues
6
Pull Requests
10
Wiki
统计
流水线
服务
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
SBOM
开发画像分析
我知道了,不再自动展开
更新失败,请稍后重试!
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
request.download 下载时概率不上报complete事件
已完成
#I5WZC6
缺陷
haomini
创建于
2022-10-21 15:36
**【模块名_概率】简要描述:** request.download 下载时概率不上报complete事件 **【环境信息】:** - 网络环境: 有线网络 - 硬件开发板型号 - 软件版本信息或tag节点: 3.1release repo init -u https://gitee.com/openharmony/manifest.git -b OpenHarmony-3.1-Release --no-repo-verify - 测试环境 - 其他 **【预置条件】:** 通过如下方式下载文件时, 当下载任务较多时, 会出现文件已完成下载, 但complete事件未回调 ``` var count = 0 export class Downloader { private downloadTask constructor() { } public downloadFile(url: string, file: string, listener: () => void) { request.download({ url: url, filePath: file }).then(task => { this.downloadTask = task this.downloadTask.on('complete', () => { count = count + 1 console.info(`download ${file} success ${count}`); listener() }) this.downloadTask.on('fail', (err) => { console.error(`download ${file} failed, err: ` + JSON.stringify(err)) }) }).catch(err => { console.error(`download create download task failed, err: ` + JSON.stringify(err)) }) } } ``` **【测试步骤】:** **【预期结果】:** 多个下载任务结束时, 正常回调complete事件 **【实际结果】:** 多个下载任务结束时, 概率出现回调complete事件不回调 **【恢复手段】:** 无 **【出现概率】:问题出现次数/实际测试次数** **【定位信息】:** 下载任务结束时, 从日志上看 下载任务完成时, 概率出现设置的回调事件还没设置 Line 4490: 01-01 03:18:07.526 2272 2311 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1558 [0, 0]. Line 4517: 01-01 03:18:07.532 2272 2311 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1561 [0, 0]. Line 4558: 01-01 03:18:07.539 2272 2311 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1562 [0, 0]. Line 4617: 01-01 03:18:07.547 2272 2309 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1563 [0, 0]. Line 4618: 01-01 03:18:07.547 2272 2311 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1565 [0, 0]. Line 4691: 01-01 03:18:07.573 2272 2310 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1570 [0, 0]. Line 4852: 01-01 03:18:07.589 2272 2310 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1575 [0, 0]. Line 4984: 01-01 03:18:07.604 2272 2310 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1576 [0, 0]. Line 5303: 01-01 03:18:07.624 2272 2310 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1577 [0, 0]. Line 5556: 01-01 03:18:07.636 2272 2310 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1578 [0, 0]. Line 5845: 01-01 03:18:07.650 2272 2310 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1579 [0, 0]. Line 6196: 01-01 03:18:07.665 2272 2310 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1580 [0, 0]. Line 6490: 01-01 03:18:07.680 2272 2272 I 01c00/Downloadkit: [download_service_ability.cpp On 195] DownloadServiceAbility::On started. type=complete-1558 Line 6523: 01-01 03:18:07.681 2272 2310 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1581 [0, 0]. Line 6614: 01-01 03:18:07.685 2272 2272 I 01c00/Downloadkit: [download_service_ability.cpp On 195] DownloadServiceAbility::On started. type=complete-1559 Line 6715: 01-01 03:18:07.691 2272 2272 I 01c00/Downloadkit: [download_service_ability.cpp On 195] DownloadServiceAbility::On started. type=complete-1560 Line 6719: 01-01 03:18:07.691 2272 2310 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1582 [0, 0]. Line 6785: 01-01 03:18:07.696 2272 2272 I 01c00/Downloadkit: [download_service_ability.cpp On 195] DownloadServiceAbility::On started. type=complete-1561 Line 6846: 01-01 03:18:07.701 2272 2272 I 01c00/Downloadkit: [download_service_ability.cpp On 195] DownloadServiceAbility::On started. type=complete-1562 - 1. Log、截图、多媒体文件等,所有和问题有关的信息: log: [丢失时日志](https://gitee.com/haozhoum/misc_res/blob/master/data/hilog/download_completed_lose.log)
**【模块名_概率】简要描述:** request.download 下载时概率不上报complete事件 **【环境信息】:** - 网络环境: 有线网络 - 硬件开发板型号 - 软件版本信息或tag节点: 3.1release repo init -u https://gitee.com/openharmony/manifest.git -b OpenHarmony-3.1-Release --no-repo-verify - 测试环境 - 其他 **【预置条件】:** 通过如下方式下载文件时, 当下载任务较多时, 会出现文件已完成下载, 但complete事件未回调 ``` var count = 0 export class Downloader { private downloadTask constructor() { } public downloadFile(url: string, file: string, listener: () => void) { request.download({ url: url, filePath: file }).then(task => { this.downloadTask = task this.downloadTask.on('complete', () => { count = count + 1 console.info(`download ${file} success ${count}`); listener() }) this.downloadTask.on('fail', (err) => { console.error(`download ${file} failed, err: ` + JSON.stringify(err)) }) }).catch(err => { console.error(`download create download task failed, err: ` + JSON.stringify(err)) }) } } ``` **【测试步骤】:** **【预期结果】:** 多个下载任务结束时, 正常回调complete事件 **【实际结果】:** 多个下载任务结束时, 概率出现回调complete事件不回调 **【恢复手段】:** 无 **【出现概率】:问题出现次数/实际测试次数** **【定位信息】:** 下载任务结束时, 从日志上看 下载任务完成时, 概率出现设置的回调事件还没设置 Line 4490: 01-01 03:18:07.526 2272 2311 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1558 [0, 0]. Line 4517: 01-01 03:18:07.532 2272 2311 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1561 [0, 0]. Line 4558: 01-01 03:18:07.539 2272 2311 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1562 [0, 0]. Line 4617: 01-01 03:18:07.547 2272 2309 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1563 [0, 0]. Line 4618: 01-01 03:18:07.547 2272 2311 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1565 [0, 0]. Line 4691: 01-01 03:18:07.573 2272 2310 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1570 [0, 0]. Line 4852: 01-01 03:18:07.589 2272 2310 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1575 [0, 0]. Line 4984: 01-01 03:18:07.604 2272 2310 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1576 [0, 0]. Line 5303: 01-01 03:18:07.624 2272 2310 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1577 [0, 0]. Line 5556: 01-01 03:18:07.636 2272 2310 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1578 [0, 0]. Line 5845: 01-01 03:18:07.650 2272 2310 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1579 [0, 0]. Line 6196: 01-01 03:18:07.665 2272 2310 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1580 [0, 0]. Line 6490: 01-01 03:18:07.680 2272 2272 I 01c00/Downloadkit: [download_service_ability.cpp On 195] DownloadServiceAbility::On started. type=complete-1558 Line 6523: 01-01 03:18:07.681 2272 2310 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1581 [0, 0]. Line 6614: 01-01 03:18:07.685 2272 2272 I 01c00/Downloadkit: [download_service_ability.cpp On 195] DownloadServiceAbility::On started. type=complete-1559 Line 6715: 01-01 03:18:07.691 2272 2272 I 01c00/Downloadkit: [download_service_ability.cpp On 195] DownloadServiceAbility::On started. type=complete-1560 Line 6719: 01-01 03:18:07.691 2272 2310 I 01c00/Downloadkit: [download_service_ability.cpp NotifyHandler 247] DownloadServiceAbility::NotifyHandler started complete-1582 [0, 0]. Line 6785: 01-01 03:18:07.696 2272 2272 I 01c00/Downloadkit: [download_service_ability.cpp On 195] DownloadServiceAbility::On started. type=complete-1561 Line 6846: 01-01 03:18:07.701 2272 2272 I 01c00/Downloadkit: [download_service_ability.cpp On 195] DownloadServiceAbility::On started. type=complete-1562 - 1. Log、截图、多媒体文件等,所有和问题有关的信息: log: [丢失时日志](https://gitee.com/haozhoum/misc_res/blob/master/data/hilog/download_completed_lose.log)
评论 (
4
)
登录
后才可以发表评论
状态
已完成
待办的
已确认
技术评审中
修复中
验收中
已完成
已取消
已拒绝
挂起
负责人
未设置
标签
未设置
项目
未立项任务
未立项任务
里程碑
OpenHarmony_3.1_Maintenance
未关联里程碑
Pull Requests
未关联
未关联
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
未关联
分支 (
-
)
标签 (
-
)
开始日期   -   截止日期
-
置顶选项
不置顶
置顶等级:高
置顶等级:中
置顶等级:低
优先级
不指定
严重
主要
次要
不重要
预计工期
(小时)
参与者(2)
C++
1
https://gitee.com/openharmony/request_request.git
git@gitee.com:openharmony/request_request.git
openharmony
request_request
request_request
点此查找更多帮助
搜索帮助
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册