node-dns icon indicating copy to clipboard operation
node-dns copied to clipboard

UncaughtExceptions when using dns client in TCP protocol

Open jackyz opened this issue 12 years ago • 5 comments

I don't have time to go deeper now. post this issues first.

domain.js:66
    throw er;
          ^
TypeError: Cannot read property '_left' of null
    at Heap._delete_swap (/Users/jackyz/Works/pobi-dev/node_modules/native-dns/node_modules/binaryheap/binaryheap.js:202:20)
    at Heap.remove (/Users/jackyz/Works/pobi-dev/node_modules/native-dns/node_modules/binaryheap/binaryheap.js:104:10)
    at MemoryStoreExpire.delete (/Users/jackyz/Works/pobi-dev/node_modules/native-dns/lib/cache.js:106:19)
    at /Users/jackyz/Works/pobi-dev/node_modules/native-dns/lib/memory.js:35:5
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)

maybe later, I will try to look into.

jackyz avatar Jan 10 '13 11:01 jackyz

I'm also receiving this:

/home/$/node_modules/native-dns/node_modules/binaryheap/binaryheap.js:55
    if (!insert._left)
               ^
TypeError: Cannot read property '_left' of null
    at Heap.insert (/home/api/node_modules/native-dns/node_modules/binaryheap/binaryheap.js:55:16)
    at MemoryStoreExpire.set (/home/api/node_modules/native-dns/lib/cache.js:76:17)
    at Cache.store (/home/api/node_modules/native-dns/lib/cache.js:157:17)
    at Array.forEach (native)
    at Cache.store (/home/api/node_modules/native-dns/lib/cache.js:156:18)
    at Request.handle (/home/api/node_modules/native-dns/lib/client.js:85:18)
    at SocketQueue._onmessage (/home/api/node_modules/native-dns/lib/pending.js:154:9)
    at EventEmitter.emit (events.js:96:17)
    at Socket.EventEmitter.emit (events.js:96:17)
    at UDP.onMessage (dgram.js:350:8)

ndrut avatar Jan 15 '13 09:01 ndrut

If you need a way to work around this until I can get it fixed you can disable caching with require('native-dns').platform.cache = false

tjfontaine avatar Jan 15 '13 21:01 tjfontaine

Cool, I'll update that for now. Usually trying again immediately after the error works. I'll keep watching for the bug fix.

On Jan 15, 2013, at 3:49 PM, Timothy J Fontaine [email protected] wrote:

If you need a way to work around this until I can get it fixed you can disable caching with require('native-dns').platform.cache = false

— Reply to this email directly or view it on GitHub.

ndrut avatar Jan 15 '13 23:01 ndrut

Disregard what this comment was.

ndrut avatar Jan 16 '13 07:01 ndrut

I'm seeing this as well on both Linux and Windows.

I tried require('native-dns').platform.cache = false but that resulted in a type error:

TypeError: Object false has no method 'Question'

using require('native-dns').platform.cache = false sets the dns object to false. The work around is to set the platform cache to false after the object has been created.

robhicks avatar Feb 11 '13 14:02 robhicks