IamKingWaiMark / GoogleAdmobBlueprint

Support git for GoogleAdmobBlueprint Plugin
0 stars 0 forks source link

Plugin content cannot be found from engine #2

Closed ParkkiSakko closed 1 year ago

ParkkiSakko commented 1 year ago

Hey, I tried using this plugin for ads, but my game keeps crashing at launch, no matter what settings I use. I followed the Youtube tutorial exatly, and yet I ran into this issue. When I try to open the create banner ad node (others give the same error) with Visual studio, I get an error could't find code file. What could be a solution for this whole issue?

IamKingWaiMark commented 1 year ago

Hello,

Can't really see the full path from those messages.

But:

1) Make a copy of your project 2) Delete the Intermediate, Binaries, and Saved folders 3) Launch the Unreal Engine project 4) Wait for it to finish building (You may not see it building and need to wait some time)

Also, if you navigate to that path that it is saying, what do you see?

ParkkiSakko commented 1 year ago

I tried these, none of them worked. Also I can't find such a directory from my PC. I have no idea what could be an issue. If I disable the plugin the game works fine, but as soon as I enable it, game starts crashing. Doesn't matter are the codes firing or not. What else could I try? Engine is UE 5.0.3

IamKingWaiMark commented 1 year ago

Not sure, hard to tell since it seems like it is some settings related to where the project is looking for the plugin on your system.

Did you install the plugin from the launcher?

It should be located in the in the UE_VERSION/Engine/Plugins/Marketplace directory.

Maybe uninstall the plugin from the launcher, launch the app. Then reinstall the plugin and try again.

IamKingWaiMark commented 1 year ago

Also, do you have the logs in the Output window?

IamKingWaiMark commented 1 year ago

Also can you show a screenshot of what you are doing?

ParkkiSakko commented 1 year ago

Here are a few screenshots. I found the directory and uninstalled the plugin and reinstalled it. Here's an image from my game instance and from the level calling the event located in the game instance. image

image

Here are my packaging settings: image

And here are my Android settings: image

image

image

image

image

The game is Android only, so iOS is not set up.

Also here's the output log when I try to quick launch the game on my phone. It gives success, but it'll crash once launched: TheWallOfMoney.log

IamKingWaiMark commented 1 year ago

Hi,

After looking at the screenshots, it should be fine with the setup for the plugin. Logs looks normal.

However, it may be how you setup your nodes in the game instance and calling it. Unreal tends to crash if stuff are not executed in the same thread. Since all the nodes in the plugins are non-blocking code that waits for events, it is best to call them in the same place.

Once GMA is initialize you should be able to call the nodes anywhere like normal.

To test, you can try to:

1) Change the package name to : com.ue.admob.blueprint.plugin (although your package should work unless you have admob setup but it is imcomplete) 2) Init Google Mobile ads like this in the game instance:

IamKingWaiMark commented 1 year ago

image

IamKingWaiMark commented 1 year ago

See if your app launches.

Then do this to test the banner ad:

IamKingWaiMark commented 1 year ago

image

ParkkiSakko commented 1 year ago

Tried this out, didn't work. I can't set the package name as com.ue.admob.blueprint.plugin, it fails in the packaging phase. The app is already published on Google Play, so the settings would get mixed.

Looks like the app will crash once it tries to init the GMA. But if I launch my game with the plugin completely disabled, it works fine. I'm worried that the issue mentioned first in this thread causes the issue.

The content folder of this plugin is empty. Is that supposed to be?

ParkkiSakko commented 1 year ago

image

IamKingWaiMark commented 1 year ago

Yes, nothing should be in the contents folder

IamKingWaiMark commented 1 year ago

Are you able to test with a new project and launch?

This can help confirm if there is some settings/preferences on your system that can effect it.

ParkkiSakko commented 1 year ago

I tried with a new test project. Worked! Init was succesfull and the blank game started after around 5 seconds of waiting. So something is wrong with the files in my actual project.

I used the same settings than in the photos above and named the package com.ue.admob.blueprint.plugin. Could the problem be inside the google play services json file or somewhere else?

ParkkiSakko commented 1 year ago

When I build development version, it launches perfectly even in the actual project, but shipping and distribution version crashes at launch. So shipping is the issue, not the project

ParkkiSakko commented 1 year ago

I have now come to a conclusion that the issue is caused by "for distribution" checkmark. If I disable it, game works with ads, but Google Play doesn't allow that file to be sent to the store. Also the package size is now over 200MB instead of previous 85MB.

If it's enabled, the game crashes at launch, but the size is back to normal 85MB. So how I could bypass that issue but still be able to upload the game to the store?

IamKingWaiMark commented 1 year ago

Hello thanks for the updates, is your packaged app a aab file?

ParkkiSakko commented 1 year ago

Yes, because Google requires it to be AAB file. APK's cannot be uploaded to Google anymore

ParkkiSakko commented 1 year ago

I have sent the newest version to Google Play and I'll see if it works normal when lauched from the store. If that doesn't work then we have to solve that issue with distribution setting.

ParkkiSakko commented 1 year ago

Google Play rejected the app this morning due stability. For distribution button is the issue at this time. Any idea what I could do to get it to Google?

image

emrebarisc commented 1 year ago

I have the same issue. There are no errors on builds which are not for distribution, but game crashes with 'For Distribution' option selected.

IamKingWaiMark commented 1 year ago

Hi, sure.

Looking into this and trying to reproduce the issue on my end to see.

So far cannot reproduce but will see other ways.

ParkkiSakko commented 1 year ago

Hi, just to make sure, are there any other plugins that this admob system requires for this to work? Or is just this required?

IamKingWaiMark commented 1 year ago

Hi, no other plugins are needed.

emrebarisc commented 1 year ago

Hello. Do you have any updates?

emrebarisc commented 1 year ago

Hello again.

Do you have any updates about the crash yet? Please continue to provide information about the process transparently.

If not, I have to contact Epic Games with my complaints and refund request.

IamKingWaiMark commented 1 year ago

Hi, for now, please request for a refund.

juvilianvfx commented 1 year ago

@IamKingWaiMark Exact same issue. Initializing in game instance or level blueprint, both crashes the game. If you want i can send you the entire project, may help you to fix this issue for ever.

i am using 5.1.1

please let me know if you have any solution for this ?

IamKingWaiMark commented 1 year ago

@juvilianvfx Make sure:

1) Include AdMob support for ads is disabled in Android > Google Player Services image

2) The meta-data element is there without spaces in the beginning

3) The package name matches the one in the google-services.json or plist file

4) Game development with C++ is installed on Visual Studio and Android IDE support for Unreal is installed image

5) You are using this version for the ndk - 25.1.8937393