oculus-samples / Unity-Discover

Discover is a showcase of the Meta Quest Mixed Reality APIs. This project demonstrate how to use Passthrough, Spatial Anchors, Scene API, Colocation and Shared Anchors.
MIT License
248 stars 59 forks source link

MANY errors trying to load the project. #4

Closed RiverExplorer closed 1 year ago

RiverExplorer commented 1 year ago

A fresh pull results in the editor 2022.3.5f1 going into a loop producing over 1,000 errors.

Loading it in safe mode produced 12 errors. All unsatisfied package dependencies. All 'update' attempts fail. All of them are for -prerelease packages.

Many say various git error messages.

Whoever pushed this did not test it with a fresh system or fresh install.

v23v commented 1 year ago

I also had many compilation errors when opening Unity2022.3.3. He only needs to pull down the project again and see this pile of compilation errors, unable to load the project. This kind of less rigorous release indeed has a poor experience. Even the documents have errors, as PhotonAppSettings does not exist in the Assets/Photo/Resources/directory at all

jasonmeisel commented 1 year ago

@RiverExplorer I'm not reproducing this issue on 2022.3.5f1. If there are git error messages, it's possible you don't have Git LFS set up correctly. If that's not the case, could you provide logs?

@v23v I'm not sure what you mean - the link to PhotonAppSettings in the Configuration doc is working fine.

v23v commented 1 year ago

Thank you for reply. I mean the the correct psth of the photonAppSetting is Assets/Photon/Fusion/Resources/PhotonAppSettings.asset. It's not the path [ Assets/Photo/Resources/PhotonAppSettings.asset] mentioned in the document . However, this is only a minor issue. The main issue is that Unity has many compilation errors and cannot load the project。 something like this :Assets\Photon\PhotonRealtime\Code\AppSettings.cs(20,26): error CS0246: The type or namespace name 'ExitGames' could not be found (are you missing a using directive or an assembly reference?)

@v23v I'm not sure what you mean - the link to PhotonAppSettings in the Configuration doc is working fine.

v23v commented 1 year ago

企业微信截图_16909483238715 @jasonmeisel

RiverExplorer commented 1 year ago

Yes, those are the errors I see.

I am trying the ZIP file now.

RiverExplorer commented 1 year ago

With the ZIP file, I get "An error occurred while resolving packages: Project has invalid dependencies: com.cysharp.unitask: Error when executing git command, fatal: not in a git directory.

com.dbrizov.naughtyattributes: Error when executing a git command, fatal: not in a git directory.

com.marijnzmemmer.unity-toolbar-extender: Error when executing git command, fatal: not in a git directory ...

(I then hit the continue button) Unity then pops-up the : " ... Enter safe mode", "Ignore", "Quit" pop up . I hit "Enter safe mode".

It then produces 230 errors (See v23v post).

jasonmeisel commented 1 year ago

The ZIP file won't work, as GitHub doesn't put the LFS files in the ZIP. You can tell by looking at one of the images like this one: ./Documentation/Media/banner.png

If it's a valid png, then you've done an LFS checkout. If it's a text file, that's an LFS pointer file.

I've tried doing a non-lfs checkout, and that reproduces your errors. Make sure you've run git lfs install before cloning the repo. In addition, you can run git lfs checkout in your clone, and that should replace the pointer files with the full files.

RiverExplorer commented 1 year ago

Then I would suggest not distributing the ZIP file any more.

RiverExplorer commented 1 year ago

git says LFS is enabled. Banner.png looks just fine.

RiverExplorer commented 1 year ago

I downloaded again. Making sure the LFS in enabled. EXACTLY the same errors, and Banner.png still looks fine.

RiverExplorer commented 1 year ago

And by downloaded, I mean deleted the entire project from my system and cloned with LFS enabled again.

v23v commented 1 year ago

I think those errors come from the missing DLLs in the fusion directory of the project which clone by git clone cmd . 企业微信截图_16910346385449

mazvalente commented 1 year ago

I downloaded again. Making sure the LFS in enabled. EXACTLY the same errors, and Banner.png still looks fine.

I can't reproduce this issue at all performing a fresh clone with Git LFS and setting up the project. Are you working on a non-Windows computer by any chance?

RiverExplorer commented 1 year ago

I just tried. I am getting what looks to be the same with the Unity-SharedSpaces repo.

I don't have something I need. And/Or you have something not included or documented.

Trying it on Linux now.

RiverExplorer commented 1 year ago

It looks like a file system issue. I cloned it on Linux, then did an rsync to windows. It gave me a start up error like 'can't open read only scene'. So then I used explorer to make all files read/write. Now the project loads without errors.

On windows I tried 'GitHub Desktop', 'Git for Windows' and cygwin.

What implementation of GIT do you use?

RiverExplorer commented 1 year ago

Unity 2022.3 Linux gives me the same error from a fresh GIT clone 'It is not allowed to open a scene in a read-only package". I then did a 'chown -R u+rw' from the top of the project. Several files in:

/Library/PackageCache/com.meta.xr.sdk.interaction.ovr.samples@53.0.0-preview/Runtime/Objects/Environment/Tooltips/DialogVideos

Were not readable after the clone. Fixed after the chmod. And they play okay, so it is not an LFS problem.

I can now open the project in Windows and Linux after fixing the file permission problems.

Starting the builds on both platforms now.

RiverExplorer commented 1 year ago

I have no idea if other files had the not readable problem. I just fixed the entire tree.

RiverExplorer commented 1 year ago

A somewhat fresh install of Windows-10 and Fedora Linux release 38.

mazvalente commented 1 year ago

@RiverExplorer Interesting. I didn't try with Github Desktop myself as that's notoriously buggy for more complicated repositories but I would have expected Git for Windows to work. In my case I used Windows Terminal configured with MSYS2 and had no issues setting up the repository from scratch. I did see the same 'It is not allowed to open a scene in a read-only package' error you mentioned, but that didn't cause the slew of errors you experienced.

RiverExplorer commented 1 year ago

Also, an odd warning on Linux: (I have no '/home/bokken...') on my system.

GUI Error: Invalid GUILayout state in BuildPlayerWindow view. Verify that all layout Begin/End calls match UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /home/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:190)

RiverExplorer commented 1 year ago

ArgumentException: Getting control 1's position in a group with only 1 controls when doing repaint Aborting UnityEngine.GUILayoutGroup.GetNext () (at /home/bokken/build/output/unity/unity/Modules/IMGUI/LayoutGroup.cs:127) UnityEngine.GUILayoutUtility.DoGetRect (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at /home/bokken/build/output/unity/unity/Modules/IMGUI/GUILayoutUtility.cs:458) UnityEngine.GUILayoutUtility.GetRect (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at /home/bokken/build/output/unity/unity/Modules/IMGUI/GUILayoutUtility.cs:415) UnityEngine.GUILayout.DoButton (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at /home/bokken/build/output/unity/unity/Modules/IMGUI/GUILayout.cs:36) UnityEngine.GUILayout.Button (System.String text, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at /home/bokken/build/output/unity/unity/Modules/IMGUI/GUILayout.cs:32) UnityEditor.Android.AndroidBuildWindowExtension.DoTargetListUnsafe () (at :0) UnityEditor.Android.AndroidBuildWindowExtension.DoTargetList () (at :0) UnityEditor.Android.AndroidBuildWindowExtension.ShowPlatformBuildOptions () (at :0) UnityEditor.BuildPlayerWindow.ShowBuildTargetSettings () (at /home/bokken/build/output/unity/unity/Editor/Mono/BuildPlayerWindow.cs:887) UnityEditor.BuildPlayerWindow.OnGUI () (at /home/bokken/build/output/unity/unity/Editor/Mono/BuildPlayerWindow.cs:530) UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at /home/bokken/build/output/unity/unity/Editor/Mono/HostView.cs:512) UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) (at /home/bokken/build/output/unity/unity/Editor/Mono/GUI/DockArea.cs:386) UnityEditor.DockArea.OldOnGUI () (at /home/bokken/build/output/unity/unity/Editor/Mono/GUI/DockArea.cs:377) UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:376) UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:676) UnityEngine.UIElements.IMGUIContainer.DoIMGUIRepaint () (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/IMGUIContainer.cs:536) UnityEngine.UIElements.UIR.RenderChainCommand.ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams drawParams, System.Single pixelsPerPoint, System.Exception& immediateException) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Renderer/UIRenderer/UIRenderers.cs:130) Rethrow as ImmediateModeException UnityEngine.UIElements.UIR.RenderChain.Render () (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Renderer/UIRRenderChain.cs:514) UnityEngine.UIElements.UIRRepaintUpdater.Update () (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Renderer/UIRRepaintUpdater.cs:79) UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/VisualTreeUpdater.cs:111) UnityEngine.UIElements.Panel.UpdateForRepaint () (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Panel.cs:1026) UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/Panel.cs:1087) UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:454) UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:205) UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:74) UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at /home/bokken/build/output/unity/unity/ModuleOverrides/com.unity.ui/Core/UIElementsUtility.cs:28) UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at /home/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:190)

RiverExplorer commented 1 year ago

Builds on Windows if I clone it on Linux, then copy the files back, then fix the permissions. Does not build on Linux (And I don't care right now). Mostly the failure is missing audio items.

vkaramian commented 1 year ago

hello, I tried this yesterday and today, the project is having issues loading the package. Manually installing them also gives errors.

image

Unity version 2022.3.1f1

vkaramian commented 1 year ago

hello, I tried this yesterday and today, the project is having issues loading the package. Manually installing them also gives errors.

image

Unity version 2022.3.1f1

Just for anyone else facing this issue, it was due to an external SSD and not NTFS. Make sure you clone the repo on a NTFS file system.

jasonmeisel commented 1 year ago

Builds on Windows if I clone it on Linux, then copy the files back, then fix the permissions. Does not build on Linux (And I don't care right now). Mostly the failure is missing audio items.

Sounds like the core issue is resolved. If you have any other problems, feel free to open a new issue on the repo!