Comments (12)
{"code": 0, "message": "Error while connecting to ad server: Unable to resolve host \"googleads.g.doubleclick.net\": No address associated with hostname"}
[Tue Oct 12 2021 11:53:46.466] WARN Possible Unhandled Promise Rejection (id: 0):
Error: Error while connecting to ad server: Unable to resolve host "googleads.g.doubleclick.net": No address associated with hostname
promiseMethodWrapper@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:2207:45
load@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:300943:43
AppOpenAd@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:300075:17
createAd@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:300101:44
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:300573:34
commitHookEffectListMount@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:19611:38
commitPassiveHookEffects@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:19646:44
invokeGuardedCallbackImpl@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:9167:21
invokeGuardedCallback@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:9261:42
flushPassiveEffectsImpl@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:21990:36
unstable_runWithPriority@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:54964:30
performSyncWorkOnRoot@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:21115:28
performSyncWorkOnRoot@[native code]
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:12418:38
unstable_runWithPriority@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:54964:30
flushSyncCallbackQueueImpl@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:12413:28
flushSyncCallbackQueue@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:12402:35
scheduleUpdateOnFiber@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:20755:37
updateContainer@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:23234:21
render@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:23668:24
renderApplication@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:82776:77
run@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:82346:28
runApplication@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:82399:28
__callFunction@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:2741:36
http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:2473:31
__guard@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:2695:15
callFunctionReturnFlushedQueue@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:2472:21
callFunctionReturnFlushedQueue@[native code]
Exactly the app crashes when no internet connection, this is the log.
from admob.
You can handle error not through try catch block, but using the
adLoadError
value ofuseAppOpenAd
. If the error occurs while loading ad, theadLoadError
value will be set, (was undefined before error occurs), then you can skip showing ad. That is because this library does not "throws" error but providing error info through hook returns. You can read documentation.
this doesnot work in previous versions let me try the new version now???
from admob.
Ahh, okay. Let me know if it doesn't work.
from admob.
@zoobibackups it is not a crash it is just a console.error message which wont be displayed in release build.
from admob.
Hi, as @haresh4d said, the message showed up when you handle ad load error with console.error
.
You can write your own code to handle error.
from admob.
@zoobibackups it is not a crash it is just a console.error message which wont be displayed in release build.
Hi, as @haresh4d said, the message showed up when you handle ad load error with
console.error
. You can write your own code to handle error.
i put this in try catch but no error log in the catch, seems that the error is not handeled by this package. console.error show nothing
from admob.
@zoobibackups it is not a crash it is just a console.error message which wont be displayed in release build.
tryCatch gives nothing in the catch.
And its own error handling also not working
from admob.
And why this issue is closed, have you provide any solution to it????
from admob.
You can handle error not through try catch block, but using the adLoadError
value of useAppOpenAd
. If the error occurs while loading ad, the adLoadError
value will be set, (was undefined before error occurs), then you can skip showing ad. That is because this library does not "throws" error but providing error info through hook returns. You can read documentation.
from admob.
@zoobibackups use the latest version of library. It doesnt show any error there.
from admob.
@zoobibackups use the latest version of library. It doesnt show any error there.
Ok i will try, thanks!
from admob.
Ahh, okay. Let me know if it doesn't work.
Yap, its working fine now, thanks!
from admob.
Related Issues (20)
- Multiple appOpenAds at the same time HOT 1
- Execution failed for task ':app:checkDebugAarMetadata'. HOT 3
- Admob never loads HOT 2
- Delay SDK initialization to request EEA consent HOT 2
- [Suggestion] Disable entire admob HOT 2
- Expo Supported? HOT 1
- Android 12 - androidx.work issue HOT 2
- AppOpenAd displayed above the interstialAd which is violation HOT 7
- Hermes error HOT 1
- adLoaded never changes it's value HOT 3
- App crash on start up (only on emulator) HOT 4
- [RewardedAd] `loadOnMounted: false` performance issue. HOT 2
- new react native project won't compile for android HOT 1
- Using this library with expo HOT 1
- Can't get serverSideVerificationOptions data in server side callback HOT 2
- Problem with M1 (Macbook 2021 Pro 14 inch) HOT 4
- After rewardedAd.load(), the ad screen or Alert can't display normally. HOT 1
- Implementation of AdMob mediation HOT 2
- [RewardAd] Server side validation doesn't work HOT 1
- Support Expo EAS build via plugin config? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from admob.