deckameron / Ti.Android.Admob

Appcelerator Android module wrapping Admob functionalities
17 stars 7 forks source link

Native ads causes app to crash #18

Closed qasim90 closed 4 years ago

qasim90 commented 4 years ago

Really great module. Good efforts. I'm trying to implement native ads as part of tableview rows. I've copied Native ad sample code from read me with just only one change i.e. reduced height of media view to 150 from 250 but as soon as I scroll tableview to see add the app crashes with following exception: [ERROR] InputEventReceiver: Exception dispatching input event. [ERROR] TiExceptionHandler: (main) [209,43131] ti.android.admob.AdmobView$2 [ERROR] TiExceptionHandler: [ERROR] TiExceptionHandler: ti.android.admob.AdmobView.createUnifiedNativeAds(AdmobView.java:214) [ERROR] TiExceptionHandler: ti.android.admob.AdmobView.processProperties(AdmobView.java:910) [ERROR] TiExceptionHandler: org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1293) [ERROR] TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:508) [ERROR] TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:498) [ERROR] TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:464) [ERROR] TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:515) [ERROR] TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:498) [ERROR] TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:464) [ERROR] TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:515) [ERROR] TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:498) [ERROR] TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:464) [ERROR] TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.forceCreateView(TiViewProxy.java:433) [ERROR] TiExceptionHandler: ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.createControls(TiTableViewRowProxyItem.java:257) [ERROR] TiExceptionHandler: ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:458) [ERROR] TiExceptionHandler: ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:94) [ERROR] TiExceptionHandler: ti.modules.titanium.ui.widget.tableview.TiTableView$TTVListAdapter.getView(TiTableView.java:250) [ERROR] TiExceptionHandler: android.widget.HeaderViewListAdapter.getView(HeaderViewListAdapter.java:220) [ERROR] TiExceptionHandler: android.widget.AbsListView.obtainView(AbsListView.java:2473) [ERROR] TiExceptionHandler: android.widget.ListView.makeAndAddView(ListView.java:1894) [ERROR] TiExceptionHandler: android.widget.ListView.fillDown(ListView.java:710) [ERROR] TiExceptionHandler: android.widget.ListView.fillGap(ListView.java:674) [ERROR] TiExceptionHandler: android.widget.AbsListView.trackMotionScroll(AbsListView.java:5554) [ERROR] TiExceptionHandler: android.widget.AbsListView.scrollIfNeeded(AbsListView.java:3620) [ERROR] TiExceptionHandler: android.widget.AbsListView.onTouchMove(AbsListView.java:4108) [ERROR] TiExceptionHandler: android.widget.AbsListView.onTouchEvent(AbsListView.java:3890) [ERROR] TiExceptionHandler: ti.modules.titanium.ui.widget.listview.TiNestedListView.onTouchEvent(TiNestedListView.java:125) [ERROR] TiExceptionHandler: android.view.View.dispatchTouchEvent(View.java:8527) [ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2542) [ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2225) [ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548) [ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2239) [ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548) [ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2239) [ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548) [ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2239) [ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548) [ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2239) [ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548) [ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2239) [ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548) [ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2239) [ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548) [ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2239) [ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548) [ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2239) [ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548) [ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2239) [ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548) [ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2239) [ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548) [ERROR] TiExceptionHandler: android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2239) [ERROR] TiExceptionHandler: and [ERROR] Ads: Fail to get isAdIdFakeForDebugLogging [ERROR] Ads: java.io.IOException: java.util.concurrent.TimeoutException: Timed out waiting for the service connection [ERROR] Ads: at com.google.android.gms.ads.identifier.d.a(:com.google.android.gms.policy_ads_fdr_dynamite@21207003@21207003.283464268.283464268:42) [ERROR] Ads: at com.google.android.gms.ads.internal.util.c.a(:com.google.android.gms.policy_ads_fdr_dynamite@21207003@21207003.283464268.283464268:3) [ERROR] Ads: at com.google.android.gms.ads.internal.util.a.run(:com.google.android.gms.policy_ads_fdr_dynamite@21207003@21207003.283464268.283464268:3) [ERROR] Ads: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422) [ERROR] Ads: at xw.a(:com.google.android.gms.policy_ads_fdr_dynamite@21207003@21207003.283464268.283464268:1) [ERROR] Ads: at xh.run(:com.google.android.gms.policy_ads_fdr_dynamite@21207003@21207003.283464268.283464268:7) [ERROR] Ads: at xx.run(:com.google.android.gms.policy_ads_fdr_dynamite@21207003@21207003.283464268.283464268:1) [ERROR] Ads: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) [ERROR] Ads: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) [ERROR] Ads: at java.lang.Thread.run(Thread.java:818) [ERROR] Ads: Caused by: java.util.concurrent.TimeoutException: Timed out waiting for the service connection [ERROR] Ads: at com.google.android.gms.ads.identifier.d.a(:com.google.android.gms.policy_ads_fdr_dynamite@21207003@21207003.283464268.283464268:36)

qasim90 commented 4 years ago

This was due to using old ti.playservices version (11.x). Once I run with ti.playservices v16.1.4 it worked fine.