Skip to content

[Bug] GradleResolver fails when package added as folder #643

Open
@rzer

Description

@rzer

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2021.3.22f1
  • External Dependency Manager version: 1.2.177
  • Source you installed EDM4U: Unity Package Manager
  • Features in External Dependency Manager in use: Android Resolver
  • Plugins SDK in use: Firebase
  • Platform you are using the Unity editor on: Windows

[REQUIRED] Please describe the issue here:

if package was added from disk then Android resolver stuck on Force Resolve. But if package wad aded as tarball everything was great. Trying on com.google.firebase.app-11.0.0.tgz - just unpack it to folder and add package.json in package manager.

Please answer the following, if applicable:

repro rate 100%

What happened? How can we make the problem occur?

Found a error in console after exit from PlayMode. You can see a strange path containing base folder. The real package path: D:\Evrika\UnityLibs\UnityFirebase\com.google.firebase.app-11.0.0

Stopped polling job due to exception: System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\Evrika\Blocks\BlocksUnity\base\com.google.firebase.app-11.0.0'.
  at System.IO.Enumeration.FileSystemEnumerator`1[TResult].CreateDirectoryHandle (System.String path, System.Boolean ignoreNotFound) [0x0004d] in <88e4733ac7bc4ae1b496735e6b83bbd3>:0 
  at System.IO.Enumeration.FileSystemEnumerator`1[TResult]..ctor (System.String directory, System.IO.EnumerationOptions options) [0x00050] in <88e4733ac7bc4ae1b496735e6b83bbd3>:0 
  at System.IO.Enumeration.FileSystemEnumerable`1+DelegateEnumerator[TResult]..ctor (System.IO.Enumeration.FileSystemEnumerable`1[TResult] enumerable) [0x00000] in <88e4733ac7bc4ae1b496735e6b83bbd3>:0 
  at System.IO.Enumeration.FileSystemEnumerable`1[TResult]..ctor (System.String directory, System.IO.Enumeration.FileSystemEnumerable`1+FindTransform[TResult] transform, System.IO.EnumerationOptions options) [0x00042] in <88e4733ac7bc4ae1b496735e6b83bbd3>:0 
  at System.IO.Enumeration.FileSystemEnumerableFactory.UserDirectories (System.String directory, System.String expression, System.IO.EnumerationOptions options) [0x00014] in <88e4733ac7bc4ae1b496735e6b83bbd3>:0 
  at System.IO.Directory.InternalEnumeratePaths (System.String path, System.String searchPattern, System.IO.SearchTarget searchTarget, System.IO.EnumerationOptions options) [0x00045] in <88e4733ac7bc4ae1b496735e6b83bbd3>:0 
  at System.IO.Directory.GetDirectories (System.String path, System.String searchPattern, System.IO.EnumerationOptions enumerationOptions) [0x00000] in <88e4733ac7bc4ae1b496735e6b83bbd3>:0 
  at System.IO.Directory.GetDirectories (System.String path, System.String searchPattern, System.IO.SearchOption searchOption) [0x00008] in <88e4733ac7bc4ae1b496735e6b83bbd3>:0 
  at Google.FileUtils.FindPathUnderDirectory (System.String directory, System.String pathToFind) [0x0003d] in Z:\tmp\tmp.K9OFax9s5i\third_party\unity\unity_jar_resolver\source\VersionHandlerImpl\src\FileUtils.cs:247 
  at GooglePlayServices.GradleResolver.RepoPathToUri (System.String repoPath, System.String sourceLocation) [0x00133] in Z:\tmp\tmp.S5XIEONF7B\third_party\unity\unity_jar_resolver\source\AndroidResolver\src\GradleResolver.cs:196 
  at GooglePlayServices.GradleResolver.DependenciesToRepoUris (System.Collections.Generic.IEnumerable`1[T] dependencies) [0x00107] in Z:\tmp\tmp.S5XIEONF7B\third_party\unity\unity_jar_resolver\source\AndroidResolver\src\GradleResolver.cs:279 
  at GooglePlayServices.PlayServicesResolver.GetRepos (System.Collections.Generic.IEnumerable`1[T] dependencies) [0x00000] in Z:\tmp\tmp.S5XIEONF7B\third_party\unity\unity_jar_resolver\source\AndroidResolver\src\PlayServicesResolver.cs:2142 
  at GooglePlayServices.LocalMavenRepository.FindLocalRepos (System.Collections.Generic.ICollection`1[T] dependencies) [0x00017] in Z:\tmp\tmp.S5XIEONF7B\third_party\unity\unity_jar_resolver\source\AndroidResolver\src\LocalMavenRepository.cs:41 
  at GooglePlayServices.LocalMavenRepository.FindAarsInLocalRepos (System.Collections.Generic.ICollection`1[T] dependencies) [0x00006] in Z:\tmp\tmp.S5XIEONF7B\third_party\unity\unity_jar_resolver\source\AndroidResolver\src\LocalMavenRepository.cs:76 
  at GooglePlayServices.LocalMavenRepository.PatchPomFilesInLocalRepos (System.Collections.Generic.ICollection`1[T] dependencies) [0x00006] in Z:\tmp\tmp.S5XIEONF7B\third_party\unity\unity_jar_resolver\source\AndroidResolver\src\LocalMavenRepository.cs:191 
  at GooglePlayServices.PlayServicesResolver.DeleteResolvedLibrariesFromGradleTemplate (System.Boolean updateMainTemplate, System.Boolean updateSettingsTemplate) [0x00000] in Z:\tmp\tmp.S5XIEONF7B\third_party\unity\unity_jar_resolver\source\AndroidResolver\src\PlayServicesResolver.cs:1679 
  at GooglePlayServices.PlayServicesResolver.ResolveUnsafe (System.Action`1[T] resolutionComplete, System.Boolean forceResolution, System.Boolean closeWindowOnCompletion) [0x00118] in Z:\tmp\tmp.S5XIEONF7B\third_party\unity\unity_jar_resolver\source\AndroidResolver\src\PlayServicesResolver.cs:1956 
  at GooglePlayServices.PlayServicesResolver.ResolveUnsafeAfterPromptCheck (System.Action`1[T] resolutionComplete, System.Boolean forceResolution, System.Boolean isAutoResolveJob, System.Boolean closeWindowOnCompletion) [0x000fa] in Z:\tmp\tmp.S5XIEONF7B\third_party\unity\unity_jar_resolver\source\AndroidResolver\src\PlayServicesResolver.cs:1877 
  at GooglePlayServices.PlayServicesResolver+<ResolveUnsafeAfterJetifierCheck>c__AnonStorey7.<>m__0 (System.Boolean jetifierEnabled) [0x00000] in Z:\tmp\tmp.S5XIEONF7B\third_party\unity\unity_jar_resolver\source\AndroidResolver\src\PlayServicesResolver.cs:1786 
  at GooglePlayServices.PlayServicesResolver+<CanEnableJetifierOrPromptUser>c__AnonStoreyF.<>m__1 (GooglePlayServices.PlayServicesResolver+ApiLevelJetifierResult result) [0x00049] in Z:\tmp\tmp.S5XIEONF7B\third_party\unity\unity_jar_resolver\source\AndroidResolver\src\PlayServicesResolver.cs:2758 
  at GooglePlayServices.PlayServicesResolver.CheckApiLevelForJetifier (System.Boolean useJetifier, System.String titlePrefix, System.Action`1[T] complete) [0x00096] in Z:\tmp\tmp.S5XIEONF7B\third_party\unity\unity_jar_resolver\source\AndroidResolver\src\PlayServicesResolver.cs:2722 
  at GooglePlayServices.PlayServicesResolver+<CanEnableJetifierOrPromptUser>c__AnonStoreyF.<>m__0 (System.Boolean gradleVersionOkForJetifier) [0x00000] in Z:\tmp\tmp.S5XIEONF7B\third_party\unity\unity_jar_resolver\source\AndroidResolver\src\PlayServicesResolver.cs:2743 
  at GooglePlayServices.PlayServicesResolver.CheckGradleVersionForJetifier (System.Boolean useJetifier, System.String titlePrefix, System.Action`1[T] complete) [0x0009e] in Z:\tmp\tmp.S5XIEONF7B\third_party\unity\unity_jar_resolver\source\AndroidResolver\src\PlayServicesResolver.cs:2650 
  at GooglePlayServices.PlayServicesResolver.CanEnableJetifierOrPromptUser (System.String titlePrefix, System.Action`1[T] complete) [0x00046] in Z:\tmp\tmp.S5XIEONF7B\third_party\unity\unity_jar_resolver\source\AndroidResolver\src\PlayServicesResolver.cs:2741 
  at GooglePlayServices.PlayServicesResolver.ResolveUnsafeAfterJetifierCheck (System.Action`1[T] resolutionComplete, System.Boolean forceResolution, System.Boolean isAutoResolveJob, System.Boolean closeWindowOnCompletion) [0x00027] in Z:\tmp\tmp.S5XIEONF7B\third_party\unity\unity_jar_resolver\source\AndroidResolver\src\PlayServicesResolver.cs:1783 
  at GooglePlayServices.PlayServicesResolver+<ScheduleResolve>c__AnonStorey5.<>m__0 () [0x00000] in Z:\tmp\tmp.S5XIEONF7B\third_party\unity\unity_jar_resolver\source\AndroidResolver\src\PlayServicesResolver.cs:1750 
  at GooglePlayServices.PlayServicesResolver.ExecuteNextResolveJob () [0x00069] in Z:\tmp\tmp.S5XIEONF7B\third_party\unity\unity_jar_resolver\source\AndroidResolver\src\PlayServicesResolver.cs:1597 
  at GooglePlayServices.PlayServicesResolver.ScheduleResolve (System.Boolean forceResolution, System.Boolean closeWindowOnCompletion, System.Action`1[T] resolutionCompleteWithResult, System.Boolean isAutoResolveJob) [0x000a7] in Z:\tmp\tmp.S5XIEONF7B\third_party\unity\unity_jar_resolver\source\AndroidResolver\src\PlayServicesResolver.cs:1763 
  at GooglePlayServices.PlayServicesResolver.AutoResolve (System.Action resolutionComplete) [0x00017] in Z:\tmp\tmp.S5XIEONF7B\third_party\unity\unity_jar_resolver\source\AndroidResolver\src\PlayServicesResolver.cs:1257 
  at GooglePlayServices.PlayServicesResolver.<ScheduleAutoResolve>m__B () [0x00016] in Z:\tmp\tmp.S5XIEONF7B\third_party\unity\unity_jar_resolver\source\AndroidResolver\src\PlayServicesResolver.cs:1236 
  at Google.RunOnMainThread.ExecutePollingJobs () [0x0004a] in Z:\tmp\tmp.K9OFax9s5i\third_party\unity\unity_jar_resolver\source\VersionHandlerImpl\src\RunOnMainThread.cs:409

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions