poingstudios / godot-admob-ios

Godot's AdMob Plugin for iOS with support for Mediations.
https://poingstudios.github.io/godot-admob-plugin/
MIT License
89 stars 14 forks source link

[BUG] Animations don't start after rewarded ad is closed #1

Closed SanderVanhove closed 2 years ago

SanderVanhove commented 2 years ago

Describe the bug

When a rewarded ad is closed, it switches back to the game but it doesn't seem to continuing the game. All the animations stop playing and it won't take input. It is like the game is not getting updated.

After switching apps everything resumes like normal.

To Reproduce Steps to reproduce the behavior:

  1. Wait for MobileAds to initialize.
  2. Load a rewarded ad.
  3. Show the rewarded ad.
  4. After closing it, nothing gets updated.

Expected behavior After the ad is closed the game should resume.

Screenshots N.a.

Smartphone (please complete the following information):

Additional context A stack trace:

******** stop animation!
2021-07-03 15:57:43.228692+0200 bouncybox[9735:347477] Calling load_rewarded
2021-07-03 15:57:43.228845+0200 bouncybox[9735:347477] rewarded will load with the id
2021-07-03 15:57:43.228919+0200 bouncybox[9735:347477] ca-app-pub-xxxxxxxxxxxxxxxxx/xxxxxx
2021-07-03 15:57:44.403777+0200 bouncybox[9735:347477] WF: _userSettingsForUser mobile: {
    filterBlacklist =     (
    );
    filterWhitelist =     (
    );
    restrictWeb = 1;
    useContentFilter = 0;
    useContentFilterOverrides = 0;
    whitelistEnabled = 0;
}
2021-07-03 15:57:44.403845+0200 bouncybox[9735:347477] WF: _WebFilterIsActive returning: NO
2021-07-03 15:57:45.671336+0200 bouncybox[9735:347477] reward successfully loaded
2021-07-03 15:57:49.997390+0200 bouncybox[9735:347477] [assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=3 "Target is not running or required target entitlement is missing" UserInfo={RBSAssertionAttribute=<RBSDomainAttribute| domain:"com.apple.webkit" name:"Suspended" sourceEnvironment:"(null)">, NSLocalizedFailureReason=Target is not running or required target entitlement is missing}>
2021-07-03 15:57:49.997542+0200 bouncybox[9735:347477] [ProcessSuspension] 0x114bc8cc0 - ProcessAssertion: Failed to acquire RBS Suspended assertion 'WebProcess Suspended Assertion' for process with PID 9854, error: Error Domain=RBSAssertionErrorDomain Code=3 "Target is not running or required target entitlement is missing" UserInfo={RBSAssertionAttribute=<RBSDomainAttribute| domain:"com.apple.webkit" name:"Suspended" sourceEnvironment:"(null)">, NSLocalizedFailureReason=Target is not running or required target entitlement is missing}

After switching apps an going back to my game I see this:

2021-07-03 15:58:08.748383+0200 bouncybox[9735:347477] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
2021-07-03 15:58:19.983539+0200 bouncybox[9735:347477] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
2021-07-03 15:58:22.830438+0200 bouncybox[9735:350475] [connection] nw_endpoint_handler_set_adaptive_read_handler [C7.1.1 2a00:1450:400e:808::200e.443 ready channel-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, ipv6, dns)] unregister notification for read_timeout failed
2021-07-03 15:58:22.830686+0200 bouncybox[9735:350475] [connection] nw_endpoint_handler_set_adaptive_write_handler [C7.1.1 2a00:1450:400e:808::200e.443 ready channel-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, ipv6, dns)] unregister notification for write_timeout failed
start animation!

I think it has something to do with the

******** stop animation!

and

start animation!

lines.

gumaciel commented 2 years ago

Hi @SanderVanhove thanks for reporting it, we will check it

gumaciel commented 2 years ago

https://user-images.githubusercontent.com/20030153/124389081-f9085500-dcbb-11eb-992a-654893735f1f.mov

@SanderVanhove hi, we tested here and it's working normally, can you send to us more detail about what are you doing?

If possible try to record a video for us.

Also try to download again the updated version of Editor Plugin and iOS Plugin

SanderVanhove commented 2 years ago

Hey Gustavo, thanks for getting back to me!

Here is a video of what I mean:

https://user-images.githubusercontent.com/18272282/124393803-8c617a80-dcfc-11eb-9111-5cfa0170ae10.mov

As you can see, after closing the ad, the animations stop. After I switch back to the app they resume.

I also tried the newest build of the plugin without any advance. The admob_api folder is gone from the master branch in this repository by the way.

SanderVanhove commented 2 years ago

Aha I have found the problem!

Everytime I showed an ad I did this:

MobileAds.show_rewarded()
MobileAds.load_rewarded()

As soon as I showed an ad I started loading a new one, in another library this was possible. But with this library it gives the behaviour I showed you. Now I only start loading the new ad when the old one is closed and that does the trick! 😁

I don't know if this should be considered a bug?

gumaciel commented 2 years ago

Yes, I guess this is a bug, we will check why is this happening

gumaciel commented 2 years ago

@SanderVanhove we are migrating the iOS Plugin to a dedicated repository, you can check here: https://github.com/Poing-Studios/godot-admob-ios

Pros:

gumaciel commented 2 years ago

Hi @SanderVanhove please try with out latest version: https://github.com/Poing-Studios/godot-admob-ios/releases/tag/1.1.0

gumaciel commented 2 years ago

Observation: You won't be able to load a new rewarded, interstitial or rewarded_interstitial ad if is not "closed"

gumaciel commented 2 years ago

@SanderVanhove i will close this issue since i tested sometimes here and seems it's fixed, if the problem persists you can open again the issue, thank you!