Phantom stderr #139

Closed
RobertTheGrey opened this Issue Jun 1, 2015 · 9 comments

Comments

Projects
None yet
3 participants
@RobertTheGrey

Hi there, getting a phantom error when running the sample solution tests for the first time following the blog tutorial in Visual Studio. The error I'm getting in the output window is:

phantom stderr: 'C:\Users\Rob' is not recognized as an internal or external command, operable program or batch file.

It just so happens that my user folder is actually C:\Users\Rob G\ which has a space in it and I'm assuming wallaby is struggling to run the node files it needs - in this case Phantom.

@jagreehal

This comment has been minimized.

Show comment
Hide comment
@RobertTheGrey

This comment has been minimized.

Show comment
Hide comment
@RobertTheGrey

RobertTheGrey Jun 1, 2015

Thanks @jagreehal that does in fact represent the issue. I downloaded phantom and changed the wallaby-jasmine json file as follows and it works perfectly:

{
    "files": [
        "style/calculator.css",
        { "pattern": "lib/jquery.js", "instrument": false },
        "src/*.js",
        "test/helper/template.js"
    ],
    "tests": [
        "test/*JasmineSpec.js"
    ],
    "env": {
        "runner": "C:\\Dev\\Tools\\phantomjs-1.9.8-windows\\phantomjs.exe"
    },
    "testFramework": "jasmine@2.1.3"
}

You might want to include that in the docs @ArtemGovorov - I think there will be a lot of Visual Studio users with spaces in their user profile names.

Thanks @jagreehal that does in fact represent the issue. I downloaded phantom and changed the wallaby-jasmine json file as follows and it works perfectly:

{
    "files": [
        "style/calculator.css",
        { "pattern": "lib/jquery.js", "instrument": false },
        "src/*.js",
        "test/helper/template.js"
    ],
    "tests": [
        "test/*JasmineSpec.js"
    ],
    "env": {
        "runner": "C:\\Dev\\Tools\\phantomjs-1.9.8-windows\\phantomjs.exe"
    },
    "testFramework": "jasmine@2.1.3"
}

You might want to include that in the docs @ArtemGovorov - I think there will be a lot of Visual Studio users with spaces in their user profile names.

@ArtemGovorov

This comment has been minimized.

Show comment
Hide comment
@ArtemGovorov

ArtemGovorov Jun 2, 2015

Member

@jagreehal Thanks!
@RobertTheGrey It doesn't happen to everyone with spaces in their user profiles (works fine for me even though I have spaces too), not sure yet what else affects it. But as you've said, it should be included in the docs anyway. I have added the note to the troubleshooting section.

Member

ArtemGovorov commented Jun 2, 2015

@jagreehal Thanks!
@RobertTheGrey It doesn't happen to everyone with spaces in their user profiles (works fine for me even though I have spaces too), not sure yet what else affects it. But as you've said, it should be included in the docs anyway. I have added the note to the troubleshooting section.

@RobertTheGrey

This comment has been minimized.

Show comment
Hide comment
@RobertTheGrey

RobertTheGrey Jun 2, 2015

Awesome. In that case maybe it's to do with the deafult path people store their global npm packages to? If phantom does not handle spaces in paths, then where is phantom located on your disk if you have spaces in your username? Would be interesting to get to the bottom of it.

Awesome. In that case maybe it's to do with the deafult path people store their global npm packages to? If phantom does not handle spaces in paths, then where is phantom located on your disk if you have spaces in your username? Would be interesting to get to the bottom of it.

@ArtemGovorov

This comment has been minimized.

Show comment
Hide comment
@ArtemGovorov

ArtemGovorov Jun 2, 2015

Member

Global npm packages shouldn't affect it because wallaby.js is using its own version of phantomjs, that is stored in IDE cache. It looks like phantomjs has issues with spaces in paths only in some cases, not always. Could be something else in the system/configuration that affects it. I have seen the issue in other projects from SO Q&A, but I haven't found any explanation for it yet (except the workaround to avoid using spaces).

Member

ArtemGovorov commented Jun 2, 2015

Global npm packages shouldn't affect it because wallaby.js is using its own version of phantomjs, that is stored in IDE cache. It looks like phantomjs has issues with spaces in paths only in some cases, not always. Could be something else in the system/configuration that affects it. I have seen the issue in other projects from SO Q&A, but I haven't found any explanation for it yet (except the workaround to avoid using spaces).

@RobertTheGrey

This comment has been minimized.

Show comment
Hide comment
@RobertTheGrey

RobertTheGrey Jun 2, 2015

Ok cool - I'll update if I find any more info - for now the workaround is fine for me. Having lots of fun using wallaby - great job! 👍

Ok cool - I'll update if I find any more info - for now the workaround is fine for me. Having lots of fun using wallaby - great job! 👍

@ArtemGovorov

This comment has been minimized.

Show comment
Hide comment
@ArtemGovorov

ArtemGovorov Jun 2, 2015

Member

@RobertTheGrey Thanks! I'll also keep investigating the issue.

Member

ArtemGovorov commented Jun 2, 2015

@RobertTheGrey Thanks! I'll also keep investigating the issue.

@ArtemGovorov

This comment has been minimized.

Show comment
Hide comment
@ArtemGovorov

ArtemGovorov Jun 2, 2015

Member

@RobertTheGrey @jagreehal BTW, as long as you guys are specifying the phantomjs path anyway, you may want to try our latest feature - PhantomsJs 2 support, it may make your tests to run faster.

Member

ArtemGovorov commented Jun 2, 2015

@RobertTheGrey @jagreehal BTW, as long as you guys are specifying the phantomjs path anyway, you may want to try our latest feature - PhantomsJs 2 support, it may make your tests to run faster.

@RobertTheGrey

This comment has been minimized.

Show comment
Hide comment
@RobertTheGrey

RobertTheGrey Jun 2, 2015

Thanks @ArtemGovorov - will give it a spin

Thanks @ArtemGovorov - will give it a spin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment