Package Manager throwing numerous errors.

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?

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

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?

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


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?

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?


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)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

I’m getting the same thing but only after I attempted to downgrade to 2018.2.

1 Like

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.

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 :

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

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?

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.

  • 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:
{
    "com.unity.package-manager": "1.19.3",
    "dependencies": {
    },
    "recommended": {
        "com.unity.analytics": "2.0.16",
        "com.unity.purchasing": "2.0.3",
        "com.unity.ads": "2.0.8",
        "com.unity.textmeshpro": "1.2.4",
        "com.unity.package-manager-ui": "1.9.11"
    },
    "defaultDependencies": {
        "com.unity.analytics": "2.0.16",
        "com.unity.purchasing": "2.0.3",
        "com.unity.ads": "2.0.8",
        "com.unity.textmeshpro": "1.2.4",
        "com.unity.package-manager-ui": "1.9.11",
        "com.unity.modules.ai": "1.0.0",
        "com.unity.modules.animation": "1.0.0",
        "com.unity.modules.assetbundle": "1.0.0",
        "com.unity.modules.audio": "1.0.0",
        "com.unity.modules.cloth": "1.0.0",
        "com.unity.modules.director": "1.0.0",
        "com.unity.modules.imageconversion": "1.0.0",
        "com.unity.modules.imgui": "1.0.0",
        "com.unity.modules.jsonserialize": "1.0.0",
        "com.unity.modules.particlesystem": "1.0.0",
        "com.unity.modules.physics": "1.0.0",
        "com.unity.modules.physics2d": "1.0.0",
        "com.unity.modules.screencapture": "1.0.0",
        "com.unity.modules.terrain": "1.0.0",
        "com.unity.modules.terrainphysics": "1.0.0",
        "com.unity.modules.tilemap": "1.0.0",
        "com.unity.modules.ui": "1.0.0",
        "com.unity.modules.uielements": "1.0.0",
        "com.unity.modules.umbra": "1.0.0",
        "com.unity.modules.unityanalytics": "1.0.0",
        "com.unity.modules.unitywebrequest": "1.0.0",
        "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
        "com.unity.modules.unitywebrequestaudio": "1.0.0",
        "com.unity.modules.unitywebrequesttexture": "1.0.0",
        "com.unity.modules.unitywebrequestwww": "1.0.0",
        "com.unity.modules.vehicles": "1.0.0",
        "com.unity.modules.video": "1.0.0",
        "com.unity.modules.vr": "1.0.0",
        "com.unity.modules.wind": "1.0.0",
        "com.unity.modules.xr": "1.0.0"
    }
}
  • 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).
  • Backup cache folder. Reboot Unity.

Let me know what happens please!

Cheers,
Pedro
Unity STE

So I just tried to download and run roll-a-ball on my work macbook via hub and i got similar errors! :open_mouth: 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! :frowning:

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.

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

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…

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.

Additional Details

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

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:smile:eleteUnusedAssemblies()


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?

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

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

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:GetTargetAssembliesWithScripts()

Manifest

{
    "com.unity.package-manager": "1.19.5",
    "dependencies": {
    },
    "recommended": {
        "com.unity.analytics": "2.0.16",
        "com.unity.purchasing": "2.0.3",
        "com.unity.ads": "2.0.8",
        "com.unity.textmeshpro": "1.2.4",
        "com.unity.package-manager-ui": "1.9.11"
    },
    "defaultDependencies": {
        "com.unity.analytics": "2.0.16",
        "com.unity.purchasing": "2.0.3",
        "com.unity.ads": "2.0.8",
        "com.unity.textmeshpro": "1.2.4",
        "com.unity.package-manager-ui": "1.9.11",
        "com.unity.modules.ai": "1.0.0",
        "com.unity.modules.animation": "1.0.0",
        "com.unity.modules.assetbundle": "1.0.0",
        "com.unity.modules.audio": "1.0.0",
        "com.unity.modules.cloth": "1.0.0",
        "com.unity.modules.director": "1.0.0",
        "com.unity.modules.imageconversion": "1.0.0",
        "com.unity.modules.imgui": "1.0.0",
        "com.unity.modules.jsonserialize": "1.0.0",
        "com.unity.modules.particlesystem": "1.0.0",
        "com.unity.modules.physics": "1.0.0",
        "com.unity.modules.physics2d": "1.0.0",
        "com.unity.modules.screencapture": "1.0.0",
        "com.unity.modules.terrain": "1.0.0",
        "com.unity.modules.terrainphysics": "1.0.0",
        "com.unity.modules.tilemap": "1.0.0",
        "com.unity.modules.ui": "1.0.0",
        "com.unity.modules.uielements": "1.0.0",
        "com.unity.modules.umbra": "1.0.0",
        "com.unity.modules.unityanalytics": "1.0.0",
        "com.unity.modules.unitywebrequest": "1.0.0",
        "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
        "com.unity.modules.unitywebrequestaudio": "1.0.0",
        "com.unity.modules.unitywebrequesttexture": "1.0.0",
        "com.unity.modules.unitywebrequestwww": "1.0.0",
        "com.unity.modules.vehicles": "1.0.0",
        "com.unity.modules.video": "1.0.0",
        "com.unity.modules.vr": "1.0.0",
        "com.unity.modules.wind": "1.0.0",
        "com.unity.modules.xr": "1.0.0"
    }
}

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 :slight_smile:

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

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.

Hello @pushxtonotdie ,

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

Cheers,
Pedro
Unity STE

@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.

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 the “Package” folder(of a new project) and replace the Manifest.json file of your project(in which you’re facing errors).

Or You can simply delete the Package folder from your project and unity will recreate it by itself self and the problem will be solved.

15 Likes

Thank yau.

1 Like

Thanks Umer, that works for me =)

1 Like