facebook

Terminal+ fails with exit code 1

  1. CodeMix & Angular IDE
  2.  > 
  3. Getting Help
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #611764 Reply

    scottsm
    Participant

    When trying to open terminal+ in new or existing project a message is displayed in an overlay:
    The terminal process terminated with exit code: 1

    The terminal+ tab is labeled [sh]

    Inside the terminal is the following:
    Directory \drivers\etc does not exist; exiting
    If directory name is garbage you need to update you msys package

    Screenshot attached

    This is in a fresh install of eclipse on Windows 10:
    Version: 2019-03 (4.11.0)
    Build id: 20190314-1200

    Fresh install of AngularIDE:
    version 3.0.0.2019-2142200

    I’ve uninstalled git bash and resinstalled. Version from running git-bash outside eclipse:
    $ git –version
    git version 2.21.0.windows.1

    I also removed the cached git-bash from c:\Users\shanescott\.codemix-store\ and restarted eclipse.

    Still receiving error above.

    I’ve searched quite a bit for a solution. Apologies if I’ve missed something obvious.

    Attachments:
    You must be logged in to view attached files.
    #611766 Reply

    scottsm
    Participant

    .log

    Attachments:
    You must be logged in to view attached files.
    #611771 Reply

    Brian Fernandes
    Moderator

    Shane,
    1)

    I’ve uninstalled git bash and resinstalled. Version from running git-bash outside eclipse:
    $ git –version
    git version 2.21.0.windows.1

    This is the version of Git, not Git bash. There’s usually a shortcut created for Git Bash somewhere, can you run that externally, and does it give you a working shell?
    2) Is this a new problem (if yes, has anything changed), or have you never managed to get the Terminal+ to work on your system? Has it worked, or does it continue to work in other installations of Eclipse + CodeMix, if you have these?
    3) I would shut down CodeMix, and uninstall your system copy of Git Bash. Now start CodeMix and open Terminal+, this should ensure that the version from “codemix-store” will be used, it will be re-downloaded if necessary. If the problem still occurs, at least we know we’re dealing with the same version of bash.
    4) This appears to be a core problem with Git bash on your system, and it’s a bit hard to find information on this error. On a hunch, does the path c:\windows\system32\drivers\etc exist on your machine?

    #611795 Reply

    scottsm
    Participant

    Brian,
    Thank you for your reply …

    1a. git 2.21.0 was installed on Windows. It comes with git-bash on Windows. The version of git-bash that was running is the version of git-bash that comes with git version 2.21.0.windows.1 on 64-bit Windows.

    1b. git-bash did run external to eclipse. The git version info above came from said functioning git-bash shell. It was removed in item 3 below.

    2. Terminal+ has never worked on this workstation. Works on other workstations. This workstation is issued by one of my clients. As they DON’T support BYOD, we’re stuck with this workstation.

    3. Closed eclipse. Removed git using Programs and Features in Control Panel. Cleared .codemix-store folder to remove cached git-bash, nodejs, and npm. Launched eclipse. Opened a new terminal+. Waited for downloads. Same result.
    Screenshot attached of the first attempt to open new terminal+ after downloading new git-bash. There are two lines of output preceding the two lines that show on all subsequent attempts. These messages have shown every time git-bash was removed from .codemix-store. Apologies for not mentioning in my original post.

    4. Yes, c:\windows\system32\drivers\etc is present on this workstation.

    Attachments:
    You must be logged in to view attached files.
    #611801 Reply

    Brian Fernandes
    Moderator

    Apologies, I missed the fact that you were running the version command in a git-bash console already, and thank you for providing the additional context, definitely helps.

    1) Can you please send us your error log? You can find it at [workspace_location]/.metadata/.log.
    2) If you go to c:\Users\shanescott\.codemix-store\git-bash and double click git-bash.exe does that bring up a working console?
    3) Wondering if this is a permission issue. If you can, does running the Eclipse instance as administrator help?

    Thanks!

    #611802 Reply

    scottsm
    Participant

    git-bash.exe in codemix-store\git-bash runs external to eclipse. After executing that shell, terminal+ now starts in eclipse.

    Running npm -v in terminal+, or git-bash external to eclipse results in the following:

    $ npm -v
    internal/modules/cjs/loader.js:584
        throw err;
        ^
    
    Error: Cannot find module 'C:\bin\npm-cli.js'
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
        at Function.Module._load (internal/modules/cjs/loader.js:508:25)
        at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
        at startup (internal/bootstrap/node.js:283:19)
        at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
    #611804 Reply

    Brian Fernandes
    Moderator

    Okay, making some progress.

    1) When you start Terminal+ within Eclipse, we should be setting up to use the downloaded version of Node and NPM, but unsure what your project settings are (could be set to use system versions). Does it happen for a new dummy project as well? Does your .codemix-store folder contain nodejs and npm folders now too (since you deleted them)

    2) Could you examine your PATH outside of Eclipse (just type PATH) on the command line, and inside the Terminal+ (echo $PATH) – does the PATH output have a weird location for Node? I wonder if you could be experiencing the problem described here: https://stackoverflow.com/questions/24721903/npm-cli-js-not-found-when-running-npm

    #611899 Reply

    scottsm
    Participant

    Removed nodejs and npm from control panel. Still no system install of git or git-bash.
    PATH environment variable didn’t look problematic. I simplified PATH to:
    PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Users\shanescott\AppData\Local\Microsoft\WindowsApps;

    Cleared .codemix-store cache (deleted git-bash, nodejs, npm).
    Created new workspace.
    Created new project CodeMix-> Angular Project; terminal+ tab opens, but fails with error in launch1.png from previous post

    Executed git-bash.exe from .codemix-store/git-bash external to eclipse. Successfully runs external to eclipse.
    Created new project CodeMix-> Angular Project; terminal+ tab opens, but fails with the following error:

    > Executing task in folder C:\apps\workspace\bob: 'npm' 'install' '@angular/cli@6.2.
    2' <
    
    Node.js version:    v10.10.0
    internal/modules/cjs/loader.js:583
        throw err;
        ^
    
    Error: Cannot find module 'C:\bin\npm-cli.js'
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
        at Function.Module._load (internal/modules/cjs/loader.js:507:25)
        at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
        at startup (internal/bootstrap/node.js:279:19)
        at bootstrapNodeJSCore (internal/bootstrap/node.js:696:3)
    NPM version:
    internal/modules/cjs/loader.js:583
        throw err;
        ^
    
    Error: Cannot find module 'C:\bin\npm-cli.js'
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
        at Function.Module._load (internal/modules/cjs/loader.js:507:25)
        at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
        at startup (internal/bootstrap/node.js:279:19)
        at bootstrapNodeJSCore (internal/bootstrap/node.js:696:3)
    The terminal process terminated with exit code: 1

    git-bash, nodejs, and npm are downloaded and cached to .codemix-store whenever terminal+ is run after clearing cache.

    Each time the git-bash folder from .codemix-store is removed then downloaded by opening a new terminal+, It fails to run with errors shown in launch1.png in previous post.

    git-bash.exe from the .codemix-store/git-bash executes successfully external to eclipse. After running git-bash external to eclipse, trying to do anything with npm in terminal+ results in the npm-cli.js error. This includes creating new project.

    Something as simple as running npm -v in terminal+ causes the npm-cli.js error.

    #611900 Reply

    scottsm
    Participant

    Running eclipse as Administrator didn’t change any outcomes. Cleared .codemix-store cache. Ran eclipse as Administrator. Creating new project failed same as above. Ran git-bash from .codemix-store. New project (still as Administrator). Same errors.

    #611907 Reply

    Brian Fernandes
    Moderator

    Shane,

    Would it be possible for you to work with us on a LiveChat session? Help > CodeMix > Live Chat would allow us to run some diagnostics against your installation, and should result in a faster turn-around and analysis than what we can do through forums.

    #612022 Reply

    scottsm
    Participant

    Big thumbs up to Genuitec Support! After significant troubleshooting with them, they found an issue with Comodo Virus Scan.

    I tweaked Comodo settings, and everything started working.

    In Comodo Settings -> Advanced Protection -> Miscellaneous
    Click these applications link in Don’t detect shellcode injections in these applications
    Add an exclusion that you are comfortable with. I added everything in the codemix-store cache … c:\Users\shanescott\.codemix-store\*
    Verify the Don’t detect shellcode injections in these applications is checked.

    terminal+ worked after that.

    Again, thanks to Genuitec for providing GREAT support! Especially, on an issue that that turned out to be my clients crappy security software!

    #612046 Reply

    Brian Fernandes
    Moderator

    Shane,

    That was a real doozy! We appreciate the time you took to track it down with us, through the forum and live chat, and thank you for providing the steps here.

    Now we know how “nosey” A/V software can be (more than the normal expected interference), and we will keep this in mind when dealing with similar issues from other users – certainly helps us a great deal too!

    Thanks!

Viewing 12 posts - 1 through 12 (of 12 total)
Reply To: Terminal+ fails with exit code 1

You must be logged in to post in the forum log in