أخطاء في تحميل الإعلانات

اختيار النظام الأساسي: Android (إصدار تجريبي) جديد Android iOS Unity Flutter

في الحالات التي يتعذّر فيها تحميل إعلان، يتم استدعاء دالة ردّ تعرض كائن LoadAdError.

بالنسبة إلى AdView، يتم استدعاء ما يلي:

يعرض المثال التالي المعلومات المتاحة عند تعذُّر تحميل إعلان:

Kotlin

override fun onAdFailedToLoad(error: LoadAdError) {
  // Gets the domain from which the error came.
  val errorDomain = error.domain
  // Gets the error code. See
  // https://developers.google.com/admob/android/reference/com/google/android/gms/ads/AdRequest#constant-summary
  // for a list of possible codes.
  val errorCode = error.code
  // Gets an error message.
  // For example "Account not approved yet". See
  // https://support.google.com/admob/answer/9905175 for explanations of
  // common errors.
  val errorMessage = error.message
  // Gets additional response information about the request. See
  // https://developers.google.com/admob/android/response-info
  // information.
  val responseInfo = error.responseInfo
  // Gets the cause of the error, if available.
  val cause = error.cause
  // All of this information is available using the error's toString() method.
  Log.d("Ads", error.toString())
}

جافا

@Override
public void onAdFailedToLoad(@NonNull LoadAdError adError) {
  // Gets the domain from which the error came.
  String errorDomain = adError.getDomain();
  // Gets the error code. See
  // https://developers.google.com/admob/android/reference/com/google/android/gms/ads/AdRequest#constant-summary
  // for a list of possible codes.
  int errorCode = adError.getCode();
  // Gets an error message.
  // For example "Account not approved yet". See
  // https://support.google.com/admob/answer/9905175 for explanations of
  // common errors.
  String errorMessage = adError.getMessage();
  // Gets additional response information about the request. See
  // https://developers.google.com/admob/android/response-info
  // information.
  ResponseInfo responseInfo = adError.getResponseInfo();
  // Gets the cause of the error, if available.
  AdError cause = adError.getCause();
  // All of this information is available using the error's toString() method.
  Log.d("Ads", adError.toString());
}
بالنسبة إلى الأخطاء ضمن النطاق MobileAds.ERROR_DOMAIN، يمكن البحث عن الرسالة في مقالة حلّ المشاكل الشائعة لمنح إمكانيّة الوصول للحصول على شرح أكثر تفصيلاً والإجراءات المحتمَلة التي يمكن اتّخاذها لحلّ المشكلة.

تحديد مشاكل رسائل تسجيل الأخطاء الشائعة وحلّها

في الإصدار 23.5.0 من Google Mobile Ads SDK، تم تحسين التسجيل المفصّل لـ يتضمّن تتبُّع تسلسل استدعاء الدوال البرمجية لمكان تعذُّر تحميل الإعلان. لا تشير هذه الرسائل إلى حدوث عطل، بل تحدّد المصدر الفريد للخطأ. يوفّر الجدول التالي سجلّات الأخطاء الشائعة وأوصافها والإجراءات المقترَحة لحلّها:

سجلّ الخطأ الوصف الإجراءات المقترَحة
com.google.android.gms.ads.nonagon.render.cp: * لم يعرِض خادم الإعلانات إعلانًا أو أيّ مصادر إعلانات توسّط لـ طلبها. للاطّلاع على تفاصيل المشاكل الشائعة لمنح إمكانيّة الوصول من هذا النوع، يُرجى الاطّلاع على مقالة حلّ المشاكل الشائعة لمنح إمكانيّة الوصول.
com.google.android.gms.ads.nonagon.render.e: * تعذّر تحميل جميع مصادر الإعلانات في تدفق التوسّط. يمثّل الخطأ المحدّد آخر مصدر إعلان تعذّر تحميله. للاطّلاع على تفاصيل تسجيل سبب تعذُّر تحميل كل مصدر إعلان توسّط، يُرجى الاطّلاع على معلومات الاستجابة.
com.google.android.gms.ads.internal.util.*: Unable to obtain a JavascriptEngine. لم ينجح طلب عرض الإعلان لأنّه لا يُسمح باستخدام WebView في العمليات المميّزة.
  • تحقَّق من إعدادات الإنترنت.
  • أزِل android:sharedUserId="android.uid.system" و ثبِّت التطبيق كتطبيق نظام.
لم ينجح طلب عرض الإعلان بسبب بطء الاتصال بالشبكة. حاوِل تحسين اتصالك بالإنترنت وأَعِد المحاولة.
com.google.android.gms.ads.nonagon.load.a انتهت مهلة طلب عرض الإعلان.
com.google.android.gms.ads.internal.util.*: Error while connecting to ad server: Unable to resolve host "pubads.g.doubleclick.net": No address associated with hostname لم ينجح طلب عرض الإعلان بسبب الاتصال بالشبكة.
com.google.android.gms.ads.internal.util.*: Error building request URL: Cannot determine request type. Is your ad unit id correct? لم يتطابق رقم تعريف الوحدة الإعلانية مع تعبير عادي متوقّع. تحقَّق مما إذا كان رقم تعريف الوحدة الإعلانية صحيحًا.
com.google.android.gms.ads.internal.render.bt: Unable to instantiate mediation adapter class. Google Mobile Ads SDK لا يمكن العثور على محوّل التوسّط.
  • حدِّد المحوّلات التي لا يمكن لـ Google Mobile Ads SDK العثور عليها باستخدام عرض المحوّلات المتاحة في أداة فحص الإعلانات.
  • أضِف المحوّلات الناقصة إلى مشروعك. للاطّلاع على التعليمات حول كيفية إكمال هذه الخطوة لكل مصدر إعلان، يُرجى الاطّلاع على تفاصيل الشبكة.
com.google.android.gms.internal.ads.*: Received error HTTP response code: 403 رفضت خوادم AdMob الطلب. يُرجى إعادة المحاولة لاحقًا. إذا كان من الممكن إعادة إنتاج الخطأ باستمرار، يمكنك التقاط عنوان URL للطلب باستخدام أداة فحص الإعلانات والتواصل مع فريق الدعم.