ammarahm-ed/react-native-admob-native-ads

I use NativeMediaView on iOS, but "Asset uses ImageView, not MediaView" is showing.

CHOIJUNHYUK01 opened this issue · 14 comments

const AdImageContainer = styled(NativeMediaView)``;

I wrote my advertisement image View for this above code.
But still get AdLoadFail because of that message.
And Android, the Advertisement showing well.

So, I have a question.
In this situation, NativeMediaView is not defined for MediaView on ios?

I use React Native for 0.65.3
react-native-admob-native-ads for 0.6.3

@ammarahm-ed I had this issue on 2023, October 11th.
It suddenly happends to me, just on iOS

Same here I am also getting this message in Android. In IOS and Android google admob impressions have suddnly stopped. Its 0 impressions since last few days.

Same here I am also getting this message in Android. In IOS and Android google admob impressions have suddnly stopped. Its 0 impressions since last few days.

Same to me. This plugin seems inactive. There is no update since a long time

Kindly provide an example to reproduce the issue.

This is off-topic, but I get a similar error on the native Android platform. I suppose the issue is related to the AdMob backend. I have communicated with the AdMob support team for a month, but unfortunately, the problem has not been resolved.
A fresh app release solves the problem for a while, but in a few days, the error appears again. Test ad placement with video runs without any issues.

I believe this issue should be addressed directly to AdMob.

This is off-topic, but I get a similar error on the native Android platform. I suppose the issue is related to the AdMob backend. I have communicated with the AdMob support team for a month, but unfortunately, the problem has not been resolved.
A fresh app release solves the problem for a while, but in a few days, the error appears again. Test ad placement with video runs without any issues.

I believe this issue should be addressed directly to AdMob.

Could it be related to the version of Admob library used. In your native app, are you using the same v20 or v22?

Could it be related to the version of Admob library used. In your native app, are you using the same v20 or v22?

I use 22.4.0. I see a fresh release 22.5.0 is available, but no hints address the issue.

And yes, the first time the error appeared was on October 11.

same issue on android. Test ads are working but real ads have this issue.

LOG {"error": {"code": 3, "domain": "com.google.android.gms.ads", "message": "Asset uses ImageView, not MediaView. <https://support.google.com/admob/answer/9905175#5>"}} ERROR

Implementation

import React, { useEffect, useRef, useState } from 'react';
import { StyleSheet, View } from 'react-native';
import NativeAdView, {
  AdBadge,
  CallToActionView,
  HeadlineView,
  IconView,
  ImageView,
  TaglineView
} from 'react-native-admob-native-ads';
import Config from '../../env';
import fonts from '../constants/fonts';
import { SCREEN_WIDTH, moderateScale, wp } from '../constants/scaling';
import colors from '../constants/theme';
const NativeAdsLow = ({}) => {
  const nativeAdViewRef = useRef();
  const [isloading, setIsLoading] = useState(true);
  useEffect(() => {
    nativeAdViewRef.current?.loadAd();
  }, []);
  return (
    <NativeAdView
      ref={nativeAdViewRef}
     
      onNativeAdLoaded={data => {
        setIsLoading(false);
      }}
      onAdFailedToLoad={err => {
        console.log(err,"ERROR");
      }}
      adUnitID={Config.NATIVE_AD_ID_LOW}>
      <View
        style={{
          opacity: isloading ? 0 : 1,
          height: wp(70),
          backgroundColor: '#0000',
        }}>
        <View style={styles.rowView}>
          <View style={styles.Left}>
            <View style={{flexDirection: 'row'}}>
              <IconView style={styles.IconView} />
              <View
                style={{
                  marginLeft: moderateScale(5),
                }}>
                <HeadlineView numberOfLines={2} style={styles.HeadlineView} />
                <TaglineView numberOfLines={3} style={styles.tabLineText} />
              </View>
            </View>
          </View>
          <View style={styles.Right}>
            <AdBadge style={styles.AdBadge} textStyle={styles.AdBadgeText} />
          </View>
        </View>
        <ImageView style={styles.ImageView} />
        <CallToActionView
          style={styles.CallToActionView}
          textStyle={styles.CallToActionViewText}
        />
      </View>
    </NativeAdView>
  );
};

//export default (NativeAdsLow);

export default memo(NativeAdsLow);

package.json

"react-native-admob-native-ads": "^0.6.6",

Same here I am also getting this message in Android. In IOS and Android google admob impressions have suddnly stopped. Its 0 impressions since last few days.

i have tested it on 20, 21 and 22 bit for all same issue

Same here, any solution?

Same issue, @aftabaminzoobiapps did you find any solution?

same issue again. it fixed for 2 or 3 days and then again the same issue

I think this plugin is outdated now. can we try another one. like to develop our own module.

Fixed in v0.7.2