Skip to content

Uncaught TypeError: Cannot call method 'toString' of null #2019

Closed
KasperTidemann opened this Issue Feb 8, 2013 · 1 comment

2 participants

@KasperTidemann

Explanation:

16 hours ago, master worked fine. Now, I'm seeing the following error:

Uncaught TypeError: Cannot call method 'toString' of null

This results in:

Uncaught Error: Something you did caused a view to re-render after it rendered but before it was inserted into the DOM.

... and at least one:

Uncaught Error: assertion failed: Emptying a view in the inBuffer state is not allowed and should not happen under normal circumstances. Most likely there is a bug in your application. This may be due to excessive property change notifications..

Bisecting:

Bisecting from the last commit I know worked (98e0cf5), it turns out the commit by @wagenet, Better handling of DOM properties (079630b) causes this issue.

Stack trace:

Here is the stack trace from Chrome:

Uncaught TypeError: Cannot call method 'toString' of null (ember.js:13184)
Ember._RenderBuffer._escapeAttribute (ember.js:13184)
Ember._RenderBuffer.pushOpeningTag (ember.js:13058
Ember.View.Ember.CoreView.extend.beforeRender (ember.js:15182)
Ember.CoreView.Ember.Object.extend._renderToBuffer (ember.js:13621)
Ember.View.Ember.CoreView.extend._renderToBuffer (ember.js:15170)
superWrapper (ember.js:884)
(anonymous function) (ember.js:13601)
Ember.Instrumentation.instrument (ember.js:1194)
Ember.CoreView.Ember.Object.extend.renderToBuffer (ember.js:13600)
Ember.merge.appendChild (ember.js:15962)
Ember.View.Ember.CoreView.extend.appendChild (ember.js:15373)
EmberHandlebars.ViewHelper.Ember.Object.create.helper (ember.js:19303)
get (ember.js:19482)
anonymous (app.js:2050)
(anonymous function) (handlebars.js:1977)
Ember.View.Ember.CoreView.extend.render (ember.js:14615)
Ember.CoreView.Ember.Object.extend._renderToBuffer (ember.js:13622)
Ember.View.Ember.CoreView.extend._renderToBuffer (ember.js:15170)
superWrapper (ember.js:884)
(anonymous function) (ember.js:13601)
Ember.Instrumentation.instrument (ember.js:1194)
Ember.CoreView.Ember.Object.extend.renderToBuffer (ember.js:13600)
(anonymous function) (ember.js:16427)
Ember.View.Ember.CoreView.extend.forEachChildView (ember.js:14854)
Ember.ContainerView.Ember.View.extend.render (ember.js:16426)
superWrapper (ember.js:884)
Ember.CoreView.Ember.Object.extend._renderToBuffer (ember.js:13622)
Ember.View.Ember.CoreView.extend._renderToBuffer (ember.js:15170)
superWrapper (ember.js:884)
(anonymous function) (ember.js:13601)
Ember.Instrumentation.instrument (ember.js:1194)
Ember.CoreView.Ember.Object.extend.renderToBuffer (ember.js:13600)
Ember.merge.appendChild (ember.js:15962)
Ember.View.Ember.CoreView.extend.appendChild (ember.js:15373)
EmberHandlebars.ViewHelper.Ember.Object.create.helper (ember.js:19303)
get (ember.js:19482)
(anonymous function) (ember.js:23624)
EmberHandlebars.registerHelper.context (ember.js:18663)
anonymous (app.js:1228)
(anonymous function) (handlebars.js:1977)
Ember.View.Ember.CoreView.extend.render (ember.js:14615)
Ember.CoreView.Ember.Object.extend._renderToBuffer (ember.js:13622)
Ember.View.Ember.CoreView.extend._renderToBuffer (ember.js:15170)
superWrapper (ember.js:884)
(anonymous function) (ember.js:13601)
Ember.Instrumentation.instrument (ember.js:1194)
Ember.CoreView.Ember.Object.extend.renderToBuffer (ember.js:13600)
(anonymous function) (ember.js:16427)
Ember.View.Ember.CoreView.extend.forEachChildView (ember.js:14854)
Ember.ContainerView.Ember.View.extend.render (ember.js:16426)
superWrapper (ember.js:884)
Ember.CoreView.Ember.Object.extend._renderToBuffer (ember.js:13622)
Ember.View.Ember.CoreView.extend._renderToBuffer (ember.js:15170)
superWrapper (ember.js:884)
(anonymous function) (ember.js:13601)
Ember.Instrumentation.instrument (ember.js:1194)
Ember.CoreView.Ember.Object.extend.renderToBuffer (ember.js:13600)
Ember.merge.appendChild (ember.js:15962)
Ember.View.Ember.CoreView.extend.appendChild (ember.js:15373)
EmberHandlebars.ViewHelper.Ember.Object.create.helper (ember.js:19303)
get (ember.js:19482)
(anonymous function) (ember.js:23624)
EmberHandlebars.registerHelper.context (ember.js:18663)
anonymous (app.js:443)
(anonymous function) (handlebars.js:1977)
Ember.View.Ember.CoreView.extend.render (ember.js:14615)
Ember.CoreView.Ember.Object.extend._renderToBuffer (ember.js:13622)
Ember.View.Ember.CoreView.extend._renderToBuffer (ember.js:15170)
superWrapper (ember.js:884)
(anonymous function) (ember.js:13601)
Ember.Instrumentation.instrument (ember.js:1194)
Ember.CoreView.Ember.Object.extend.renderToBuffer (ember.js:13600)
(anonymous function) (ember.js:16427)
Ember.View.Ember.CoreView.extend.forEachChildView (ember.js:14854)
Ember.ContainerView.Ember.View.extend.render (ember.js:16426)
superWrapper (ember.js:884)
Ember.CoreView.Ember.Object.extend._renderToBuffer (ember.js:13622)
Ember.View.Ember.CoreView.extend._renderToBuffer (ember.js:15170)
superWrapper (ember.js:884)
(anonymous function) (ember.js:13601)
Ember.Instrumentation.instrument (ember.js:1194)
Ember.CoreView.Ember.Object.extend.renderToBuffer (ember.js:13600)
Ember.merge.appendChild (ember.js:15962)
Ember.View.Ember.CoreView.extend.appendChild (ember.js:15373)
EmberHandlebars.ViewHelper.Ember.Object.create.helper (ember.js:19303)
get (ember.js:19482)
(anonymous function) (ember.js:23624)
EmberHandlebars.registerHelper.context (ember.js:18663)
anonymous app.js:12)
(anonymous function) handlebars.js:1977)
Ember.View.Ember.CoreView.extend.render (ember.js:14615)
Ember.CoreView.Ember.Object.extend._renderToBuffer (ember.js:13622)
Ember.View.Ember.CoreView.extend._renderToBuffer (ember.js:15170)
superWrapper (ember.js:884)
(anonymous function) (ember.js:13601)
Ember.Instrumentation.instrument (ember.js:1194)
Ember.CoreView.Ember.Object.extend.renderToBuffer (ember.js:13600)
Ember.View.Ember.CoreView.extend.createElement (ember.js:15012)
Ember.merge.insertElement (ember.js:15901)
Ember.View.Ember.CoreView.extend._insertElement (ember.js:14944)
(anonymous function) (ember.js:4064)
Ember.handleErrors (ember.js:401)
invoke (ember.js:4062)
invokeOnceTimer (ember.js:4507)
(anonymous function) (ember.js:4064)
Ember.handleErrors (ember.js:401)
invoke (ember.js:4062)
iter (ember.js:4134)
RunLoop.flush (ember.js:4188)
RunLoop.end (ember.js:4093)
tryable (ember.js:4297)
Ember.tryFinally (ember.js:1039)
Ember.run.end (ember.js:4300)
Ember.tryFinally (ember.js:1041)
Ember.run (ember.js:4256)
(anonymous function) (ember-data.js:24)
sendEvent (ember.js:3971)
Ember.Evented.Ember.Mixin.create.trigger (ember.js:9810)
DS.Model.Ember.Object.extend.trigger (ember-data.js:3825)
superWrapper (ember.js:884)
(anonymous function) (ember-data.js:3272)
(anonymous function) (ember.js:4064)
Ember.handleErrors (ember.js:401)
invoke (ember.js:4062)
invokeOnceTimer (ember.js:4507)
(anonymous function) (ember.js:4064)
Ember.handleErrors (ember.js:401)
invoke (ember.js:4062)
iter (ember.js:4134)
RunLoop.flush (ember.js:4188)
RunLoop.end (ember.js:4093)
tryable (ember.js:4297)
Ember.tryFinally (ember.js:1039)
Ember.run.end (ember.js:4300)
Ember.tryFinally (ember.js:1041)
Ember.run (ember.js:4256)
ajax.success (ember-data.js:7662)
(anonymous function) (app.js:2274)
c.emit (socket.io.js:2)
c.onPacket (socket.io.js:2)
d.onPacket (socket.io.js:2)
c.onPacket (socket.io.js:2)
c.onData (socket.io.js:2)
websocket.onmessage

Questions:

@wagenet, before I delve deep into the above stack trace, does it ring a bell in terms of your refactorizations in 079630b?

@wagenet wagenet closed this in 50a765a Feb 8, 2013
@KasperTidemann

Sweet, thanks Peter.

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.