IamKingWaiMark / GoogleAdmobBlueprint

Support git for GoogleAdmobBlueprint Plugin
0 stars 0 forks source link

Game Crashes When Making Package for Distribution with Google Mode Ads Plugin #3

Closed NikolayEltsov closed 11 months ago

NikolayEltsov commented 11 months ago

Hello everyone,

I'm encountering an issue with my game when trying to make a package for distribution that includes the Google Mode Ads plugin. The game runs perfectly fine when I make a package for testing, and there are no crashes. However, as soon as I include the plugin and select "for Distribution" and call the function "Initialize Google Mode Ads," the game crashes.

I have taken the following steps to try and resolve the issue:

I have disabled "Include AdMob support for ads" in Android > Google Player Services.
The meta-data element is correctly set without any spaces in the beginning.
I have verified that the package name matches the one in the google-services.json or plist file.
I have ensured that Game Development with C++ is installed on Visual Studio, and Android IDE support for Unreal is installed.
I am using version 25.1.8937393 for the ndk.

To further investigate, I created an empty project and called the "Initialize Google Mode Ads" function alone, and it still crashed. I have attached the log of the crash for reference.

I would greatly appreciate your assistance in resolving this problem. If you have any suggestions or insights on how to fix this issue, please let me know. Thank you in advance for your help! Settings01

Settings02 Settings03 Settings04

Crash log from Firebase: LogFromFireBase.txt

IamKingWaiMark commented 11 months ago

Hi, which version of UE are you using?

These are the 5.2 settings that works:

image

IamKingWaiMark commented 11 months ago

It is crashing with just the initiliaze google mobile ad node?

That happens when the meta element is incorrect or the package name does not match on Firebase + Admob

NikolayEltsov commented 11 months ago

We use UE 5.1.1. And yes, it crashed with just the initialization of the Google Mobile Ad node. I made a test program to test it.

Could you please give more information about meta element, how to check is it correct or not. And how to check name on Firebase + Admob? In file google-services.json we have: "android_client_info": { "package_name": "com.BarrowBoys.SewerHero" }

  the same value in parameter "Android Package Name = com.BarrowBoys.SewerHero".
IamKingWaiMark commented 11 months ago

Example meta-data element, it seems you are putting it in the right location

<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value=""/>

Did you try launching it from the UE editor as well?

To see the package name in the firebase console, you can

1) go to https://console.firebase.google.com/ 2) Click on the Gear icon next to the Project Overview title on the menu to the left > Project Settings image 3) Scroll to "Your apps" section and then you should see the list of apps image

For Admob,

1) Go to https://apps.admob.com/ 2) Click on the Apps menu on the left and you should see a list of your apps image 3) If you do not, you'll need to link it with Google Play

If you are testing you do not need to use a valid Admob id and this should work: ca-app-pub-3940256099942544~3347511713

IamKingWaiMark commented 11 months ago

If you have a valid Admob id,

You can click on any of the Ad Units and view the instructions to get your Admob app id since it'll give you your app id and the ad unit id in the instructions.

NikolayEltsov commented 11 months ago

The plugin is functioning correctly when we create a package solely for testing purposes and install it directly on a mobile phone. It displays both test ads and real ads flawlessly, without any issues. However, the problem arises when we package the app for distribution and upload it to Google Play. Upon installation from Google Play, the app crashes during the initialization of the Google Mobile Ad node. We have thoroughly reviewed all settings for Firebase and AdMob, and they appear to be configured correctly.

IamKingWaiMark commented 11 months ago

Hi,

I just tested it on 5.1.1. It does crash.

It was tested on 5.1.0 when the plugin went live.

I will see if updating or downgrading the AdMob SDK will fix the issue.

I think if you cannot upgrade your project to 5.2, you should request a refund through the Epic Games support.

I will probably remove 5.1 from the plugin page for the time being and make the changes to see if it works for 5.1.1.

IamKingWaiMark commented 11 months ago

Hi, there is an update for 5.0.2.

Update the plugin and you will be able to package.

HenriOzz commented 9 months ago

Hi, there is an update for 5.0.2.

Update the plugin and you will be able to package.

Hi! I'm precisely crashing at the same step as was shown here. Pretty much the same setup, working all fine with the issue only ocurring when packaging the app for distribution and uploading it to Google Play at the moment the game calls the function "Initialize Google Mode Ads"...

However, I'm using 4.27.2. Was this fix-update also applied to 4.27.2? If not, please do it.

Thank you!

IamKingWaiMark commented 9 months ago

Hi,

Epic Games will not allow updates to plugins older than the last 3 latest versions of Unreal. Only 5.1, 5.2, and 5.3 will allow updates.

For 4.27, go to

Path to your Installer\Epic Games\UE_4.27\Engine\Plugins\Marketplace\GoogleAdmobBlueprint\Source\GoogleAdmobBlueprint

Replace the GoogleAdmob_UPL with this one

https://drive.google.com/file/d/1rimDXjC3zxk3wRIVBr_juOs65FJeij7U/view?usp=sharing