Skip to content

Loading…

Dom.js: 394 (Uncaught Error: INVALID_NODE_TYPE_ERR: DOM Range Exception 2) #177

Closed
ile opened this Issue · 10 comments

3 participants

@ile

Getting this exception.

Conditions:

  • Subscribing to two queries, which overlap partly
  • I click a link, derby tries to render the next page, does the queries
  • While rendering/querying, it gives the error.

The test case is attached. The test case requires Mongo and creates a "derby-test" database.

derbytest.tar.gz

@juzerali

Pasting logs here will help.

@ile

There isn't that much of a log, but here's some (a stack trace):

Uncaught Error: INVALID_NODE_TYPE_ERR: DOM Range Exception 2 Dom.js:394
getRange Dom.js:394
Dom.item Dom.js:164
model.__events.EventDispatcher.onTrigger derby.Model.js:91
EventDispatcher.trigger EventDispatcher.js:35
triggerEach derby.Model.js:248
(anonymous function) derby.Model.js:156
EventEmitter.emit events:75
listener util.js:65
EventEmitter.emit events:75
(anonymous function) index.js:40
EventEmitter.emit events:75
listener util.js:65
EventEmitter.emit events:75
(anonymous function) index.js:40
EventEmitter.emit events:75
module.exports.proto._addData descriptor.Model.js:163
(anonymous function) descriptor.Model.js:43
SocketNamespace.onPacket c6FaP4KO6Uu1mAjyHn7r6A.js:2253
Socket.onPacket c6FaP4KO6Uu1mAjyHn7r6A.js:1930
Transport.onPacket c6FaP4KO6Uu1mAjyHn7r6A.js:1332
Transport.onData c6FaP4KO6Uu1mAjyHn7r6A.js:1303
websocket.onmessage c6FaP4KO6Uu1mAjyHn7r6A.js:2378

@juzerali

Your code is working fine on my ubuntu. Can you paste your package.json or in case ur are manually installing specific version of derby or any other deps.

@ile

I am also using ubuntu for this. I will make a video to show what happens, that may be the most helpful at this point.

The package.json should be in the tar.gz as it is on my computer.

Here are a couple of avi files, zipped:
derby-1.zip
derby-2.zip

The error seems to happen at least in Chrome and Firefox. I mostly use Chrome and it seemed easy to use the console.trace() and debug.

@ile

npm ls:

ile@ubuntu:~/tests/derbytest$ npm ls
derbytest@0.0.0 /home/ile/tests/derbytest
├── coffee-script@1.4.0
├─┬ derby@0.3.13
│ ├── chokidar@0.4.0
│ ├─┬ commander@1.1.1
│ │ └── keypress@0.1.0
│ ├── dom-shim@0.1.1
│ ├── html-util@0.1.3
│ ├── less@1.3.1
│ ├── mkdirp@0.3.4
│ ├── nib@0.9.0
│ ├─┬ racer@0.3.13
│ │ ├── ansi-color@0.2.1
│ │ ├─┬ browserify@1.16.5
│ │ │ ├─┬ buffer-browserify@0.0.4
│ │ │ │ └── base64-js@0.0.2
│ │ │ ├── coffee-script@1.4.0
│ │ │ ├── commondir@0.0.1
│ │ │ ├── crypto-browserify@0.1.1
│ │ │ ├── deputy@0.0.4
│ │ │ ├─┬ detective@0.2.1
│ │ │ │ └── esprima@0.9.9
│ │ │ ├─┬ http-browserify@0.1.6
│ │ │ │ └── concat-stream@0.0.8
│ │ │ ├── nub@0.0.0
│ │ │ ├─┬ optimist@0.3.5
│ │ │ │ └── wordwrap@0.0.2
│ │ │ ├── resolve@0.2.3
│ │ │ ├─┬ syntax-error@0.0.0
│ │ │ │ └── esprima@0.9.9
│ │ │ └── vm-browserify@0.0.1
│ │ ├── coffee-script@1.3.3
│ │ ├─┬ connect@2.7.0
│ │ │ ├── bytes@0.1.0
│ │ │ ├── cookie@0.0.5
│ │ │ ├── cookie-signature@0.0.1
│ │ │ ├── crc@0.2.0
│ │ │ ├── formidable@1.0.11
│ │ │ ├── fresh@0.1.0
│ │ │ ├── pause@0.0.1
│ │ │ ├── qs@0.5.1
│ │ │ └─┬ send@0.1.0
│ │ │   ├── mime@1.2.6
│ │ │   └── range-parser@0.0.4
│ │ ├── cookie@0.0.4
│ │ ├── debug@0.7.0
│ │ ├── es5-shim@2.0.5
│ │ ├── hooks@0.2.1
│ │ ├── node-uuid@1.3.3
│ │ ├─┬ share@0.4.1
│ │ │ ├─┬ connect@1.9.2
│ │ │ │ ├── formidable@1.0.11
│ │ │ │ ├── mime@1.2.7
│ │ │ │ └── qs@0.5.2
│ │ │ ├── hat@0.0.3
│ │ │ ├─┬ optimist@0.3.5
│ │ │ │ └── wordwrap@0.0.2
│ │ │ ├─┬ socket.io@0.8.7
│ │ │ │ ├── policyfile@0.0.4
│ │ │ │ └── redis@0.6.7
│ │ │ ├─┬ socket.io-client@0.8.7
│ │ │ │ ├── uglify-js@1.0.6
│ │ │ │ ├── websocket-client@1.0.0
│ │ │ │ └── xmlhttprequest@1.2.2
│ │ │ └── uglify-js@1.3.4
│ │ ├─┬ socket.io@0.9.11
│ │ │ ├── policyfile@0.0.4
│ │ │ └── redis@0.7.3
│ │ ├─┬ socket.io-client@0.9.11
│ │ │ ├─┬ active-x-obfuscator@0.0.1
│ │ │ │ └── zeparser@0.0.5
│ │ │ ├── uglify-js@1.2.5
│ │ │ ├─┬ ws@0.4.23
│ │ │ │ ├── commander@0.6.1
│ │ │ │ ├── options@0.0.3
│ │ │ │ └── tinycolor@0.0.1
│ │ │ └── xmlhttprequest@1.4.2
│ │ └── uglify-js@1.3.1
│ ├─┬ stylus@0.31.0
│ │ ├── cssom@0.2.5
│ │ └── debug@0.7.0
│ ├─┬ tracks@0.1.8
│ │ ├─┬ express@3.0.0beta3
│ │ │ ├── commander@0.6.1
│ │ │ ├─┬ connect@2.3.3
│ │ │ │ ├── bytes@0.0.1
│ │ │ │ ├── formidable@1.0.11
│ │ │ │ ├── mime@1.2.4
│ │ │ │ ├── qs@0.4.2
│ │ │ │ └── range-parser@0.0.1
│ │ │ ├── cookie@0.0.3
│ │ │ ├── crc@0.2.0
│ │ │ ├── debug@0.7.0
│ │ │ ├── fresh@0.0.1
│ │ │ └── mkdirp@0.3.2
│ │ └── qs@0.5.2
│ └─┬ up@0.2.2
│   ├── commander@0.6.1
│   ├── debug@0.1.0
│   ├─┬ distribute@0.1.4
│   │ └─┬ http-proxy@0.8.0
│   │   ├── colors@0.6.0-1
│   │   ├─┬ optimist@0.2.8
│   │   │ └── wordwrap@0.0.2
│   │   └── pkginfo@0.2.3
│   ├── eq@0.1.0
│   └── ms@0.1.0
├─┬ express@3.0.0beta4
│ ├── commander@0.6.1
│ ├─┬ connect@2.3.4
│ │ ├── bytes@0.0.1
│ │ ├── cookie@0.0.4
│ │ ├── formidable@1.0.11
│ │ ├── fresh@0.0.1
│ │ ├── mime@1.2.4
│ │ └── qs@0.4.2
│ ├── cookie@0.0.3
│ ├── crc@0.2.0
│ ├── debug@0.7.0
│ ├── fresh@0.1.0
│ ├── methods@0.0.1
│ ├── mkdirp@0.3.3
│ └── range-parser@0.0.4
├─┬ gzippo@0.2.0
│ └─┬ send@0.1.0
│   ├── debug@0.7.0
│   ├── fresh@0.1.0
│   ├── mime@1.2.6
│   └── range-parser@0.0.4
└─┬ racer-db-mongo@0.3.13
  └─┬ mongoskin@0.4.4
    └─┬ mongodb@1.1.11
      └── bson@0.1.5
@juzerali

Are you using derby@0.3.13 or are you using the latest one from github. Also provide same info about racer, and racer-db-mongo.

@ile

Hmm, in the package.json I have this:

{
  "name": "derbytest",
  "description": "",
  "version": "0.0.0",
  "main": "./server.js",
  "dependencies": {
    "derby": "*",
    "express": "3.0.0beta4",
    "racer-db-mongo": "0.3.13",
    "gzippo": ">=0.1.7"
  },
  "private": true,
  "devDependencies": {
    "coffee-script": ">=1.3.3"
  }
}

So I have installed everything through npm install/npm update.

Would that mean that I'm using derby@0.3.13? I think so yes.

Maybe I should try with the latest from github? Do I need to manually install it with git clone?

Thanks.

@ile

I just git cloned the latest derby, everything below that was installed through npm install.

The same error happened with the latest derby though. I still have to try with the latest racer too.

Update: tried with the latest racer, still getting the error.

@ile
ile commented

Got the error again, this time on different conditions. Only one query/subscribe.

The error happens when I just click a link to a different page/template.

I have the latest Derby git cloned. Now the line number is 401 - I suppose this is the same line as 394 earlier (which was 0.3.13, not I have the latest source code).

derby-exception.png

@nateps

Master of Derby is now the rewritten 0.6 and I am removing previous issues pretty aggressively so that I can be more responsive to new issues.

Please re-open if this issue is still relevant in Derby 0.6.

@nateps nateps closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.