Search Unity

[Bug] Unity Hub can start the wrong version of Unity

Discussion in 'Unity Hub' started by Hyp-X, Feb 23, 2019.

  1. Hyp-X

    Hyp-X

    Joined:
    Jun 24, 2015
    Posts:
    438
    Reproduction:

    1. Download a new version of an already existing project from source control (Git, etc) which changes the ProjectVersion.txt for a different Unity version.
    2. Open the project from UnityHub

    Excepted behavior:

    UnityHub should launch the Unity version specified in ProjectVersion.txt (if it is installed) or prompt for user action (if the Unity version is not installed)

    Actual behavior:

    UnityHub launches a different Unity version which used to be in ProjectVersion.txt previously.
     
    kiber_ and Ikigai like this.
  2. joeksy

    joeksy

    Unity Technologies

    Joined:
    Jan 12, 2017
    Posts:
    155
    Hi @Hyp-X ,
    Sorry for the inconvenience, I have reproduced your case.
    I have noted down the issue.
    It seems this is due to Project list not refreshed between the version change and opening project. Meanwhile, a workaround to refresh to project list is to close the Hub window and open it again from the tray menu.
     
    _protagonist likes this.
  3. rtzcle

    rtzcle

    Joined:
    Jun 14, 2018
    Posts:
    2
    We are still having this issue with the latest version of UnityHub. I submitted Case 1162265. Same issues as reported by @Hyp-X. @joeksy this workaround you mentioned does not work. I went a step further and completely killed the unityhub process and restarted and it still does not respect the ProjectSettings\ProjectVersion.txt version of unity. Still opening up in the wrong version.
     
    kiber_ likes this.
  4. joeksy

    joeksy

    Unity Technologies

    Joined:
    Jan 12, 2017
    Posts:
    155
    Hi @rtzcle ,
    I looked at the bug you reported, I believe it is a separate case mentioned here.
    The ProjectSettings\ProjectVersion.txt is indeed what Hub base the version on. It is working as intended in your reported case. Opening project no matter it is from the Hub or not, the ProjectVersion is updated based on the Unity Editor behavior.
     
  5. Febulix

    Febulix

    Joined:
    Jun 4, 2018
    Posts:
    3
    I've the same or at least very similar and probably related issue with Unity Hub 2.1.0.0 on Windows:
    It shows version 2019.2.2f1 for an already existing project and also the selected version in the drop down menu is 2019.2.2f1. So it should launch the 2019.2.2f1 editor. But when I launch the project, an older version of the editor comes up with the message:

    Opening Project in Non-Matching Editor Installation
    ...
    The saved project (2019.2.2f1) does not match the launched editor (2019.1.8f1).
    ...

    I have to mention that I installed the version 2019.1.8f1 just before. After the installation there was literally no way to launch the project with the right editor version anymore (even after reboot etc.). Uninstalling and reinstalling 2019.2.2f1 helped. Hopefully this information helps a bit to nail down the problem.
     
  6. AbrahamDUnity

    AbrahamDUnity

    Unity Technologies

    Joined:
    Jun 28, 2017
    Posts:
    431
    @Febulix is it possible you installed 2019.1.8f1 over your 2019.2.2f1? This seems pretty likely to me.
     
  7. Febulix

    Febulix

    Joined:
    Jun 4, 2018
    Posts:
    3
    True, it looks a bit like that's what happened. But no, I also checked that and every installation went in its own directory.
     
  8. AbrahamDUnity

    AbrahamDUnity

    Unity Technologies

    Joined:
    Jun 28, 2017
    Posts:
    431
    We generally assume our Unity installs aren't tampered (maybe we shouldn't?) so if the files from 2019.2 were changed it's possible that the Hub still sees it as 2019.2 but when launching it, Unity detects the version difference and therefore shows you the warning. You can confirm this is the case if the warning is from Unity (instead of a popup inside the Hub).

    If you encounter the issue again and are certain that both editors are installed in separate folders I suggest you send us a bug report (through the Hub's tray menu option labelled "Report a Bug") so we can have a look at your logs and investigate further. Thanks for posting in the forums!

    Cheers,
     
  9. submerge_done

    submerge_done

    Joined:
    Mar 1, 2020
    Posts:
    3
    just today I have the issue, that comes up the wrong unity version. I use unity hub 2.3.1 . thats really terrible. Now I have to install a new editor version, I hope, it works.
     
  10. submerge_done

    submerge_done

    Joined:
    Mar 1, 2020
    Posts:
    3
    I found out that the unity hub has overwritten my unity.exe file, and I dont have a backup.
     
  11. AbrahamDUnity

    AbrahamDUnity

    Unity Technologies

    Joined:
    Jun 28, 2017
    Posts:
    431
    Please submit a bug report and post your ticket number here.

    Thanks,
     
  12. UDN_17d628e7-c5bf-47f9-bb47-eccd26cf2865

    UDN_17d628e7-c5bf-47f9-bb47-eccd26cf2865

    Joined:
    Dec 6, 2016
    Posts:
    2
    Bug still present - it appears the Hub can overwrite the Unity editor exe with an older version:
    https://imgur.com/NQDr2XI
     
    InfiniteDesign8 and amvick like this.
  13. Betaship

    Betaship

    Joined:
    May 7, 2022
    Posts:
    1
    I may have found a fix for this. All you need to do is uninstall effected version(s) and reinstall them, It should be fixed after that. (That fixed it for me... but I can't say the same about yours )
     
  14. UDN_17d628e7-c5bf-47f9-bb47-eccd26cf2865

    UDN_17d628e7-c5bf-47f9-bb47-eccd26cf2865

    Joined:
    Dec 6, 2016
    Posts:
    2
    Yes indeed - what Betaship says is true... though it'd be nice if the Hub couldn't overwrite the Unity editor exe with an older version - see this screenshot, the exe has been replaced by an older Editor exe:
    https://imgur.com/NQDr2XI
     
  15. tomraegan

    tomraegan

    Joined:
    Mar 28, 2016
    Posts:
    137
    Not sure if my issue is the same as this, but:

    From Hub 3.12
    - Create a new project using version: 2021.3.2f1LTS
    - Install a variety of assets and close the program. Shut down computer.
    - Next morning, load Hub.
    - Informed by Hub that my project is associated with a 2020 Unity Editor, not the 2021LTS. It requires me to update the project to the correct editor.

    I guess it's done this 5 times in the last month, spanning two versions of the Hub.
     
    Earthtender likes this.
  16. InfiniteDesign8

    InfiniteDesign8

    Joined:
    Aug 22, 2017
    Posts:
    37
    this happens to every project i make...tested 2020.3.48, 2021.3.21, 2022.3.7 Close the project. it breaks immediantly. Hub says its 2022.3.7(correct) THEN on restart UNITY non matching says its 2020.3.37! wtf ..even hub disagrees

    update1:
    after much testing (7 new projects across many unity versions) it seems to be related to an editor restart while installing dependicies and new input system required by an asset store package

    update2:
    MY FIX : I noticed the version unity would downgrade my project to would always be 2020.3.37 so i created a project in this version an install that package and the editor doesnt have to be restarted and im back in the game

    will i ever be able to upgrade again?
     
    Last edited: Aug 17, 2023
  17. Silver100

    Silver100

    Joined:
    May 4, 2019
    Posts:
    45
    I'm having the same issue on occasions if I make a back up project sometimes saves as an older version and wont open. What's strange is this only happens when I use HDD & don't use a SSD. I always test backs ups before assuming they will work when needed.