Search Unity

Bug Cannot create projects - unity internal issue?

Discussion in 'Unity Hub' started by developer3244, Jan 25, 2024.

  1. developer3244

    developer3244

    Joined:
    Jan 4, 2024
    Posts:
    88
    Hello! im here because im experiencing a glitch that makes me unable to create projects. I already have a computer which have unity installed, but i want to switch due to some reasons not related to issue.

    When i try to create a project, everything seems normal until unity shows up an error (example from a 2D project. Different templates give different errors):

    Failed to resolve project template: Failed to decompress [C:\Users\me\AppData\Roaming\UnityHub\Templates\com.unity.template.2d-1.0.7.tgz].

    When unity shows this error (which dont opens unity bug reporter), unity stop creating the project, and while the project still appearing in unity hub, project dont open, and its files arent created (opening empty project causes unity hub to say that the project isnt valid).

    Changing template just make unity say the same error for other .tgz file, so im starting to think problem is an unity internal issue. As normally unity internal issues can be fixed by repairing, i reinstalled unity hub several times, reinstalled and switched my unity editor (from which im targeting 2022.3), but nothing solves the issue.

    My dear friend ChatGPT tried to help me, saying about corrupted files (and i dont know how to threat corrupted important files...), permissions and antivirus (it doesnt looks the problem as antivirus dont blocks unity in nothing), where project is (no fixes), logs (which also says that unity got errors creating project), and some more help that dont fixes issue. As last resource, im here, needing some help.

    (Note: im also going to make this post on unity discussions, with extra info)
     
    Last edited: Jan 25, 2024
  2. rdjadu

    rdjadu

    Joined:
    May 9, 2022
    Posts:
    115
    While not really a solution to your problem, to get around the problem with the templates, you could try creating a project from the command line.

    Code (CSharp):
    1. <path-to-unity>\Unity.exe -createProject NewProject
     
    developer3244 likes this.
  3. developer3244

    developer3244

    Joined:
    Jan 4, 2024
    Posts:
    88
    Indeed not a solution: unity show an error saying that the creation of the project's folder failed (perhaps because it tried to create a game in the same directory as the unity file, or tried to find a project folder with that name, but didnt found, as it doesnt exists). I tried to do the cli code you provided in windows command prompt (aka cmd):

    Code (CSharp):
    1. cd C:\Program Files\Unity\Hub\Editor\2021.3.33f1\Editor
    2.  
    3. C:\Program Files\Unity\Hub\Editor\2021.3.33f1\Editor>Unity.exe -createProject cliProj
    But i didnt got the project. Note: creating projects via cli is too boring... also, this is a problem with templates or the way unity handles that, as i understood. Which template that project would create? (while would be cool to see unity creting a totally empty project lol)
     
  4. judesidloski

    judesidloski

    Unity Technologies

    Joined:
    May 12, 2022
    Posts:
    93
    We usually see this error message when any of the paths inside of the template is over the 260 character path limit on windows, but the Hub should catch it and warn you before you create the project. Are you on latest hub? The update with the error handling shipped around 3.4. Can you try to make a project with a single character name at the root of a drive so that we can see if it works with the shortest path length possible ?

    If it doesn't work we can probably rule out path length as a cause, and your best course of action would be to file a bug report.

    Someone at Unity encountered a similar issue recently and for them they were able to create projects with other editors. For them 2022.3.15f1 worked but 2022.3.16f1 did not.
     
  5. developer3244

    developer3244

    Joined:
    Jan 4, 2024
    Posts:
    88
    sorry for long waiting. Yes, im with the latest unity hub. So the problem is that the path may be too large? but i created a project directly at C:\My games (my games is a folder i created), and the project was called "a", but error still. Suprisingly, im literally with 2022.3.16f1! im going to try another one. I having a problem in 2021.3.33f1, but this is for another thread, so i will try the 2022.3.15f1 (is just a nuber that normally dont make difference being decreased, not even increased, so why an editor will fail and other dont?)
     
  6. developer3244

    developer3244

    Joined:
    Jan 4, 2024
    Posts:
    88