Code Monkey home page Code Monkey logo

Comments (12)

zoobibackups avatar zoobibackups commented on May 29, 2024 1
{"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.

zoobibackups avatar zoobibackups commented on May 29, 2024 1

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.

this doesnot work in previous versions let me try the new version now???

from admob.

wjaykim avatar wjaykim commented on May 29, 2024 1

Ahh, okay. Let me know if it doesn't work.

from admob.

haresh4d avatar haresh4d commented on May 29, 2024

@zoobibackups it is not a crash it is just a console.error message which wont be displayed in release build.

from admob.

wjaykim avatar wjaykim commented on May 29, 2024

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 avatar zoobibackups commented on May 29, 2024

@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 avatar zoobibackups commented on May 29, 2024

@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.

zoobibackups avatar zoobibackups commented on May 29, 2024

And why this issue is closed, have you provide any solution to it????

from admob.

wjaykim avatar wjaykim commented on May 29, 2024

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.

haresh4d avatar haresh4d commented on May 29, 2024

@zoobibackups use the latest version of library. It doesnt show any error there.

from admob.

zoobibackups avatar zoobibackups commented on May 29, 2024

@zoobibackups use the latest version of library. It doesnt show any error there.

Ok i will try, thanks!

from admob.

zoobibackups avatar zoobibackups commented on May 29, 2024

Ahh, okay. Let me know if it doesn't work.

Yap, its working fine now, thanks!

from admob.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.