Unity Editor Version Issues and Persistent Console Error

Hello everyone, I originally had Unity Editor version 2022.3.6f1 installed, but today I suddenly couldn’t launch the editor from Unity Hub, and I kept getting an “application error”. Reinstalling 2022.3.6f1 didn’t help, and even when I tried installing 2022.3.8f1, I faced the same issue. So, I decided to install 2023.1.10f1, and finally, I was able to open the Unity Editor. My existing projects can now only be opened with 2023.1.10f1, but the console displays the following error. Even though there’s an error, the project still runs normally. However, constantly seeing this error is quite bothersome. Does anyone know how to resolve this?

Error detecting Visual Studio installations: System.ArgumentException: JSON parse error: Missing a comma or '}' after an object member.
at (wrapper managed-to-native) UnityEngine.JsonUtility.FromJsonInternal(string,object,System.Type)
at UnityEngine.JsonUtility.FromJson (System.String json, System.Type type) [0x0005f] in <0c2e081264354d5689a31eb5ff26b1d1>:0 
at UnityEngine.JsonUtility.FromJson[T] (System.String json) [0x00001] in <0c2e081264354d5689a31eb5ff26b1d1>:0 
at Microsoft.Unity.VisualStudio.Editor.VisualStudioForWindowsInstallation+VsWhereResult.FromJson (System.String json) [0x00000] in .\Library\PackageCache\com.unity.ide.visualstudio@2.0.20\Editor\VisualStudioForWindowsInstallation.cs:188 
at Microsoft.Unity.VisualStudio.Editor.VisualStudioForWindowsInstallation.QueryVsWhere () [0x00044] in .\Library\PackageCache\com.unity.ide.visualstudio@2.0.20\Editor\VisualStudioForWindowsInstallation.cs:237 
at Microsoft.Unity.VisualStudio.Editor.VisualStudioForWindowsInstallation+<GetVisualStudioInstallations>d__16.MoveNext () [0x00024] in .\Library\PackageCache\com.unity.ide.visualstudio@2.0.20\Editor\VisualStudioForWindowsInstallation.cs:175 
at Microsoft.Unity.VisualStudio.Editor.Discovery+<GetVisualStudioInstallations>d__0.MoveNext () [0x0006e] in .\Library\PackageCache\com.unity.ide.visualstudio@2.0.20\Editor\Discovery.cs:16 
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector, System.Func`2[T,TResult] elementSelector, System.Collections.Generic.IEqualityComparer`1[T] comparer) [0x000a3] in <aaefe8c59ae740868836d2ee0aa0340a>:0 
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector, System.Func`2[T,TResult] elementSelector) [0x00000] in <aaefe8c59ae740868836d2ee0aa0340a>:0 
at Microsoft.Unity.VisualStudio.Editor.VisualStudioEditor.DiscoverInstallations () [0x00000] in .\Library\PackageCache\com.unity.ide.visualstudio@2.0.20\Editor\VisualStudioEditor.cs:66 
UnityEngine.Debug:LogError (object)
Microsoft.Unity.VisualStudio.Editor.VisualStudioEditor:smile:iscoverInstallations () (at ./Library/PackageCache/com.unity.ide.visualstudio@2.0.20/Editor/VisualStudioEditor.cs:72)
Microsoft.Unity.VisualStudio.Editor.AsyncOperation`1<System.Collections.Generic.Dictionary`2<string, Microsoft.Unity.VisualStudio.Editor.IVisualStudioInstallation>>:<Run>b__8_0 (object) (at ./Library/PackageCache/com.unity.ide.visualstudio@2.0.20/Editor/AsyncOperation.cs:42)
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()

Please don’t post this kind of stuff on the 2D sub-forum as it isn’t related to 2D features.

I’ll move your post to the IDE sub-forum for you.

Thanks.

The Visual Studio package chokes on a JSON file while searching for Visual Studio installations. Either the JSON file has been corrupted or is not of a format Unity expects.

You could try to uninstall all your VS installations, though the offending file might not be cleaned up by the uninstallation process.

Better probably would be to embed the VS package and edit the VisualStudioForWindowsInstallation.cs file to log out the path to the JSON file. Then you can check if the file is corrupted and which installation and component it’s part of.

Hello, we fixed this issue. This will be available in the next version (2.0.21). This is happening when your system is using non-UTF code pages (like for Korean locale).

If I still want to use 2022.3.6f1, but the following error always appears in the event log, how should I handle it


Failed application name: Unity.exe, version: 2022.3.6.59111, timestamp: 0x64bff046 
Failed module name: Unity.exe, version: 2022.3.6.59111, timestamp: 0x64bff046 
Exception code: 0xc0000005 Error offset: 0x0000000002c02d7c 
Failed process ID: 0x0xD10 
Failed application start time: 0x0x1D9DA3AB1A30479 
Failed application path: D:\unity\Editor\2022.3.6f1\Editor\Unity.exe 
Failed module path: D:\unity\Editor\2022.3.6f1\Editor\Unity.exe 
Report ID: c58e0f02-8fab-4091-8c64-eb76f7e3dc8f 
Failed package full name: 
Failed package-relative application ID: