Open epsmarkh opened 2 years ago
Hi @epsmarkh,
Thanks for letting us know about this. I've used the same versions of the Unity editor and the Firebase SDK, and I am facing this issue on my end.
I'll be marking this as a bug for now. You may refer to this thread for updates.
I'm having the same problem on Mac with Apple Silicon
the same problem Unity 2022.1.4f1 packages: external-dependency-manager 1.2.171 GooglePlayGamesPlugin v0.11.01 Firebase Unity 9.1.0
has anyone solved this problem?
has anyone solved this problem?
for us it's work only with disabled mainTemplate in Unity Player Settings
has anyone solved this problem?
for us it's work only with disabled mainTemplate in Unity Player Settings
Thanks
❗ Finally I found the reason why it's happening. There is a Unity bug, it's already registered, thus it's not related to Firebase at all: https://issuetracker.unity3d.com/issues/folder-name-is-truncated-when-dot-is-used-in-the-name
Be more concretically, you can find this code in FileUtils class that is part of AndroidResolver project: https://github.com/googlesamples/unity-jar-resolver/blob/master/source/VersionHandlerImpl/src/FileUtils.cs#L635
When recursion goes to dotted part of the path (8.10.1 in your case), CreateFolder method returns an error.
To solve the problem you can do one of the following things: 1) use explicit resolving as described before: libraries stay in Plugins folder; 2) downgrade to Unity version where the issue doesn't reproduce (can't imagine that someone will do this 😆 ); 3) replace the whole code of CreateFolder method with native Directory.CreateDirectory (requires manual resolver compiling).
Simple yet Annoying Bug.
Found a simple solution :
No need to disable anything.
It simply cannot find/create the folder with the same version number in Generated Local Repo Directory if created through Unity Asset Browser.
1) Simply go to the directory through Windows Explorer and in my case it was "[THE LOCATION OF YOUR GAME PROJECT]\Assets\GeneratedLocalRepo\Firebase\m2repository\com\google\firebase\firebase-analytics-unity\". Or In Unity Asset Browser, browse to "Assets\GeneratedLocalRepo\Firebase\m2repository\com\google\firebase\firebase-analytics-unity\firebase-analytics-unity" and right-click, then "Show in Explorer".
2) Delete any existing folder and refresh in unity asset browser
3) Create a new folder with version number, mine was 9.3.0 and check inside unity if the folder has been synchronized. Only a folder with your corresponding version number should exist.
4) Do the same for all firebase folders, and then run Force resolve.
Voila!! Android Dependencies have been resolved.
Simple yet Annoying Bug.
Found a simple solution :
No need to disable anything.
It simply cannot find/create the folder with the same version number in Generated Local Repo Directory if created through Unity Asset Browser.
- Simply go to the directory through Windows Explorer and in my case it was "[THE LOCATION OF YOUR GAME PROJECT]\Assets\GeneratedLocalRepo\Firebase\m2repository\com\google\firebase\firebase-analytics-unity". Or In Unity Asset Browser, browse to "Assets\GeneratedLocalRepo\Firebase\m2repository\com\google\firebase\firebase-analytics-unity\firebase-analytics-unity" and right-click, then "Show in Explorer".
- Delete any existing folder and refresh in unity asset browser
- Create a new folder with version number, mine was 9.3.0 and check inside unity if the folder has been synchronized. Only a folder with your corresponding version number should exist.
- Do the same for all firebase folders, and then run Force resolve.
Voila!! Android Dependencies have been resolved.
it's simple, but it's not work if you frequencly updated plugins, we need worked, not 🔧"magical" solution It seems only like temp solution
it's simple, but it's not work if you frequencly updated plugins, we need worked, not 🔧"magical" solution It seems only like temp solution
Of course, its a temporary solution. Its for the devs to fix it permanently as it is present in many versions of the editor, and I prefer not to touch the mess that the devs created, so hence my solution which hardly takes some time even if we add a couple different versions.
Hey, @chkuang-g has already created PR-543 and after some time it will be merged to the unity-jar-resolver repo.
Simple yet Annoying Bug.
Found a simple solution :
No need to disable anything.
It simply cannot find/create the folder with the same version number in Generated Local Repo Directory if created through Unity Asset Browser.
- Simply go to the directory through Windows Explorer and in my case it was "[THE LOCATION OF YOUR GAME PROJECT]\Assets\GeneratedLocalRepo\Firebase\m2repository\com\google\firebase\firebase-analytics-unity". Or In Unity Asset Browser, browse to "Assets\GeneratedLocalRepo\Firebase\m2repository\com\google\firebase\firebase-analytics-unity\firebase-analytics-unity" and right-click, then "Show in Explorer".
- Delete any existing folder and refresh in unity asset browser
- Create a new folder with version number, mine was 9.3.0 and check inside unity if the folder has been synchronized. Only a folder with your corresponding version number should exist.
- Do the same for all firebase folders, and then run Force resolve.
Voila!! Android Dependencies have been resolved.
that's worked, thank you!!
for us it's work only with disabled mainTemplate in Unity Player Settings
Thanks it solved it for me too
[REQUIRED] Please fill in the following fields:
[REQUIRED] Please describe the issue here:
When maintemplate.gradle is enabled and any firebase package is imported, the dependency manager fails to copy the files to the correct location in GeneratedLocalRepo. Builds and Force Resolve both fail with the error:
Unable to copy Assets\Firebase\m2repository\com\google\firebase\firebase-analytics-unity\8.10.1\firebase-analytics-unity-8.10.1.srcaar to Assets\GeneratedLocalRepo\Firebase\m2repository\com\google\firebase\firebase-analytics-unity\8.10.1\firebase-analytics-unity-8.10.1.aar. Assets\GeneratedLocalRepo\Firebase\m2repository\com\google\firebase\firebase-analytics-unity\8.10.1\firebase-analytics-unity-8.10.1.aar will not be included in Gradle builds. Reason: Failed to copy Assets\Firebase\m2repository\com\google\firebase\firebase-analytics-unity\8.10.1\firebase-analytics-unity-8.10.1.srcaar to Assets\GeneratedLocalRepo\Firebase\m2repository\com\google\firebase\firebase-analytics-unity\8.10.1\firebase-analytics-unity-8.10.1.aar due to System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\unity\Projects\testu22\Assets\GeneratedLocalRepo\Firebase\m2repository\com\google\firebase\firebase-analytics-unity\8.10.1\firebase-analytics-unity-8.10.1.aar'.
When browsing the directory, it has been incorrectly created as Assets\GeneratedLocalRepo\Firebase\m2repository\com\google\firebase\firebase-analytics-unity\8
instead of
Assets\GeneratedLocalRepo\Firebase\m2repository\com\google\firebase\firebase-analytics-unity\8.10.1
Steps to reproduce:
Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)?
Yes, it also happens with an empty project with just maintemplate.gradle enabled and any firebase package imported
What's the issue repro rate? (eg 100%, 1/5 etc)
100%
What happened? How can we make the problem occur?
Create a project, switch to Android, enable maintemplate.gradle and import any firebase package. When attempting to build or use the EDM force resolve option, errors are shown and the build fails.
If you have a downloadable sample project that reproduces the bug you're reporting, you will likely receive a faster response on your issue.
Relevant Code:
N/A