HarmonyOS 鸿蒙Next [ERROR_GET_BUNDLE_INSTALLER_FAILED] Error while Deploying HAP
HarmonyOS 鸿蒙Next [ERROR_GET_BUNDLE_INSTALLER_FAILED] Error while Deploying HAP
版本信息
DevEco Studio 3.1.1 Release
Build Version: 3.1.0.501, built on June 20, 2023
Build #DS-223.8617.56.36.310501
Runtime version: 17.0.6+10-b829.5 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 1536M
Cores: 4
Registry: external.system.auto.import.disabled=true
使用工具
本地模拟器,API9
报错内容
04/16 11:03:46: Launching com.deepiot.ylr_app
$ hdc shell am force-stop com.deepiot.ylr_app
$ hdc file send E:\ruanjian\HarmonyOSPath\AAAWorkPath\ylr_app\entry\build\default\outputs\default\entry-default-signed.hap /sdcard/c7e47859c72d46b880eb1770d25d406f/entry-default-signed.hap
$ hdc shell bm install -r -p /sdcard/c7e47859c72d46b880eb1770d25d406f/
[ERROR_GET_BUNDLE_INSTALLER_FAILED]
Troubleshooting guide
$hdc shell rm -rf /sdcard/c7e47859c72d46b880eb1770d25d406f
Error while Deploying HAP
日志内容
2024-04-16 11:03:13,475 [ 508587] INFO - #com.huawei.hvigor.service.HvigorWrapperService - Find hvigor boot script:C:\Users\deepiot\.hvigor\project_caches\5aec29c2ada74c3a44959e04feafea38\workspace\node_modules\@ohos\hvigor\bin\hvigor.js
2024-04-16 11:03:13,477 [ 508589] INFO - #com.huawei.deveco.build.ohos.service.HvigorService - runtime is HarmonyOS
2024-04-16 11:03:13,573 [ 508685] INFO - #com.huawei.hvigor.service.HvigorWrapperService - Find hvigor boot script:C:\Users\deepiot\.hvigor\project_caches\5aec29c2ada74c3a44959e04feafea38\workspace\node_modules\@ohos\hvigor\bin\hvigor.js
2024-04-16 11:03:13,573 [ 508685] INFO - #com.huawei.hvigor.service.HvigorWrapperService - Find hvigor boot script:C:\Users\deepiot\.hvigor\project_caches\5aec29c2ada74c3a44959e04feafea38\workspace\node_modules\@ohos\hvigor\bin\hvigor.js
2024-04-16 11:03:13,577 [ 508689] INFO - #com.huawei.hvigor.run.HvigorRunManagerImpl - hvigorVersion: 2.4.2
2024-04-16 11:03:13,577 [ 508689] INFO - #com.huawei.hvigor.utils.HvigorProcessUtil - Check process is available.
2024-04-16 11:03:13,577 [ 508689] INFO - #com.huawei.hvigor.utils.HvigorProcessUtil - C:\Windows\System32\wbem\wmic
2024-04-16 11:03:13,577 [ 508689] INFO - #com.huawei.hvigor.utils.HvigorProcessUtil - Execution command: '[C:\Windows\System32\wbem\wmic process where processid="4768" get processid,caption,commandline]'
2024-04-16 11:03:14,209 [ 509321] INFO - #com.huawei.hvigor.utils.HvigorProcessUtil - Execution command completed
2024-04-16 11:03:14,209 [ 509321] INFO - #com.huawei.hvigor.utils.HvigorProcessUtil - Execution result: Caption CommandLine ProcessId node.exe D:\ruanjian\HarmonyOS\Huawei\BasucSetup\nodejs\node.exe C:\Users\deepiot\.hvigor\project_caches\5aec29c2ada74c3a44959e04feafea38\workspace\node_modules\.pnpm\@ohos+hvigor@2.4.2\node_modules\@ohos\hvigor\src\base\daemon\process\daemon-process-boot-script.js INFO 4768
2024-04-16 11:03:14,209 [ 509321] INFO - #com.huawei.hvigor.utils.HvigorProcessUtil - call process.destroy() method.
2024-04-16 11:03:14,209 [ 509321] INFO - #com.huawei.hvigor.utils.HvigorProcessUtil - Execution command: '[D:\ruanjian\HarmonyOS\Huawei\BasucSetup\nodejs\node.exe, -v]'
2024-04-16 11:03:14,790 [ 509902] INFO - #com.huawei.hvigor.utils.HvigorProcessUtil - Execution command completed
2024-04-16 11:03:14,790 [ 509902] INFO - #com.huawei.hvigor.utils.HvigorProcessUtil - Execution result: v16.19.1
2024-04-16 11:03:14,790 [ 509902] INFO - #com.huawei.hvigor.utils.HvigorProcessUtil - call process.destroy() method.
2024-04-16 11:03:14,790 [ 509902] INFO - #com.huawei.hvigor.run.HvigorRunManager - No need to download SDK.
2024-04-16 11:03:14,800 [ 509912] INFO - #com.huawei.hvigor.client.connect.HvigorConnection - socket.on(Output, fn)
2024-04-16 11:03:14,800 [ 509912] INFO - #com.huawei.hvigor.client.connect.HvigorConnection - socket.on(BuildStatus, fn)
2024-04-16 11:03:14,800 [ 509912] INFO - #com.huawei.hvigor.client.connect.HvigorConnection - socket.on(connect, fn)
2024-04-16 11:03:14,800 [ 509912] INFO - #com.huawei.hvigor.client.connect.HvigorConnection - socket.on(connect_error, fn)
2024-04-16 11:03:14,800 [ 509912] INFO - #com.huawei.hvigor.client.connect.HvigorConnection - socket.on(disconnect, fn)
2024-04-16 11:03:14,800 [ 509912] INFO - #com.huawei.hvigor.client.connect.HvigorConnection - socket.on(WatchResult, fn)
2024-04-16 11:03:14,800 [ 509912] INFO - #com.huawei.hvigor.client.connect.HvigorConnection - socket.on(WatchLog, fn)
2024-04-16 11:03:14,801 [ 509913] INFO - #com.huawei.hvigor.client.connect.HvigorConnection - socket.emit(CommonBuild, [{"mode":"module","watch":true,"prop":["module=entry@default","product=default","debuggable=true","hotReload=true"],"_":["assembleHap"]})
2024-04-16 11:03:14,912 [ 510024] INFO - #com.huawei.hvigor.client.connect.HvigorConnector - connected...
2024-04-16 11:03:25,282 [ 520394] INFO - #c.i.c.ComponentStoreImpl - Saving appHttpConfigurable took 15 ms
2024-04-16 11:03:25,321 [ 520433] INFO - #c.i.c.ComponentStoreImpl - Saving Project(name=ylr_app, containerState=COMPONENT_CREATED, componentStore=E:\ruanjian\HarmonyOSPath\AAAWorkPath\ylr_app)WindowStateProjectService took 17 ms
2024-04-16 11:03:37,968 [ 533080] INFO - #c.i.c.ComponentStoreImpl - Saving appEditorColorsManagerImpl took 14 ms, FileTypeManager took 22 ms, HttpConfigurable took 13 ms
2024-04-16 11:03:44,569 [ 539681] INFO - #com.huawei.hvigor.run.HvigorRunConfiguration - D:\ruanjian\HarmonyOS\Huawei\BasucSetup\nodejs\node.exe C:\Users\deepiot\.hvigor\project_caches\5aec29c2ada74c3a44959e04feafea38\workspace\node_modules\@ohos\hvigor\bin\hvigor.js --mode module -p module=entry@default -p product=default -p debuggable=true -p hotReload=true assembleHap --watch
2024-04-16 11:03:44,678 [ 539790] INFO - #com.huawei.ace.lsp.extensions.client.SendMessageOfSelectedEditorsManager - sendCheckFileMessage: onCheckCurrentlyEditFile after create/delete/move/rename file, project = ylr_app
2024-04-16 11:03:44,860 [ 539972] INFO - #com.huawei.hvigor.run.HvigorRunConfiguration - Launch succeeded
2024-04-16 11:03:46,167 [ 541279] INFO - #com.huawei.ide.lemon.subscriptions.ApplicationSubscriber - HarmonyCustomTopic message logged
2024-04-16 11:03:46,291 [ 541403] INFO - #com.huawei.deveco.debugger.hos.run.tasks.DeployHapTask - Starting to execute the deployment task.
2024-04-16 11:03:46,291 [ 541403] INFO - #com.huawei.deveco.debugger.hos.run.tasks.DeployHapTask - Force stopping com.deepiot.ylr_app
2024-04-16 11:03:46,680 [ 541792] INFO - #com.huawei.deveco.debugger.hos.run.tasks.DeployHapTask - Ending force stop with result: true
2024-04-16 11:03:46,680 [ 541792] INFO - #com.huawei.deveco.debugger.hos.run.tasks.DeployHapTask - Starting to push E:\ruanjian\HarmonyOSPath\AAAWorkPath\ylr_app\entry\build\default\outputs\default\entry-default-signed.hap to /sdcard/c7e47859c72d46b880eb1770d25d406f/entry-default-signed.hap.
2024-04-16 11:03:47,090 [ 542202] INFO - #com.huawei.deveco.debugger.hos.run.tasks.DeployHapTask - End pushing successfully.
2024-04-16 11:03:47,091 [ 542203] INFO - #com.huawei.ide.lemon.subscriptions.ApplicationSubscriber - HarmonyCustomTopic message logged
2024-04-16 11:03:47,091 [ 542203] INFO - #com.huawei.deveco.debugger.hos.run.tasks.DeployHapTask - Starting to install to /sdcard/c7e47859c72d46b880eb1770d25d406f/.
2024-04-16 11:03:47,373 [ 542485] WARN - #com.huawei.deveco.debugger.hos.utils.DebuggerUtils - Execute exception: Cause: Unable to find the BMS service.
Solution: Try again later. If the issue persists, collect logs and go to Help > Contact Support.
2024-04-16 11:03:47,389 [ 542501] INFO - #com.huawei.ide.lemon.subscriptions.ApplicationSubscriber - HarmonyCustomTopic message logged
2024-04-16 11:03:47,423 [ 542535] INFO - #com.huawei.deveco.debugger.hos.run.tasks.DeployHapTask - Ending install with result: false
2024-04-16 11:03:47,425 [ 542537] INFO - #com.huawei.deveco.debugger.hos.run.tasks.DeployHapTask - Removing temporary directory /sdcard/c7e47859c72d46b880eb1770d25d406f
2024-04-16 11:03:47,566 [ 542678] INFO - #com.huawei.deveco.debugger.hos.run.tasks.DeployHapTask - Ending remove temp directory with result: true
2024-04-16 11:03:47,612 [ 542724] WARN - #com.huawei.deveco.debugger.hos.run.tasks.HarmonyLaunchTaskExecutor - Some launch tasks failed. Launching the debugger stopped.
2024-04-16 11:03:47,613 [ 542725] WARN - #com.huawei.deveco.debugger.ohos.webpack.WebpackManager - Failed to delete the modules.abc file.
2024-04-16 11:03:47,669 [ 542781] INFO - #com.huawei.hvigor.client.connect.HvigorConnector - connect closed: io client disconnect
2024-04-16 11:03:53,068 [ 548180] INFO - #c.i.c.ComponentStoreImpl - Saving appHttpConfigurable took 14 ms
更多关于HarmonyOS 鸿蒙Next [ERROR_GET_BUNDLE_INSTALLER_FAILED] Error while Deploying HAP的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html
3 回复
删除本地模拟器,重新创建的模拟器可以正常运行了
更多关于HarmonyOS 鸿蒙Next [ERROR_GET_BUNDLE_INSTALLER_FAILED] Error while Deploying HAP的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html
HarmonyOS鸿蒙Next中出现的[ERROR_GET_BUNDLE_INSTALLER_FAILED]错误通常与部署HAP(Harmony Ability Package)文件时获取BundleInstaller失败有关。该错误可能由以下原因导致:
- 设备未正确连接或未授权:确保设备已通过USB连接且开发者选项中的“USB调试”和“安装通过USB”选项已启用。
- BundleInstaller服务异常:系统服务可能未正常启动或运行,尝试重启设备或IDE。
- HAP文件损坏或签名问题:检查HAP文件是否完整,并确保使用正确的签名证书进行签名。
- 设备存储空间不足:确保设备有足够的存储空间来安装HAP文件。
- IDE版本不兼容:确保使用的DevEco Studio版本与鸿蒙Next SDK版本兼容。
- 系统权限问题:检查应用权限配置是否正确,确保未缺少必要的权限。
可通过查看DevEco Studio的日志或命令行输出来获取更多错误信息,以便进一步定位问题。
错误通常与鸿蒙Next的HAP包部署问题有关,可能原因包括:
1. **开发工具版本不匹配**:确保DevEco Studio和SDK版本与目标设备兼容。
2. **权限问题**:检查IDE和设备权限,确保有足够的权限进行安装。
3. **设备连接问题**:确认设备已正确连接,开发者选项和USB调试已开启。
4. **HAP包损坏**:重新编译或生成HAP包。
5. **设备存储不足**:清理设备存储空间。
建议检查日志获取更多信息,并尝试重启IDE和设备。