Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Problem with dependency resolution for Android and Unity 6000.0.1 #1025

Open
runette opened this issue May 10, 2024 · 12 comments
Open
Labels
edm4u Issue related to External Dependency Manager for Unity needs-attention Need Googler's attention type: bug

Comments

@runette
Copy link

runette commented May 10, 2024

Description

I have an incompatibility between Unity 6 Preview (6000.0.1f1) and Firebase auto dependency resolution.

The auto resolution just deletes all Firebase dependencies for Android from the gradle templates and deletes the generated maven package - so that the application builds without the Firebase binaries!

Reproducing the issue

I had a working projec t in 2023.2.nn.

Upgraded to 6000.0.1 in the usual way.

Build for Android and the auto-resolution deleted the dependencies

Firebase Unity SDK Version

11.9.0

Unity editor version

6000.0.1f1

Installation Method

Unity Package Manager

Problematic Firebase Component(s)

All

Other Firebase Component(s) in use

No response

Additional SDKs you are using

No response

Targeted Platform(s)

Android

Unity editor platform

Windows

Scripting Runtime

IL2CPP

Release Distribution Type

Pre-built SDK from https://firebase.google.com/download/unity

Relevant Log Output

No response

If using CocoaPods for Apple platforms, the project's Podfile.lock

Expand Podfile.lock snippet
👀 Replace this line with the contents of your Podfile.lock!
@runette runette added new New issue. type: bug labels May 10, 2024
@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@runette runette changed the title [Bug] Problem with depemdemcy resolution for Android and Unity 6000.0.1 [Bug] Problem with dependency resolution for Android and Unity 6000.0.1 May 10, 2024
@argzdev argzdev added edm4u Issue related to External Dependency Manager for Unity and removed needs-triage new New issue. labels May 10, 2024
@argzdev
Copy link

argzdev commented May 13, 2024

Hi @runette, thanks for reaching out. I noticed a different behavior when I tried using one of our quickstarts in Unity with version 2022.3.24f1 and then opening it with version 6000.0.0f1. Initially, I've only encountered an issue with Namespace not specified, once I've added the namespace in the mainTemplate.gradle. The build was able to run successfully.

That said, could you specify the steps you took in order to reproduce this behavior?

@argzdev argzdev added the needs-info Need information for the developer label May 13, 2024
@runette
Copy link
Author

runette commented May 13, 2024

Hi @runette, thanks for reaching out. I noticed a different behavior when I tried using one of our quickstarts in Unity with version 2022.3.24f1 and then opening it with version 6000.0.0f1. Initially, I've only encountered an issue with Namespace not specified, once I've added the namespace in the mainTemplate.gradle. The build was able to run successfully.

That said, could you specify the steps you took in order to reproduce this behavior?

as stated above :

I had a working projec t in 2023.2.nn.

Upgraded to 6000.0.1 in the usual way.

Build for Android and the auto-resolution deleted the dependencies

I do notice that I am using 6000.0.1 and not 6000.0.0 as you stated.

Also - I am not sure what you mean about putting the namespace in the mainTemplate.gradle. I have not edited the mainTemplate.gradle at all.

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels May 13, 2024
@runette
Copy link
Author

runette commented May 16, 2024

@argzdev So - I created a test project with the following steps :

1 Created a brand new totally standard 2023.2 URP 3D project - you can see it here https://github.com/runette/Firebase_Test without, of course, the Firebase API Key files and details
2 Added the Firebase SDK - just for your info the SDK is loaded as a Git Submodule from this git repo https://sync.virgis.co.uk/ViRGiS/Firebase_SDK and is 11.9.0
3 Added a small package of mine that provides login - see https://github.com/LiSe-Team/LiSe-Unity-Client
4 accepted all of the Firebase recommendations - including auto-resolution

This worked in 2023.2 as an Android application - as you see edm4u has loaded the maven package as expected.

4 Did a standard upgrade to Unity 6000.0.1f1.
5 The results are in the "6000" banch - see https://github.com/runette/Firebase_Test/tree/6000
6 Did an android build

As you can see edm4u has deleted the maven package and the dependencies in the gradle files. The build did not work because the dependencies were not loaded.

There is definitely a problem

@argzdev
Copy link

argzdev commented May 16, 2024

Hey @runette, thanks for the extra details. Could you change the visibility of your repo to public so I can try it. Sorry for the delayed response, I've been trying and testing with different versions 2022 and 2023 then changing to 6000 to reproduce the behavior, but unsuccessful so far. By the way, have you tried using the Android Resolver > Delete Resolved Libraries, and then Android Resolver > Force Resolve if that makes any difference?

@argzdev argzdev added needs-info Need information for the developer and removed needs-attention Need Googler's attention labels May 16, 2024
@runette
Copy link
Author

runette commented May 17, 2024

Hey @runette, thanks for the extra details. Could you change the visibility of your repo to public so I can try it.

Sorry about that - done now

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels May 17, 2024
@runette
Copy link
Author

runette commented May 17, 2024

By the way, have you tried using the Android Resolver > Delete Resolved Libraries, and then Android Resolver > Force Resolve if that makes any difference?

Tried that - no change

@argzdev
Copy link

argzdev commented May 17, 2024

Okay, thanks for trying that. I'll try and investigate this further.

@argzdev
Copy link

argzdev commented May 17, 2024

I'm able to reproduce the behavior now. After running a few tests, it looks like the issue might be due to the installation method. Adding Firebase packages as tgz files e.g. com.google.firebase.app-11.9.0.tgz is causing the EDM4U to malfunction, whereas using the .unitypackage works correctly. I'll go ahead and inform our engineering team to take a look into this. Thanks!

@runette
Copy link
Author

runette commented May 17, 2024

I noticed the 12.0.0 of the SDK had been released and I tried that but it seems to have the same behaviour.

@itkdo
Copy link

itkdo commented Jun 2, 2024

hey @runette, maybe this helps
AppLovin/AppLovin-MAX-Unity-Plugin#376 (comment)

@runette
Copy link
Author

runette commented Jun 2, 2024

hey @runette, maybe this helps
AppLovin/AppLovin-MAX-Unity-Plugin#376 (comment)

I think the problems are different, since this is a problem specifically with edm4u.

To be clear, I can build the project by turning edm4u off and using the old dependencies. The project also builds with edm4u turned on, it just does not run because the firebase binaries are not loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
edm4u Issue related to External Dependency Manager for Unity needs-attention Need Googler's attention type: bug
Projects
None yet
Development

No branches or pull requests

4 participants