Search Unity

Package Manager throwing numerous errors.

Discussion in 'Package Manager' started by pushxtonotdie, Jan 6, 2019.

  1. pushxtonotdie

    pushxtonotdie

    Joined:
    Oct 21, 2010
    Posts:
    91
    I'm attempting to evaluate the tutorials in Unity for purposes of training and I'm unable to get them to work. Specifically I'm attempting to get the 'roll a ball' and the 'getting started' projects in the Hub (1.4.0) to work, but they throw various errors related to PackMan and some packages. It also seems to take a while to open. Various examples are pasted below, with a total of 50-60 total. These errors do not occur when opening an empty project or other games i'm working on. Any ideas?

    Code (CSharp):
    1.  
    2. C:/Users/chris/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabHistoryWindow.cs(20,56): error CS0122: `UnityEditor.Collaboration.ICollabHistoryWindow' is inaccessible due to its protection level
    3.  
    4. C:/Users/chris/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarButton.cs(11,42): error CS0246: The type or namespace name `SubToolbar' could not be found. Are you missing an assembly reference?
    5.  
    6. C:/Users/chris/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarWindow.cs(26,42): error CS0122: `UnityEditor.Web.WebViewEditorStaticWindow' is inaccessible due to its protection level
    7.  
    8.  
    9. C:/Users/chris/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.package-manager-ui@2.0.3/Editor/Sources/Services/Upm/UpmBaseOperation.cs(33,34): error CS1061: Type `UnityEditor.PackageManager.PackageInfo' does not contain a definition for `author' and no extension method `author' of type `UnityEditor.PackageManager.PackageInfo' could be found. Are you missing an assembly reference?
    10.  
    11. C:/Users/chris/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.package-manager-ui@2.0.3/Editor/Sources/Services/Upm/UpmBaseOperation.cs(34,43): error CS1061: Type `UnityEditor.PackageManager.PackageInfo' does not contain a definition for `author' and no extension method `author' of type `UnityEditor.PackageManager.PackageInfo' could be found. Are you missing an assembly reference?
    12.  
    13.  
    14. MethodAccessException: Method `UnityEditor.Analytics.AnalyticsSettings:get_enabledForPlatform ()' is inaccessible from method `UnityEditor.Analytics.AnalyticsImporter:<AnalyticsImporter>m__6 (UnityEditor.BuildTarget,System.Collections.Generic.HashSet`1<string>)'
    15.  
    16. UnityEditor.Build.BuildDefines.GetScriptCompilationDefines (BuildTarget target, System.String[] defines) (at C:/buildslave/unity/build/Modules/BuildPipeline/Editor/Managed/BuildDefines.cs:20)
    17. UnityEditorInternal.InternalEditorUtility:GetCompilationDefines(EditorScriptCompilationOptions, BuildTargetGroup, BuildTarget, ApiCompatibilityLevel)
    18. UnityEditorInternal.InternalEditorUtility:GetCompilationDefines(EditorScriptCompilationOptions, BuildTargetGroup, BuildTarget) (at C:/buildslave/unity/build/Editor/Mono/InternalEditorUtility.cs:424)
    19. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
     
  2. AllFatherGray

    AllFatherGray

    Joined:
    Nov 29, 2014
    Posts:
    8
    I'm getting the same thing but only after I attempted to downgrade to 2018.2.
     
    Westland likes this.
  3. pushxtonotdie

    pushxtonotdie

    Joined:
    Oct 21, 2010
    Posts:
    91
    Interesting! I’m not downgrading, as i’m just clicking the ‘start’ button in Unity Hub. Unity is making the project for me. I am using 2018.2 and don’t have 2018.3 installed. But i’d assume these projects would be compatible, especially something like Roll-a-ball which is pretty old. I was able to export the roll-a-ball assets to a .unity package and re-import into an empty project as a workaround.
     
  4. pedro_unity

    pedro_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    162
    Hi @pushxtonotdie,

    Seems you may have found an issue. So, if I understand correctly, you are starting a tutorial roll-a-ball project through the Hub in 2018.2 and these messages appear in the Unity console after startup?

    I tried with the following production version to no avail :
    Version 2018.2.14f1 (3262fb3b0716)
    Thu, 25 Oct 2018 10:04:14 GMT
    Branch: 2018.2/release


    Things work well when I started a project through the Learn tab in the Hub. Can you tell me what version you are using?

    Cheers,
    Pedro
    Unity STE
     
  5. pushxtonotdie

    pushxtonotdie

    Joined:
    Oct 21, 2010
    Posts:
    91
    Hi Pedro, thanks for taking the time to investigate.

    Yes, this is correct. I'm using Unity Hub 1.4.0 and 2018.2.4f1.
    Steps to repro:
    Open the hub.
    Navigate to Learn->Tutorial Projects.
    Click to download the Roll-a-ball Project. This has also been repro-ed with the 'Getting Started' projects.
    Click 'Start'.
    Unity will open. Observe that there are errors related to Unity Analytics.
    Click 'I made a backup go ahead'.
    Unity will attempt to compile. Observe that more errors occur as mentioned above, and you cannot run the project.

    If you cannot repro, then i may do something like wipe my PackMan folder or something. But I think that I have what I need to teach this workshop to new users. I need these files to exist offline anyway, as having a number of users dl-ing unity and roll-a-ball etc. on a library's internet connection probably won't work. So probably low-priority bug if you can't repro?
     
  6. pedro_unity

    pedro_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    162
    Interesting @pushxtonotdie,

    We technically have the same "Unity" environment. Maybe an OS difference? I'm running MacOS Mojave 10.14.1 (18B75). You are running Windows, so I'll check on that OS and get back to you shortly.

    Meanwhile, (and I know you probably know this better than I) the errors above happen when one of our API changes and the Unity code referencing those get changed so technically this means that those packages are not present on your machine or a compilation issue stopped Unity from fetching these.

    1. If you look at the Unity installation and navigate to the Editor manifest (mine is here: C:\Program Files\Unity 2018.2.14f1\Editor\Data\Resources\PackageManager\Editor\manifest.json), you should get an output that looks like this:
    Code (JavaScript):
    1. {
    2.     "com.unity.package-manager": "1.19.3",
    3.     "dependencies": {
    4.     },
    5.     "recommended": {
    6.         "com.unity.analytics": "2.0.16",
    7.         "com.unity.purchasing": "2.0.3",
    8.         "com.unity.ads": "2.0.8",
    9.         "com.unity.textmeshpro": "1.2.4",
    10.         "com.unity.package-manager-ui": "1.9.11"
    11.     },
    12.     "defaultDependencies": {
    13.         "com.unity.analytics": "2.0.16",
    14.         "com.unity.purchasing": "2.0.3",
    15.         "com.unity.ads": "2.0.8",
    16.         "com.unity.textmeshpro": "1.2.4",
    17.         "com.unity.package-manager-ui": "1.9.11",
    18.         "com.unity.modules.ai": "1.0.0",
    19.         "com.unity.modules.animation": "1.0.0",
    20.         "com.unity.modules.assetbundle": "1.0.0",
    21.         "com.unity.modules.audio": "1.0.0",
    22.         "com.unity.modules.cloth": "1.0.0",
    23.         "com.unity.modules.director": "1.0.0",
    24.         "com.unity.modules.imageconversion": "1.0.0",
    25.         "com.unity.modules.imgui": "1.0.0",
    26.         "com.unity.modules.jsonserialize": "1.0.0",
    27.         "com.unity.modules.particlesystem": "1.0.0",
    28.         "com.unity.modules.physics": "1.0.0",
    29.         "com.unity.modules.physics2d": "1.0.0",
    30.         "com.unity.modules.screencapture": "1.0.0",
    31.         "com.unity.modules.terrain": "1.0.0",
    32.         "com.unity.modules.terrainphysics": "1.0.0",
    33.         "com.unity.modules.tilemap": "1.0.0",
    34.         "com.unity.modules.ui": "1.0.0",
    35.         "com.unity.modules.uielements": "1.0.0",
    36.         "com.unity.modules.umbra": "1.0.0",
    37.         "com.unity.modules.unityanalytics": "1.0.0",
    38.         "com.unity.modules.unitywebrequest": "1.0.0",
    39.         "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
    40.         "com.unity.modules.unitywebrequestaudio": "1.0.0",
    41.         "com.unity.modules.unitywebrequesttexture": "1.0.0",
    42.         "com.unity.modules.unitywebrequestwww": "1.0.0",
    43.         "com.unity.modules.vehicles": "1.0.0",
    44.         "com.unity.modules.video": "1.0.0",
    45.         "com.unity.modules.vr": "1.0.0",
    46.         "com.unity.modules.wind": "1.0.0",
    47.         "com.unity.modules.xr": "1.0.0"
    48.     }
    49. }
    50.  
    1. Navigate to App data (here: C:\Users\pedroa\AppData\LocalLow\Unity\cache\packages\packages.unity.com). Make sure that the packages creating issues are found in there (package-manager-ui, analytics).
    2. Backup cache folder. Reboot Unity.
    Let me know what happens please!

    Cheers,
    Pedro
    Unity STE
     
  7. pushxtonotdie

    pushxtonotdie

    Joined:
    Oct 21, 2010
    Posts:
    91
    So I just tried to download and run roll-a-ball on my work macbook via hub and i got similar errors! :O Totally different computer/install. I'm at work tho so I cannot spend more time on this, but I was able to repro...i wonder what i'm doing wrong! :(

    2018.1.8f1
    OS X 10.13.6

    After work tonight I'll look at the editor manifests, etc. and see if I can get you more info.
     
  8. pedro_unity

    pedro_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    162
    Ok, that is very bizarre indeed.

    I'll see if can reproduce on that same version and update you as soon as possible. Thank you for your time.

    Cheers,
    Pedro
    Unity STE
     
  9. pushxtonotdie

    pushxtonotdie

    Joined:
    Oct 21, 2010
    Posts:
    91
    Sorry I haven't gotten back to you earlier. Ok, I've looked at the problem a bit further. First, my editor manifest matches yours. I've gone ahead and saved the roll-a-ball tutorial project upon shutdown (choosing 'keep' instead of 'forget') so I can inspect the broken project. The two offending packages are com.unity.collab-proxy@1.2.15 com.unity.package-manager-ui@2.0.3. Removing these from the manifest fixes the issue.

    My currently installed packages:

    com.unity.ads@2.0.8
    com.unity.ads@2.3.1
    com.unity.analytics@2.0.13
    com.unity.analytics@2.0.16
    com.unity.analytics@3.2.2
    com.unity.collab-proxy@1.2.15
    com.unity.package-manager-ui@1.9.11
    com.unity.package-manager-ui@2.0.3
    com.unity.postprocessing@2.0.7-preview
    com.unity.purchasing@0.0.19
    com.unity.purchasing@2.0.3
    com.unity.render-pipelines.core@1.1.11-preview
    com.unity.render-pipelines.lightweight@1.1.11-preview
    com.unity.shadergraph@1.1.9-preview
    com.unity.standardevents@1.0.10
    com.unity.standardevents@1.0.13
    com.unity.textmeshpro@1.2.4
    com.unity.textmeshpro@1.3.0


    I then wiped my packages dir and re-created the project. Unity pullled the deps again and my packages folder looked like:

    com.unity.ads@2.0.8
    com.unity.ads@2.3.1
    com.unity.analytics@2.0.16
    com.unity.analytics@3.2.2
    com.unity.collab-proxy@1.2.15
    com.unity.package-manager-ui@1.9.11
    com.unity.package-manager-ui@2.0.3
    com.unity.purchasing@2.0.3
    com.unity.standardevents@1.0.13
    com.unity.textmeshpro@1.2.4
    com.unity.textmeshpro@1.3.0

    Still can't get it to work....
     
  10. InitusInteractive

    InitusInteractive

    Joined:
    Aug 16, 2018
    Posts:
    62
    I'm having the same issue. It seems not only is Package Manager missing I am now getting a lot of errors related to "UnityEditor.Analytics.AnalyticsImporter" as well as "PostProcessing" which (I believe) came after Help>Reset Packages to defaults.

    At the moment, my project is broken and I am unable to fix it.
     
  11. InitusInteractive

    InitusInteractive

    Joined:
    Aug 16, 2018
    Posts:
    62
    Additional Details


    MethodAccessException: Method `UnityEditor.Analytics.AnalyticsSettings:get_enabledForPlatform ()' is inaccessible from method `UnityEditor.Analytics.AnalyticsImporter:<AnalyticsImporter>m__6 (UnityEditor.BuildTarget,System.Collections.Generic.HashSet`1<string>)'

    UnityEditor.Build.BuildDefines.GetScriptCompilationDefines (BuildTarget target, System.String[] defines) (at C:/buildslave/unity/build/Modules/BuildPipeline/Editor/Managed/BuildDefines.cs:20)
    UnityEditorInternal.InternalEditorUtility:GetCompilationDefines(EditorScriptCompilationOptions, BuildTargetGroup, BuildTarget, ApiCompatibilityLevel)
    UnityEditorInternal.InternalEditorUtility:GetCompilationDefines(EditorScriptCompilationOptions, BuildTargetGroup, BuildTarget) (at C:/buildslave/unity/build/Editor/Mono/InternalEditorUtility.cs:424)
    UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:DeleteUnusedAssemblies()

    -------------------------------------------------------

    Assets/MenuExit.cs(4,29): error CS0234: The type or namespace name `PostProcessing' does not exist in the namespace `UnityEngine.Rendering'. Are you missing an assembly reference?
     
  12. pedro_unity

    pedro_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    162
    Hello @InitusInteractive,

    That doesn't seem like the same problem or are you also starting the Roll-a-ball tutorial and seeing console errors related to this?
    Nevertheless, please post Unity version you're using and logs and I'll try to see what the issue might be.

    As for your problem, @pushxtonotdie, there is some curious elements to your case. I tried again in both OS' and am not seeing errors at creation. I have some ideas as to what I should be trying, but bear with us and we will try to sort this case out for you.

    Thanks for your patience.
    Cheers,
    Pedro
    Unity STE
     
  13. welcometoJapan

    welcometoJapan

    Joined:
    Jan 12, 2019
    Posts:
    1
    I am also having the a similar issue when I launch Roll-a-Ball from Hub v1.4.0. with Unity v2018.2.18f
    My OS is Windows 10 Home v10.0.17763 Build 17763.

    Error
    Code (JavaScript):
    1. MethodAccessException: Method `UnityEditor.Analytics.AnalyticsSettings:get_enabledForPlatform ()' is inaccessible from method `UnityEditor.Analytics.AnalyticsImporter:<AnalyticsImporter>m__6 (UnityEditor.BuildTarget,System.Collections.Generic.HashSet`1<string>)'
    2.  
    3. UnityEditor.Build.BuildDefines.GetScriptCompilationDefines (BuildTarget target, System.String[] defines) (at C:/buildslave/unity/build/Modules/BuildPipeline/Editor/Managed/BuildDefines.cs:20)
    4. UnityEditorInternal.InternalEditorUtility:GetCompilationDefines(EditorScriptCompilationOptions, BuildTargetGroup, BuildTarget, ApiCompatibilityLevel)
    5. UnityEditorInternal.InternalEditorUtility:GetCompilationDefines(EditorScriptCompilationOptions, BuildTargetGroup, BuildTarget) (at C:/buildslave/unity/build/Editor/Mono/InternalEditorUtility.cs:424)
    6. UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:GetTargetAssembliesWithScripts()
    7.  
    Manifest
    Code (JavaScript):
    1. {
    2.     "com.unity.package-manager": "1.19.5",
    3.     "dependencies": {
    4.     },
    5.     "recommended": {
    6.         "com.unity.analytics": "2.0.16",
    7.         "com.unity.purchasing": "2.0.3",
    8.         "com.unity.ads": "2.0.8",
    9.         "com.unity.textmeshpro": "1.2.4",
    10.         "com.unity.package-manager-ui": "1.9.11"
    11.     },
    12.     "defaultDependencies": {
    13.         "com.unity.analytics": "2.0.16",
    14.         "com.unity.purchasing": "2.0.3",
    15.         "com.unity.ads": "2.0.8",
    16.         "com.unity.textmeshpro": "1.2.4",
    17.         "com.unity.package-manager-ui": "1.9.11",
    18.         "com.unity.modules.ai": "1.0.0",
    19.         "com.unity.modules.animation": "1.0.0",
    20.         "com.unity.modules.assetbundle": "1.0.0",
    21.         "com.unity.modules.audio": "1.0.0",
    22.         "com.unity.modules.cloth": "1.0.0",
    23.         "com.unity.modules.director": "1.0.0",
    24.         "com.unity.modules.imageconversion": "1.0.0",
    25.         "com.unity.modules.imgui": "1.0.0",
    26.         "com.unity.modules.jsonserialize": "1.0.0",
    27.         "com.unity.modules.particlesystem": "1.0.0",
    28.         "com.unity.modules.physics": "1.0.0",
    29.         "com.unity.modules.physics2d": "1.0.0",
    30.         "com.unity.modules.screencapture": "1.0.0",
    31.         "com.unity.modules.terrain": "1.0.0",
    32.         "com.unity.modules.terrainphysics": "1.0.0",
    33.         "com.unity.modules.tilemap": "1.0.0",
    34.         "com.unity.modules.ui": "1.0.0",
    35.         "com.unity.modules.uielements": "1.0.0",
    36.         "com.unity.modules.umbra": "1.0.0",
    37.         "com.unity.modules.unityanalytics": "1.0.0",
    38.         "com.unity.modules.unitywebrequest": "1.0.0",
    39.         "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
    40.         "com.unity.modules.unitywebrequestaudio": "1.0.0",
    41.         "com.unity.modules.unitywebrequesttexture": "1.0.0",
    42.         "com.unity.modules.unitywebrequestwww": "1.0.0",
    43.         "com.unity.modules.vehicles": "1.0.0",
    44.         "com.unity.modules.video": "1.0.0",
    45.         "com.unity.modules.vr": "1.0.0",
    46.         "com.unity.modules.wind": "1.0.0",
    47.         "com.unity.modules.xr": "1.0.0"
    48.     }
    49. }
    50.  
    The problem is even worse when I open the Getting Started 01: Play & Edit Mode tutorial.

    Edit: I've tried uninstalling Unity and now installed version 2018.2.20f1. The issue persists.

    However, updating to Unity v2018.3.1f1 seems to have fixed it. The errors are gone :)
     
    Last edited: Jan 13, 2019
  14. pedro_unity

    pedro_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    162
    Hello @InitusInteractive and @welcometoJapan,

    Thanks @welcometoJapan, that is also what I have observed in my tries, but in my case, I don't consistently reproduce the errors you seem to have. They happen about 1 or 2 times out of 5 on a new project. I will be logging an issue and will follow up with the external link shortly. Thank you for reporting.

    Cheers,
    Pedro
    Unity STE
     
  15. pushxtonotdie

    pushxtonotdie

    Joined:
    Oct 21, 2010
    Posts:
    91
    Hi Pedro. I have been dealing with PackMan in 2018.3 and may have come across some useful information about this issue. Maybe!

    So looking at the editor manifest for 2018.1.x it seems that there is an explicit dependency of 2.0.16 for the analytics library. If I attempt to load roll-a-ball it will require the analytics of 3.2.2. It seems that Unity is loading the 2.x lib because it is defined as a default, and then attempts to load the 3.0.6 library, hence the problem.

    So I really think the issue is that the manifest for rollaball incorrectly adds the analytics library with v3.2.2(which I verified is the case in the .unitypackage). This makes it incompatible with versions of unity that have a default dependency on the analytics package <3.2.2. You could also say that the issue is that a default dependency should be updated to the latest version in the packages manifest, but I assume this would cause incompatibilities with the other default dependencies, and your problem would look different.
     
  16. pedro_unity

    pedro_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    162
    Hello @pushxtonotdie,

    Apologies on the late answer. That would indeed explain it. Let me investigate further.

    Cheers,
    Pedro
    Unity STE
     
  17. Umerfarooq

    Umerfarooq

    Joined:
    Jun 18, 2016
    Posts:
    6
    @pedro_unity and @pushxtonotdie
    have you find solution to problem.?
    i'm facing it as well.
    I created a new project, imported a kit "beat em Up",a pop up appeared,saying, it will change the manifest,when i click OK, i got the same errors you got.
     
  18. Umerfarooq

    Umerfarooq

    Joined:
    Jun 18, 2016
    Posts:
    6
    I've just found the solution which is working perfectly for me, here it is:
    Create a new project, copy the manifest.json file from "Package" folder and replace the Manifest.json file of your project(in which you're facing errors).
     
    skrug0519 likes this.
  19. tholib_md

    tholib_md

    Joined:
    Aug 26, 2018
    Posts:
    1
    Thank yau.
     
    cantaroroto likes this.
  20. cantaroroto

    cantaroroto

    Joined:
    Jul 5, 2019
    Posts:
    1
    Thanks Umer, that works for me =)
     
  21. lucasmontec

    lucasmontec

    Joined:
    Apr 7, 2015
    Posts:
    94
    You are a hero.
     
  22. McSrk

    McSrk

    Joined:
    Aug 25, 2018
    Posts:
    1
    Which are the location folders for each mainfest.json?
    -Never mind, i found it, and your solution worked for me. Thanks!!!
     
    Last edited: Aug 6, 2019