首页 > 其他分享 >Unity Hub 安装 Editor 失败,出现 “Install failed: Validation Failed” 的解决方法

Unity Hub 安装 Editor 失败,出现 “Install failed: Validation Failed” 的解决方法

时间:2024-09-04 13:25:48浏览次数:7  
标签:info 09 Hub failed timestamp level Failed message 20628

网上有很多解决方法,但是对我来说没有什么用,还是安装不成功。
所以我想到了查看错误日志,通过错误日志来把问题解决掉。
要查看 Unity Hub 的错误日志,你可以按照以下步骤操作:

Windows:

1.打开文件资源管理器:

  • 按 Win + E 打开文件资源管理器。

2.导航到日志文件夹:

  • 进入以下路径:
C:\Users\[你的用户名]\AppData\Roaming\UnityHub\logs

其中 [你的用户名] 是你当前登录的 Windows 用户名。

3.查看日志文件:

在 logs 文件夹中,你会看到多个日志文件,如 info-log.json 或 error-log.json。你可以用文本编辑器(如 Notepad 或 Notepad++)打开这些文件,查看详细的错误信息。

macOS:

1.打开 Finder:
点击屏幕底部的 Finder 图标。
2.导航到日志文件夹:

在菜单栏中选择 前往 > 前往文件夹...,然后输入以下路径:

~/Library/Application Support/UnityHub/logs
  • 然后点击“前往”。

3.查看日志文件:

  • 进入 logs 文件夹后,你可以看到类似 info-log.json 或 error-log.json 的日志文件。用文本编辑器(如 TextEdit 或 VSCode)打开这些文件即可查看错误信息。

日志文件

也可以直接在 GUI 中打开日志文件的位置
在这里插入图片描述

以下是我的日志信息

{"timestamp":"2024-09-03T17:46:08.099Z","level":"info","moduleName":"Installation Manager","pid":20628,"message":"Starting installer of 2022.3.44f1-x86_64"}
{"timestamp":"2024-09-03T17:46:08.099Z","level":"info","moduleName":"Installer: 2022.3.44f1-x86_64","pid":20628,"message":"Retrying the installation of 2022.3.44f1-x86_64."}
{"timestamp":"2024-09-03T17:46:08.099Z","level":"info","moduleName":"Installer: 2022.3.44f1-x86_64","pid":20628,"message":"Exiting from State: Failed. Event: RETRY"}
{"timestamp":"2024-09-03T17:46:08.099Z","level":"info","moduleName":"Installer: 2022.3.44f1-x86_64","pid":20628,"message":"Transition to state \"install_validation\" on event \"RETRY\""}
{"timestamp":"2024-09-03T17:46:08.100Z","level":"info","moduleName":"Installer: 2022.3.44f1-x86_64","pid":20628,"message":"Entered State: install_validation"}
{"timestamp":"2024-09-03T17:46:08.101Z","level":"info","moduleName":"UnityIPCServer","pid":20628,"message":"IPC Server Unity-hubInstallServer started"}
{"timestamp":"2024-09-03T17:46:08.101Z","level":"info","moduleName":"UnityInstallerWindows","pid":20628,"message":"spawn child process, elevated: true"}
{"timestamp":"2024-09-03T17:46:08.101Z","level":"info","moduleName":"UnityInstallerWindows","pid":20628,"message":"executing \"D:\\Program Files\\Unity Hub\\Unity Hub.exe\" -- --winInstaller"}
{"timestamp":"2024-09-03T17:46:08.169Z","level":"info","moduleName":"UnityInstallerWindows","pid":20628,"message":"user did not agree to the UAC prompt and the process was not started"}
{"timestamp":"2024-09-03T17:46:08.170Z","level":"info","moduleName":"UnityIPCServer","pid":20628,"message":"IPC server Unity-hubInstallServer closed"}
{"timestamp":"2024-09-03T17:46:08.170Z","level":"error","moduleName":"UnityInstallerWindows","pid":20628,"message":"{ code: 'User did not grant permission.', message: 'The Hub does not have proper permissions to install Unity.' } 'powershell.exe' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n "}
{"timestamp":"2024-09-03T17:46:08.170Z","level":"info","moduleName":"Installer: 2022.3.44f1-x86_64","pid":20628,"message":"Validation FAILED."}
{"timestamp":"2024-09-03T17:46:08.170Z","level":"info","moduleName":"Installer: 2022.3.44f1-x86_64","pid":20628,"message":"Exiting from State: Validation. Event: ERROR"}
{"timestamp":"2024-09-03T17:46:08.170Z","level":"info","moduleName":"Installer: 2022.3.44f1-x86_64","pid":20628,"message":"Transition to state \"install_failed\" on event \"ERROR\""}
{"timestamp":"2024-09-03T17:46:08.170Z","level":"info","moduleName":"Installation Manager","pid":20628,"message":"Update: install_failed"}
{"timestamp":"2024-09-03T17:46:08.171Z","level":"info","moduleName":"Installer: 2022.3.44f1-x86_64","pid":20628,"message":"Entered State: install_failed"}

根据我的的日志信息,Unity Hub 在尝试安装 Unity 版本 2022.3.44f1 时遇到了以下问题:

1. 用户未同意 UAC 提示:

日志中提到 “user did not agree to the UAC prompt and the process was not started”,这意味着在安装过程中,Windows 弹出了一个 UAC(用户帐户控制)提示,要求管理员权限,然后我没有授予权限,导致安装失败。
事实上我安装的时候根本就没有弹出提示。

2. 权限问题:

日志还指出 “The Hub does not have proper permissions to install Unity.”,这进一步确认了 Unity Hub 缺乏必要的权限来进行安装操作。

3.PowerShell 命令无法识别:

日志中提到 “powershell.exe’ is not recognized as an internal or external command”, 表示系统未能识别 powershell.exe。这可能意味着系统环境变量中缺少 PowerShell 的路径,或者 PowerShell 安装存在问题。

解决方案

1. 授予 UAC 权限:

右键点击 Unity Hub 图标,选择“以管理员身份运行”,然后再次尝试安装。

2. 检查 PowerShell 路径:

确保 PowerShell 已正确安装,并且在系统的环境变量 PATH 中有正确的路径。通常情况下,PowerShell 应该位于 C:\Windows\System32\WindowsPowerShell\v1.0\ 路径下。可以通过以下步骤手动添加这个路径:

  1. 右键点击“此电脑”或“计算机”图标,选择“属性”。
  2. 点击“高级系统设置”,然后点击“环境变量”。
  3. 在“系统变量”中找到 Path,点击“编辑”。
  4. 确认 C:\Windows\System32\WindowsPowerShell\v1.0\ 在路径列表中。

至此,经过以上两个操作,已经可以正常下载安装了。

标签:info,09,Hub,failed,timestamp,level,Failed,message,20628
From: https://blog.csdn.net/weixin_50681225/article/details/141875781

相关文章

  • 解决podman: ERRO[0000] running newuidmap: write to uid_map failed: Invalid argum
    报错ERRO[0000]running/usr/bin/newuidmap27115520100011100000655366553710000065537:newuidmap:writetouid_mapfailed:InvalidargumentError:cannotsetupnamespaceusing"/usr/bin/newuidmap":shouldhavesetuidorhavefilecapssetu......
  • ESP32 出现 failed to load RF 报错
    前言正文周五我测试程序没有问题,板子放在桌子上就没动过了。周一过来的时候,重新烧录程序,就发现出现如下报错。最终发现是电池过放导致电池损坏功率不够,因此RF无法启动,一直在重启。解决办法很简单,换一颗正常的电池即可。W(1446)phy_init:failedtol�ESP-ROM:esp8684-api2-20220......
  • 省钱的开源项目「GitHub 热点速览」W3
    本期,我从上周的热门开源项目中挑选了5个既省钱又省事,还好玩的开源项目。首先,推荐的是省钱的电动汽车智能充电管理平台evcc,它可以根据分时电价智能安排电动车充电时间,从而降低电费,如果你家还有太阳能充电和储能设备,evcc更能最大限度地利用电能,让你的充电成本降到最低。说到省......
  • pycharm中应用PPOCRLabelv2时遇到的Qt bug:This application failed to start because
    bug提示如上所示:ThisapplicationfailedtostartbecausenoQtplatformplugincouldbeinitialized.Reinstallingtheapplicationmayfixthisproblem.尝试一:https://www.cnblogs.com/hywing/p/18240487(安装Qt过程可参考,但debug无果)尝试二:https://blog.csdn.net/m0_......
  • 省钱的开源项目「GitHub 热点速览」
    本期,我从上周的热门开源项目中挑选了5个既省钱又省事,还好玩的开源项目。首先,推荐的是省钱的电动汽车智能充电管理平台evcc,它可以根据分时电价智能安排电动车充电时间,从而降低电费,如果你家还有太阳能充电和储能设备,evcc更能最大限度地利用电能,让你的充电成本降到最低。说到省......
  • https://github.com/john-doe54548
    软件工程课程第一次作业这个作业属于哪个课程https://edu.cnblogs.com/campus/fzu/SE2024这个作业要求在哪里https://edu.cnblogs.com/campus/fzu/SE2024/homework/13243这个作业的目标为以后软件工程的学习做准备工作学号102202156后台博文编辑页面的截图......
  • Sitecore 通过 processor 来自定义类似 github 的 not found 页面
    有一个需求是类似github的404页面,当访问不存在的页面时,需要满足以下几点:不是通过redirect或其他状态码让浏览器来跳转到到404页面;链接还是原来链接,但是页面内容是404;由于是MVC模式,功能由back-end来实现;状态码得是404。在基于sitecore的框架上,使用sitecore的p......
  • 《HelloGitHub》第 101 期
    每月28号更新的开源月刊,这里有实战项目、入门教程、黑科技、开源书籍、大厂开源项目等,涵盖多种编程语言Python、Java、Go、C/C++、Swift...让你在短时间内感受到开源的魅力,对编程产生兴趣!兴趣是最好的老师,HelloGitHub让你对编程感兴趣!简介HelloGitHub......
  • 【愚公系列】《AIGC辅助软件开发》002-AI智能化编程助手:GitHub Copilot
    ......
  • ctfhub-web-SSRF通关攻略
    一、内网访问1.打开ctfhub给的环境地址2.观察题目发现让我们访问127.0.0.1下的flag.php在地址栏后面有一个url参数 ?url=http://127.0.0.1/flag.php 提交即可二、伪协议读取文件1.打开ctfhub给的环境2.观察题目发现让我们读取flag.php文件读取文件用到的协议是......