Uncaught TypeError: Cannot read property 'nodeType' of null
It is thrown on mojito-client.client.js (line 96):
var newNode = Y.Node.create(viewData);
mp._element = document.getElementById(mp._viewId);
mp._node = new Y.Node(mp._element);
new Y.Node(mp._element) is throwing an error because mp._element is null. Digging more in the problem it seems to be related to the id replacement logic. Instance Id from meta and the current mojit have to match (mBinder.instanceId === clientMojit.proxy._instanceId) but that is not the case. Since no replacement is made, the code is looking for the old view id which doesn't exist anymore.
I wrote a very simple application to test the refresh view:
This application works on Mojito 0.4.9-2, but not on 0.5.0
@maumunoz thanks for the repro-case, I will look into it.
I can confirm that this issue is related to issue #843, and @drewfish is working on a fix for 0.5.1.
The instanceId sent to the /tunnel should be used as part of the binder map that is part of the response. The issue is introduced by the expandInstance routine, which is creating a new id everytime to avoid bleeding.
added test for problem found in issue #843
I can confirm that this issue was solved by PR #845