Closed loco-choco closed 1 year ago
Could you upload the log files ~/.config/unityhub/logs
, as well as try running the app from the command line and seeing if there's any relevant information in the command line output?
Here is the log file: https://pastebin.com/RFLtQpmh And there is no relevant information that appears on the command line output when trying to run the editor, only these two lines when starting the hub:
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
APPIMAGE env is not defined, current application is not an AppImage
Sorry, that paste didn't have my attempts at creating/opening a newly created project, here is the log file for that https://pastebin.com/qSbzzMxF.
This may be a unity editor crash, can you check if ~/.config/unity3d/Editor.log
has any info after trying to open the diffferent projects?
If it's an editor crash, it may be due to this being a version of unity that uses OpenSSL 1.1, and doesn't support OpenSSL 3. If that's the case, you might want to try to add the deprecated version of openssl to unity yourself:
environment.systemPackages = [
(pkgs.unityhub.override {
extraPkgs = pkgs: with pkgs; [
openssl_1_1
];
})
];
No Editor.log file was generated for 2019.4.39f1. I also tried with the overridden package but same result. Edit: I only have logs from trying to open projects with 2021.3.26f1, if those are helpful.
Hm this is very strange, just to clarify, it works with newer versions of Unity?
It opens newer versions of Unity, but they have the same issue as https://github.com/NixOS/nixpkgs/issues/205019. Overriding extraPkgs to use openssl_1_1 sadly didn't help, maybe it is because there is already openssl in there, and it is trying to first load it instead of openssl_1_1?
I did get the OpenSSL issue on an older version of 2021, but it disappeared after upgrading to 2022. A newer version of 2021 might also fix the issue.
Kinda a long shot but maybe overriding extraLibs instead of extraPkgs would do something different?
Yeah, sadly that didn't change anything.
Hm just tested myself and adding openssl_1_1
to extraLibs
did seem to make the libssl error go away in one of my 2021.3.16f1 projects. Is there some reason that this wouldn't be consistent across systems?
I'm not sure if we should even support Unity 2019, since it is end of life on Unity's side, I believe.
Sadly I need it for modding, because assetbundles are very version dependent, so I at least the same major version. Also did it work with just changing the hub, or did you need to reinstall the editor?
These were the steps I did:
libssl
error.2021.3.16f1
Oh strange, I redid the steps and it is working with 2021.3.26f1
, but this time I opened the hub from the terminal, maybe it is related to me installing it on the user. But sadly 2019
is still a no go, well at least that solves part of the problem, thanks.
I'll post this as a solution to #205019, but we'll have to probably do some more research for 2019.
For debugging purposes, can you get the log file from a session where all you do is launch the hub, and try to open a 2019 project?
Sadly pastebin didnt allow the file because of its size, but here it is https://drive.google.com/file/d/1gXykutRAGpzd83l6rnUVo9Ev4De2hFHe/view?usp=sharing. From looking at it, the error is talking about missing path, but the project is 100% there, as I got it from cloning a repository.
Relevant errors for users following:
{"timestamp":"2023-06-07T00:39:33.307Z","level":"info","moduleName":"LocalProjectService","message":"[ 'createProject projectPath: /home/locochoco/ow-mods/unity-projects/My project, editor version: 2019.4.39f1, edtitor architecture x86_64' ]"}
{"timestamp":"2023-06-07T00:39:33.319Z","level":"info","moduleName":"LaunchProcess","message":"[ 'Spawning editor instance with command: ', '/home/locochoco/Unity/Hub/Editor/2019.4.39f1/Editor/Unity', ', and arguments: ', [ '-createproject', '/home/locochoco/ow-mods/unity-projects/My project', '-cloneFromTemplate', '/home/locochoco/Unity/Hub/Editor/2019.4.39f1/Editor/Data/Resources/PackageManager/ProjectTemplates/com.unity.template.3d-4.2.8.tgz', '-cloudOrganization', '', '-cloudEnvironment', 'production', '-useHub', '-hubIPC', '-hubSessionId', 'd9cbb51f-12c6-4f39-9efa-17531f056ca4', '-accessToken', 'nSDir10xvwQVkOmLjifCyw2ZbPn7ANCvCgQRrMcwHjU004f' ] ]"}
{"timestamp":"2023-06-07T00:39:33.329Z","level":"info","moduleName":"LaunchProcess","message":"[ 'child process exited with code 127' ]"}
{"timestamp":"2023-06-07T00:41:08.219Z","level":"error","moduleName":"LocalProjectService","message":"[\n 'Error while opening a local new project: ',\n ProjectError\n at ProjectValidatorService.<anonymous> (/nix/store/s9q86w3i8a2djjgp86z74ly54bkkp8h6-unityhub-3.4.2/opt/unityhub/resources/app.asar/build/main/services/projectService/ProjectValidatorService.js:51:23)\n at Generator.next (<anonymous>)\n at fulfilled (/nix/store/s9q86w3i8a2djjgp86z74ly54bkkp8h6-unityhub-3.4.2/opt/unityhub/resources/app.asar/build/main/services/projectService/ProjectValidatorService.js:5:58) {\n errorCode: 'ERROR.PROJECT.PATH_NOT_FOUND',\n projectName: undefined,\n projectVersion: undefined,\n projectArchitecture: undefined,\n projectPath: undefined\n }\n]"}
{"timestamp":"2023-06-07T00:41:08.220Z","level":"error","moduleName":"LocalProjectService","message":"[ 'Error while opening project: {\"code\":400,\"error\":{\"errorCode\":\"ERROR.PROJECT.PATH_NOT_FOUND\",\"projectName\":\"My project\",\"projectVersion\":\"2019.4.39f1\",\"projectArchitecture\":\"x86_64\",\"projectPath\":\"/home/locochoco/ow-mods/unity-projects/My project\"}}' ]"}
My one guess would be to remove the space in the project name? Otherwise I'm unsure what could be causing this. Perhaps older Unity editor doesn't handle spaces in project names correctly. I saw this thread on reddit but might not be relevant. https://www.reddit.com/r/unity/comments/tuw1fb/project_errorprojectpath_not_found_on_mac/
Renamed the project to My-project
, strangely that project is for unity 2021, not unity 2019, but either way it still didn't work, here is the new log file https://drive.google.com/file/d/1GYiMCjBSaxn8zJyNHgKhMe3Aw-d9dLFL/view?usp=sharing. The project I tried to open with unity 2019 is called outer-wilds-unity-example
.
Found these strange messages on line 2301, it is erroring when creating a new project, but the editor was spawned to open an existing project.
{"timestamp":"2023-06-07T01:24:10.334Z","level":"info","moduleName":"LaunchProcess","message":"[ 'Spawning editor instance with command: ', '/home/locochoco/Unity/Hub/Editor/2019.4.39f1/Editor/Unity', ', and arguments: ', [ '-projectpath', '/home/locochoco/ow-mods/unity-projects/outer-wilds-unity-template', '-useHub', '-hubIPC', '-cloudEnvironment', 'production', '-licensingIpc', 'LicenseClient-locochoco', '-hubSessionId', '8d1c7d7e-8939-454d-b4de-501ad6cd2f8b', '-accessToken', 'nSDir10xvwQVkOmLjifCyw2ZbPn7ANCvCgQRrMcwHjU004f' ] ]"}
{"timestamp":"2023-06-07T01:24:10.347Z","level":"info","moduleName":"LicensingSdkService","message":"[ 'Get all entitlement groups' ]"}
{"timestamp":"2023-06-07T01:24:10.347Z","level":"info","moduleName":"LaunchProcess","message":"[ 'child process exited with code 127' ]"}
{"timestamp":"2023-06-07T01:24:10.363Z","level":"info","moduleName":"LicensingSdkService","message":"[ 'Successfully received all entitlement groups details' ]"}
{"timestamp":"2023-06-07T01:24:10.363Z","level":"info","moduleName":"LicensingSdkService","message":"[ 'Received 1 entitlement groups' ]"}
{"timestamp":"2023-06-07T01:24:10.363Z","level":"info","moduleName":"LicensingSdkService","message":"[ 'Get all entitlement groups' ]"}
{"timestamp":"2023-06-07T01:24:10.378Z","level":"info","moduleName":"LicensingSdkService","message":"[ 'Successfully received all entitlement groups details' ]"}
{"timestamp":"2023-06-07T01:24:10.378Z","level":"info","moduleName":"LicensingSdkService","message":"[ 'Received 1 entitlement groups' ]"}
{"timestamp":"2023-06-07T01:24:12.901Z","level":"info","moduleName":"LicensingSdkService","message":"[ 'checkEntitlements: checking entitlements for: com.unity.editor.ui' ]"}
{"timestamp":"2023-06-07T01:24:12.916Z","level":"info","moduleName":"LicensingSdkService","message":"[ 'Successfully checked for entitlements request.' ]"}
{"timestamp":"2023-06-07T01:24:12.920Z","level":"info","moduleName":"LicensingSdkService","message":"[ 'Get all entitlement groups' ]"}
{"timestamp":"2023-06-07T01:24:12.923Z","level":"error","moduleName":"LocalProjectService","message":"[\n 'Error while opening a local new project: ',\n ProjectError\n at ProjectValidatorService.<anonymous> (/nix/store/s9q86w3i8a2djjgp86z74ly54bkkp8h6-unityhub-3.4.2/opt/unityhub/resources/app.asar/build/main/services/projectService/ProjectValidatorService.js:51:23)\n at Generator.next (<anonymous>)\n at fulfilled (/nix/store/s9q86w3i8a2djjgp86z74ly54bkkp8h6-unityhub-3.4.2/opt/unityhub/resources/app.asar/build/main/services/projectService/ProjectValidatorService.js:5:58) {\n errorCode: 'ERROR.PROJECT.PATH_NOT_FOUND',\n projectName: undefined,\n projectVersion: undefined,\n projectArchitecture: undefined,\n projectPath: undefined\n }\n]"}
{"timestamp":"2023-06-07T01:24:12.924Z","level":"error","moduleName":"LocalProjectService","message":"[ 'Error while opening project: {\"code\":400,\"error\":{\"errorCode\":\"ERROR.PROJECT.PATH_NOT_FOUND\",\"projectName\":\"My project (1)\",\"projectVersion\":\"2019.4.39f1\",\"projectArchitecture\":\"x86_64\",\"projectPath\":\"/home/locochoco/ow-mods/unity-projects/My project (1)\"}}' ]"}
I'm having the same issue on 2019.4.31f1
. I installed 2022.3.3f1
to test and it works correctly on that version.
{"timestamp":"2023-06-25T17:18:31.427Z","level":"info","moduleName":"LaunchProcess","message":"[ 'Spawning editor instance with command: ', '/home/bddvlpr/.local/share/unity3d/2019.4.31f1/Editor/Unity', ', and arguments: ', [ '-createproject', '/home/bddvlpr/Documents/Unity/REDACTED', '-cloneFromTemplate', '/home/bddvlpr/.local/share/unity3d/2019.4.31f1/Editor/Data/Resources/PackageManager/ProjectTemplates/com.unity.template.3d-4.2.8.tgz', '-cloudOrganization', '', '-cloudEnvironment', 'production', '-useHub', '-hubIPC', '-hubSessionId', 'REDACTED', '-accessToken', 'REDACTED' ] ]"}
{"timestamp":"2023-06-25T17:18:31.435Z","level":"info","moduleName":"LicensingSdkService","message":"[ 'Get all entitlement groups' ]"}
{"timestamp":"2023-06-25T17:18:31.438Z","level":"info","moduleName":"LaunchProcess","message":"[ 'child process exited with code 127' ]"}
If only the logs were more verbose...
I've been putting off actually testing locally, but since multiple people are having this problem, I'll see if I have any luck reproducing this on 2019 later today.
I tried manually initializing a project by extracting the template from the given path under the installed Unity version. Seems like it still exits Unity on launch with the same 127
exit code.
Man this was such an easy problem to solve, the 2019 version of the editor simply depended on some extra libraries that the newer version no longer depend on. I'll list them here so you can add them temporarily, and I'll also update the package to include them.
xorg.libXi
xorg.libXrender
gnome2.GConf
libcap
For future reader's reference, because the unityhub log didn't include which libraries we were missing, I instead manually ran the editor from the FHS env directly. To find the path to the FHS env, I usually vim
the unityhub
binary, which is a simple wrapper that runs the real binary with the FHS env, so you can just copy the path to the FHS env from there.
Perhaps I'll add a simple run script that does something similar to steam-run
, which can help with debugging these issues, and could also be useful for launching dev tools and such.
I'll keep this issue open until I get extra confirmation this works, and the extra libraries are added to the main package.
It indeed works with the missing dependencies. Thanks a lot for your help.
Describe the bug
Unity Hub can't create or open a project using Unity Editor 2019.4.39f1.
Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
It was expected that the editor would open the project.
Screenshots
Screenshot of the editor failing silently to create a new project.
Screenshot of trying to re-open the new "ghost project".
Additional context
If you try to create a new project, it will hang and then silently fail, creating a "ghost project", as seen on the screenshots. And if you try to open a previously created project, it will hang and then silently fail.
Notify maintainers
@tesq0 @huantianad
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.