YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
26 stars 8 forks source link

Building Projects: [Android] Gradle and Android Studio expansion macros are not maintained during builds (Google Play ".fileprovider" content provider authority errors) #6534

Closed xieyunbin closed 4 months ago

xieyunbin commented 4 months ago

Description

Hello everyone,

I've recently updated my GameMaker Studio 2 to the latest version (2024.6.0.157). After updating, I encountered an issue when trying to upload the generated aab file to Google Play.

Problem: When I upload the aab file, I receive the following warning: "Please remove conflicting items from the manifest and try again. Another developer is using the following content provider authority: .fileprovider."

Additional Information: There have been no changes to my project files. The issue seems to be related to the .fileprovider authority conflict.

Has anyone else experienced this issue or have any insights on how to resolve it? Any help would be greatly appreciated.

Thank you!

Expected Change

fix the bug

Steps To Reproduce

  1. upgrade GMS2 to version (2024.6.0.157)(I have tried to restore the version to elder one, but issue is still there)
  2. Start GameMaker and project
  3. build the game as AAB file.
  4. upload AAB to Google Play
  5. See the issue

How reliably can you recreate this issue using your steps above?

Always

Which version of GameMaker are you reporting this issue for?

2024.6.0 (Monthly)

Which operating system(s) are you seeing the problem on?

Windows 10

Which platform(s) are you having trouble building this project for?

Android

Are you running GameMaker from inside your Steam library?

No

Contact Us Package Attached?

Sample Project Added?

YYDan commented 4 months ago

(Is already being discussed on the GMC also: https://forum.gamemaker.io/index.php?threads/help-google-play-upload-issue-about-fileprovider.113719/)

As suggested there, the issue is trying to upload a .aab for a new game and you have not changed the bundle name from a previous game name (but then your bundle name in Game Options would have to end with ".fileprovider", which I am guessing is not the case).

Or that some extension injection is causing this - if might be worth reviewing any extensions you have recently added/updated in your project to see if they are the source of this ".fileprovider" value.

As you say, if this is Game Options or an extension injection, then rolling back to 2024.4.1 is unlikely to change that (and indeed shows that this is unlikely to be a Building Projects bug) - but it could absolutely be one of our extensions causing it, so we do need to check this ourselves!

DiasFranciscoA commented 4 months ago

Hello @xieyunbin,

Could you please let us know which extensions you are currently using in your project? This information will help us pinpoint the issue more effectively. Additionally, we would appreciate it if you could share a copy of your project with us, so we can better understand the source of the problem. Thank you very much for your cooperation. We look forward to assisting you.

xieyunbin commented 4 months ago

Hello @xieyunbin,

Could you please let us know which extensions you are currently using in your project? This information will help us pinpoint the issue more effectively. Additionally, we would appreciate it if you could share a copy of your project with us, so we can better understand the source of the problem. Thank you very much for your cooperation. We look forward to assisting you.

Hi there,

I am using these exts below, hope it will be helpful for you: 1, yoyo's Admob ext : https://marketplace.gamemaker.io/assets/10078/google-admob?s=ce2fa0031942c63c4d3a99a27f130d66 2, yoyo's google play service : https://marketplace.gamemaker.io/assets/10099/google-play-services?s=ce2fa0031942c63c4d3a99a27f130d66 3, yoyo's google play iap : https://marketplace.gamemaker.io/assets/4629/google-play-services-iap?s=ce2fa0031942c63c4d3a99a27f130d66

  1. yoyo's google licensing : https://marketplace.gamemaker.io/assets/2009/google-play-licensing?s=ce2fa0031942c63c4d3a99a27f130d66 5, yoyo's game center : https://marketplace.gamemaker.io/assets/10406/apple-gamecenter?s=ce2fa0031942c63c4d3a99a27f130d66 6, yoyo's apple iap : https://marketplace.gamemaker.io/assets/8594/apple-iaps?s=ce2fa0031942c63c4d3a99a27f130d66 7, yoyo's app tracking transparency : https://marketplace.gamemaker.io/assets/10079/app-tracking-transparency?s=ce2fa0031942c63c4d3a99a27f130d66 8 yoyo's mobile review: https://marketplace.gamemaker.io/assets/10502/mobile-review?s=ce2fa0031942c63c4d3a99a27f130d66 9, Share ext: https://marketplace.gamemaker.io/assets/1258/share?s=ce2fa0031942c63c4d3a99a27f130d66 10, android home(just import but not using in the game): https://marketplace.gamemaker.io/assets/4731/android-home?s=ce2fa0031942c63c4d3a99a27f130d66
xieyunbin commented 4 months ago

I try to use the version 2024.2.0.132 and build aab, and the upload bug is fixed. I will try 2024.4.0.xxx later

DiasFranciscoA commented 4 months ago

We will need copy of your project or an empty project with just the extensions

xieyunbin commented 4 months ago

We will need copy of your project or an empty project with just the extensions

For fileprovider bug.zip

@DiasFranciscoA @YYDan Sure, here it is.

DiasFranciscoA commented 4 months ago

Okay so addressing this issue, the problem is in the Share extension which you can either use our official one which already works out-of-the-box OR you need to go into your extension into Android and code injection:

image

And replace the usage of ${applicationId} with ${YYAndroidPackageName} this will sove your issue.

YYDan commented 4 months ago

As mentioned above, this is easily fixed right away in 2024.6. by updating the copy of the extension in the attached project to use the correct values - and in terms of this report, this is the proper fix anyway.

However, these external Gradle/Android Studio macros are now maintained and expanded as you'd expect in 2024.800 Betas (once they start being released), so if any other extensions rely on them, then they will work in 800 also.

xieyunbin commented 4 months ago

Thank you!

mgeddesGM commented 3 months ago

hi @DiasFranciscoA do you have an active link to the share extension that you mentioned above?

mgeddesGM commented 2 months ago

verified as of IDE v2024.8.0.168 Runtime v2024.8.0.215