-
Notifications
You must be signed in to change notification settings - Fork 49
Cannot read property 'nodeType' of null #150
Comments
Are you using IO.JS to run Zombie? The Zombie 4.x+ require IO.JS to work and would crash with strange errors when executed on NodeJS. If you're running IO.JS, then please post:
Also try using Zombie 3 and report if that works in there. |
I'm using the current stable Node.js, v4.2.4. The HTML is the same as https://test.iconneqt.nl/admin/index.php, except on localhost Will try to post a PHP example when I can get to the code (it's part of a much larger testing framework, so it might take a while to extract it). There is nothing much going on though; just loading an URI, getting the page, a few |
On the Node 5.4.1 and Zombie 4.2.1 the following snippet works fine for me: $session = $this->getSession();
$session->visit('https://test.iconneqt.nl/admin/index.php');
$page = $session->getPage();
echo $page->getHtml(); Due the nature of implementation of
This won't find any elements, because |
@vanderlee , any update? |
|
Same problem hier. |
please provide a reproducing case (best way is to build it as a testcase in the driver testsuite, but this is not required as long as the reproducing case is self-contained to allow us to include it in the testsuite) |
I got the same problem when the base_url was http://localhost and no web server was running on localhost. It seems that when you get an empty response, this error is triggered when you try to do $page->getHtml(); It took me forever to find out what was wrong, because this bug masked what was my real issue. |
Hello @stof, the application is running in a docker container that is behind a nginx proxy that is also another docker container. There is some problems to use zombie in this environment, but I can not see the problem I am still studying how to setup the our features tests correctly. If I continue with problems, I will post the details here or in a new issue. Thank you! |
And the error happens in The while loop below it never gets executed, that is a red herring. |
For me, the problem also occurred using the method @TerjeBr, did you check if the page was correctly loaded? I use the step |
No, my page was not loaded at all, because the local web-server was not running. But I could not see that because it was masked by this error. |
I get the following error using the Zombie driver:
Using Zombie 4.2.1 and Mink 1.7.0 with zombie-driver 1.3.0.
I also tried Zombie 4.0.13 to check if this was a regression, but both versiions give the same error.
The weird thing is, it only happens for a specific .find() statement:
These works fine:
These fail:
These all worked just fine using the Goutte driver.
I tried changing the javascript a bit to find the problem, but I can't find it.
If I change the line
stream.end(JSON.stringify(refs));
tostream.end(JSON.stringify([]));
orstream.end('[]');
, I no longer get this error. I get an error that there are no matches, but that's to be expected. Seems like the problem is instream.end()
.The text was updated successfully, but these errors were encountered: