admob problems error code 1

In only iOS, not test mode,
I receive Error Code 1 (ERROR_CODE_INVALID_REQUEST)

It works normally in test mode or Android. About a month ago there were no special problems.

ps.SKAdNetworkItems part doesn’t make any difference.

I don’t know if there’s an ongoing / known issue at the moment but you may want to share more information regarding the problem. A sample project would help it.

On Solar2d 2020.3622 build,
I use banner, interstitial, reward ads.
In Android, admob works well.

In iOS, test mode also works well.
But In the real mode, admob returns error code 1.

I will post my project on this forums soon.

It’s hard to help without you sharing your relevant code, but I’ll try:
Basically, when you receiving error code 1 from AdMob it says request was invalid, and most of the times it’s related to an incorrect ad unit ID or incorrect app ID. On top of that, you say that it happens only on iOS device so I’ll suggest you to do the following, to debug the problem correctly:

  1. Go to your AdMob account and make sure you created an iOS app for that specific app, because sometimes you can forget to define your admob app as iOS, and it can cause problems (sending an ad request from iOS device to NOT-iOS app ID - cause invalid request)
    You can check that by going to your app list:
    image

  2. Go over your iOS IDs you defined in the code, make sure they are all correct and related to the iOS app on the Admob site. search for unseen characters, maybe spaces that you mistakenly added.
    sometimes, when you copy the IDs from the admob site, you can also accidentally copy all kinds of characters that not even seen in a text editor…! So - to make sure you only copy the id, you can use the copy link that offered to you by Admob, it look something like this:


    You can copy the APP ID as well using that button. just go to the App list (left-side bar) —> View all apps (bottom-right on the app list ) —> choose your specific app id to copy

  3. If you using some if statement to determinate that you run on iOS device, something like that:

    if (system.getInfo("platform") == "ios") then
        myAppId= "Admob iOS APP ID!"
        bannerUnitId = "Admob banner unit id related to the same APP ID!"

I’ll suggest you print to the screen or popup those variables just before you initialize the admob plugin, just to make sure that the if statement works and the variables that you are using to init the plugin is the variables you meant.
so, just before the init:

    native.showAlert( "Variables:", myAppId, { "Close" })
    admob.init( adListener, { appId=myAppId" } )

only for debugging, yes?

Hope it helped!
Good luck

1 Like

Thanks a lot.
I checked already app id and unit id.
Even more than, I rebuilt other ios apps which had worked well.
But I received the same problems.

Read my comment here: Admob doesn’t work

Thanks a lot.
admob works normally at last.
It probably took about 2 weeks.

1 Like