{"action":"created","issue":{"url":"https://api.github.com/repos/emberjs/ember.js/issues/10717","labels_url":"https://api.github.com/repos/emberjs/ember.js/issues/10717/labels{/name}","comments_url":"https://api.github.com/repos/emberjs/ember.js/issues/10717/comments","events_url":"https://api.github.com/repos/emberjs/ember.js/issues/10717/events","html_url":"https://github.com/emberjs/ember.js/issues/10717","id":64080016,"number":10717,"title":"TypeError: node is undefined in ChainNodePrototype.unchain","user":{"login":"rvan1","id":7503712,"avatar_url":"https://avatars.githubusercontent.com/u/7503712?v=3","gravatar_id":"","url":"https://api.github.com/users/rvan1","html_url":"https://github.com/rvan1","followers_url":"https://api.github.com/users/rvan1/followers","following_url":"https://api.github.com/users/rvan1/following{/other_user}","gists_url":"https://api.github.com/users/rvan1/gists{/gist_id}","starred_url":"https://api.github.com/users/rvan1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvan1/subscriptions","organizations_url":"https://api.github.com/users/rvan1/orgs","repos_url":"https://api.github.com/users/rvan1/repos","events_url":"https://api.github.com/users/rvan1/events{/privacy}","received_events_url":"https://api.github.com/users/rvan1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-24T19:25:24Z","updated_at":"2015-03-30T15:24:24Z","closed_at":null,"body":"After transitioning through a few views, then submitting a form with an action helper, targeted at the view, I click a Back button using a link-to helper. The console indicates 'transitioned into' and 'transition complete', but the then there's a 'node is undefined' error and the View fails to load. This happens in ChainNodePrototype.unchain() which apparently unbinds and destroys event attachments to minimize memory leaks. I inspected the 'chainNode' objects and don't really see what's wrong with them. I wrapped the process inside with 'if (typeof node != 'undefined')' so my app would stop throwing TypeError when I navigate back."},"comment":{"url":"https://api.github.com/repos/emberjs/ember.js/issues/comments/87721884","html_url":"https://github.com/emberjs/ember.js/issues/10717#issuecomment-87721884","issue_url":"https://api.github.com/repos/emberjs/ember.js/issues/10717","id":87721884,"user":{"login":"rvan1","id":7503712,"avatar_url":"https://avatars.githubusercontent.com/u/7503712?v=3","gravatar_id":"","url":"https://api.github.com/users/rvan1","html_url":"https://github.com/rvan1","followers_url":"https://api.github.com/users/rvan1/followers","following_url":"https://api.github.com/users/rvan1/following{/other_user}","gists_url":"https://api.github.com/users/rvan1/gists{/gist_id}","starred_url":"https://api.github.com/users/rvan1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvan1/subscriptions","organizations_url":"https://api.github.com/users/rvan1/orgs","repos_url":"https://api.github.com/users/rvan1/repos","events_url":"https://api.github.com/users/rvan1/events{/privacy}","received_events_url":"https://api.github.com/users/rvan1/received_events","type":"User","site_admin":false},"created_at":"2015-03-30T15:24:24Z","updated_at":"2015-03-30T15:24:24Z","body":"ChainNodePrototype.unchain seems to get called all the time during every transition. The method gets 'node' by chain key then tries to unchain or destroy. The chain key can be a reference to all sorts of properties native to ember as well as properties from the projects implementation code.\r\n\r\nThe project is a non-CLI app using grunt and api-stub, but upgraded to Ember 1.10 & HTMLBars. It's used to book hotel reservations. The issue occurs after filling out guest info, transitioning to a 'confirmation' screen and going back from there. If I refresh, then go back, it works OK. \r\n\r\nI took a closer look at the problem and the key with the undefined node is always 'HotelReservations'.  It seems that 'HotelReservations' is not normally a property needing to be processed this way as I don't see it in the console when transitioning around. Somehow it winds up in scope of this when going back from confirmation so causes problems. It's actually a JSON object provided by api-stub 'routes.js' and used to test reservation Views, so don't know why it winds up in the unchain process.\r\n\r\nThe 'chains' object in this case is of type 'content=ChainNode', not 'model=ChainNode', if that matters. It's difficult to see the pattern in this processing of nodes by chain key, chains and parent chainNodes. It seems a little like LinkedNode where every node has some reference the the nodes before and after. It seems like the the way it gets node by chain key might recursively go through all the child nodes until it finds it, and in the case of 'HotelReservations', it doesn't."}}