-
Notifications
You must be signed in to change notification settings - Fork 364
[1.4.2.1-rc.0] meteor todos client tests fail with select: Invalid argument #198
Comments
I can't seem to re-create this issue with Meteor 1.4.2.3 (OSX 10.11.5). Issue meteor/meteor#8016 had a fair number of up votes though, so if anyone is able to reproduce this issue with the current version of |
Strangely, replacing the factory package caused this exact issue! 😕 |
Interesting - I'll take a look - thanks! |
The bug is still exists. Todo app and my app all have the same issue when running OSX 10.12.1 |
I've looked into this a bit further. This doesn't appear to be a
I'll look into this more shortly. |
+1 |
I've been debugging this all day, and am of the opinion that the number of packages in the We have a test harness for running QA scripts across the Clinical Meteor distro, and the way the harness and packages are configured, we have about 40 small packages, each with a different SimpleSchema in it. Anyhow, I can reliably reproduce the error with different combinations of packages, which are all effectively exactly the same. It happens consistently when I add the 47th package. I was thinking "that's totally random, and couldn't be related to the Todos example'. But then I looked, and Todos actually has 49 packages. Probably one or two of them somehow aren't getting loaded during the Anyhow, some sort of buffer overflow. Could be amount of memory the packages are using; number of files on disk; time it takes to load them, etc. But PhantomJS doesn't like it when there are too many packages, and burps this |
For me replacing |
Unfortunately, it |
Try with dispatch:[email protected], which uses latest phantomjs. Seems to have fixed this for me in another app, but it's possible that something else I did fixed it. |
Thanks @aldeed - updating to @awatson1978 - I definitely think you're on to something! I looked into why For those who want a really quick workaround (hack), run your tests as (from your app root):
Needless to say this is quite slow (since we're killing the plugin cache), but it works until we can get a better fix in place. |
Clearing cache didn't work for me unfortunately. |
I have the same issue, also the cache is always cleared when we run it fresh on a test docker. |
@iMagdy @timbrandin Sorry to hear that! We definitely still need to find the source of the memory leak. I'll try to look into this more today. Thanks! |
For me it's not a huge ordeal, we just started adding tests and we're not depending on them yet. But thx for looking into it so soon. |
Shouldn't this be solved in: DispatchMe/meteor-mocha-phantomjs#33 ? |
Quite possibly, but I haven't pinpointed the source of the problem yet. I know phantomjs is running out of memory, but I haven't been able to track down what's causing that to happen. It's quite possible some combination of things that the todos app exposes is causing that leak, so it's difficult to move this issue over to the https://github.com/DispatchMe/meteor-mocha-phantomjs repo until we know more. |
Hi all - I recently discussed this issue with @abernix and be brought up some good points about the stability of In the meantime, I'll package up a forked version of dispatch:mocha-phantomjs that people can drop in to verify that this does indeed fix the issue. Once verified, we can put some more through into how to address this moving forward. Thanks! |
I don't recall if the issue I was running into was the same or not, but I spent a lot of time debugging it. My comment on the (private) commit was:
As you can see by my misspelling of "evaluate", I didn't have much time but had got so far as to thinking it was a problem with Qt, a PhantomJS dependency. Ultimately, I moved to 1.9.x as well and have been there ever since. |
I tested downgrading The result (on OSX) was that client tests reported running without any output, and an 'undefined' number of errors. I added some extra logging around the call to phantomjs and found that the 1.9.19 phantomjs crashes with a SIGSEV fault. I tested directly calling phantomjs and sure enough: This is a known issue documented here: ariya/phantomjs#14558 Any other ideas on how to resolve this? |
Ouch - I just updated to macOS Sierra and now it's failing for me as well. Using phantomjs 1.9.19 worked for me on El Capitan, but it now looks like this is another dead end. Back to the drawing board ... |
|
See fix: meteor/meteor#8225. |
Woohoo - awesome news @keyscores! Thanks for testing it out and posting back here! |
Sadly updating to dispatch:mocha-phantomjs@=0.1.9 causes the error to return on my machine. Though 0.1.7 works on my local. @hwillson can you confirm? |
@keyscores Since |
@benjamn Yep I'm pretty sure I'm at the right version. Here are my steps:
|
The only real difference is the bump from using |
@aldeed I've run through the steps above again. It's very consistent. I'm not exactly sure what is being lost from upgrading from dispatch:mocha-phantomjs 0.1.7 to 0.1.9 . Have you been able to reproduce? |
@benjamn have you been able to reproduce my steps above? |
I bumped into this "select: Invalid argument" error as well for a different usecase (PDF rendering). But the solution I found might be interesting. The problem occurred for me when there were images loaded from the same server (src="Meteor.absoluteUrl()/....). Earlier I didn't have problems with that case, but with latest Meteor update this broke the PDF rendering. I could solve it by making the path to the image relative and by setting up a base path for these files in the phantom.js settings. I have no idea if this finding is relevant for the tests issue, maybe it helps to point you in the right direction? |
Issue consistently persists for me in:
> git clone [email protected]:meteor/todos.git
> meteor update --release 1.4.3.2
> meteor npm install
> meteor list | grep phantom
dispatch:mocha-phantomjs 0.1.7
> meteor test --full-app --once --driver-package dispatch:mocha-phantomjs
PASS
> meteor test --full-app --once --driver-package dispatch:mocha-phantomjs
FAIL (and fails subsequent times)
> rm -Rf .meteor/local/plugin-cache
> meteor test --full-app --once --driver-package dispatch:mocha-phantomjs
PASS (and fails subsequent times) Same behavior after |
We need to update todos app to use the latest dispatch:mocha instead of dispatch:mocha-phantomjs, and use one of the other supported browsers instead of phantomjs. Edit: Scratch that, just noticed the commit from @lorensr. Cool! |
I made similar changes to my app, and testing seems to work fine now. I'd say this is closed. |
For our test environment, Nightmare works well for the developers who are running MacOS. However, we run into problems when using Nightmare with our Linux-based Dev and CI servers, in which case we need to run Phantom in order to have our tests pass. This creates an inconsistent testing environment between Dev and CI. For now, we are using such a workaround, but I would not consider this issue closed. |
Meteor 1.4.3.2; switch from phantom to nightmare; fixes #198
Merging #222 auto-closed this issue, but #198 (comment) still needs to be investigated. |
Migrating this over from meteor/meteor#8016.
(originally reported by @hexsprite)
Noticed this in my project and was able to reproduce using the
meteor-todos
project.Just upgrade to rc.0 and you'll see that when running
npm test
the client tests fail. In fact, it seems the process exits unceremoniously somehow since the output is cut off.The text was updated successfully, but these errors were encountered: