Hyper: Hyper window freezes when I try to close it

Created on 16 Jun 2019  ·  65Comments  ·  Source: vercel/hyper

  • [x] I am on the latest Hyper.app version
  • [x] I have searched the issues of this repo and believe that this is not a duplicate
  • OS version and name: Version 1903 Windows Pro Insider Preview
  • Hyper.app version: 3.0.2

Issue


I am using hyper with a cmd shell, I also have wsl and oh my zsh set up.
when I run wsl command in my hyper terminal, wsl and ohmyzsh works just fine, but whenever I try to exit the window, it freezes and it stays like that until I kill the process through the Task Manager

Most helpful comment

3763 solve my problem.We can use config like

shell: 'wsl.exe',
shellArgs: [],

All 65 comments

I can +1 this, also happens when trying to do a full reload.

OS version and name: Microsoft Windows 10 Education Version 10.0.18362 Build 18362
Hyper.app version: 3.0.2

me too, wsl always crash when I exit by hyper.
But it safe when I use exit command.

  • [x] I am on the latest Hyper.app version
  • [x] I have searched the issues of this repo and believe that this is not a duplicate
  • OS version and name: Windows 10 [1903]
  • Hyper.app version: 3.0.2 (stable)
  • The issue is reproducible in vanilla Hyper.app: yes

Issue

This (be patient and wait a few seconds):

3

It doesn't crash when you run exit on the Linux instance and then close the window.

It doesn't crash when you run exit on the Linux instance and then close the window.

It still crashed, the reason it did that is because I was using oh my zsh, and when I ran the exit command, I only exited oh my zsh to the linux instance.

I tried to exit oh my zsh, then exit linux, and the window closed just fine.

hyper

Thank you 👏

Yeah, but IMO it should automatically close it when using the X button...

Yeah, but IMO it should automatically close it when using the X button...

Indeed, I ll keep this issue open, maybe someone has a solution.

I think I got a fix working on my computer: I changed the settings to be:

    ...
    shell: 'C:\\Windows\\System32\\wsl.exe',
    shellArgs: ['--'], // get the input from the command line
    ...

(or just run wsl -- in the command line if you're using that as default)
Can anyone confirm?

Edit:

I have it set so Oh-my-zsh is automatically started from bash by adding exec zsh at the top of ~/.bashrc, could be a factor?

I loved the terminal, but this problem is kind of frustrating.
Windows 10 user.

I'm having this issue after having Hyper run CMDer inside it (https://github.com/cmderdev/cmder/wiki/Seamless-Hyper-integration), I cannot use the X button at all or do a full reload. Ironically at my work computer I don't have the issue, but on my personal one I do.

Edit:

Personal Desktop runs W10 Pro 1903
Work PC runs W10 Enterprise 1809

I also get this problem if I do not run exit from wsl in Hyper before closing. If I run wsl -- from cmd/PowerShell in Hyper it still freezes if I then hit the window close button.

Windows 10 v1903
Hyper 3.0.2

3763 solve my problem.We can use config like

shell: 'wsl.exe',
shellArgs: [],

3763 solve my problem.We can use config like

shell: 'wsl.exe',
shellArgs: [],

Works like a charm

3763 doesn't solve my case. Works for WSL but not CMDer as previously mentioned.

@pedroCX486 are there any benefits of using CMDer over regular cmd?

@pedroCX486 are there any benefits of using CMDer over regular cmd?

Many benefits. CMDer has better integration with services like Git, linux-like commands, command shortcuts and a lot more I can't describe without making an essay. See: https://github.com/cmderdev/cmder/blob/master/README.md

Well, since no one from the dev team seems to care enough to even reply, and Microsoft also launched their Windows Terminal on the Store (spoilers: you can plug wsl and cmder into it just like hyper), I'm leaving Hyper behind. Thanks everyone for the support at trying something to fix it. :-)

I installed Hyper yesterday and this happens to me.

I installed Hyper yesterday and this happens to me.

Same here, using Powershell on Windows 10

This happens when _anything_ is running under Hyper for me, aside from whatever shell it starts. For example - an SSH client.

3763 solve my problem.We can use config like

shell: 'wsl.exe',
shellArgs: [],

Works like a charm

The above solution doesn't work for me.. T.T

shell: 'wsl.exe',
shellArgs: [],

Doesn't work for me too

I think I got a fix working on my computer: I changed the settings to be:

    ...
    shell: 'C:\\Windows\\System32\\wsl.exe',
    shellArgs: ['--'], // get the input from the command line
    ...

(or just run wsl -- in the command line if you're using that as default)
Can anyone confirm?

Edit:

I have it set so Oh-my-zsh is automatically started from bash by adding exec zsh at the top of ~/.bashrc, could be a factor?

This is the working solution

This bug should be fixed with #3794, but I have no idea whom I need to ping to get it merged.

This should be fixed by #3781

Was the fix actually released?

I installed Hyper yesterday and this happens to me.

Same here, using Powershell on Windows 10

Same problem, I'm just using cmd.......

Same problem. Processes were supposed to be killed but didn't.

I have the same problem. The whole window freezes if you try to close a tab. Very annoying. exit executed from cmd shell helps, but when you are in zsh, it doesn't :(

UPDATE: wow, you have to execute exit twice :)

Unfortunately, I cannot give feedback on this issue, I stopped using Hyper and Windows completely, I am now using a Linux distribution, and I am having no terminal issues what so ever :)

I've noticed that Alacritty has the same problem on Windows as of late. Can't help but feel like this is Windows' fault rather than any particular terminal emulator - maybe it'd be worth looking at open-source terminal emulators that don't have this problem, and see if they have a documented workaround?

This issue is still active for up-to-date Hyper using WSL 2 on Win 10 fast ring version 2004, OS build 19041.1.

If you exit your distro completely and get back to the windows command line Hyper will exit (close the selected tab) successfully, otherwise it crashes all open tabs.

I've noticed that Alacritty has the same problem on Windows as of late. Can't help but feel like this is Windows' fault rather than any particular terminal emulator - maybe it'd be worth looking at open-source terminal emulators that don't have this problem, and see if they have a documented workaround?

Same problem with Terminus, so maybe it's actually Windows' fault.

I'm having the same problem when using OpenSSH's ssh.exe as a shell in Windows 10 Pro 1903. exit'ing works but the X icons never do.

    shell: 'C:\\Windows\\System32\\OpenSSH\\ssh.exe',
    shellArgs: ['dev'],
Host dev
  HostName 192.168.192.233
  User vagrant
  Port 22
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile "C:/Users/Berkant Ipek/Desktop/dev/.vagrant/machines/default/hyperv/private_key"
  IdentitiesOnly yes
  LogLevel FATAL

Edit: Just quit using Hyper, and switched to Fluent Terminal. Everything works great. I'm going to keep messing around with this until this issue is fixed.

I have the same problem with default Hyper config (just installed on new Win 10 1903)
Once I run some DOS command, for instance 'cd \' I can't close the terminal window.
If I kill child process 'conhost.exe' then terminal close successfully.
image

Any workaround for this when using git-bash as terminal on Windows?

The issue seems to happen with any custom shell option

So far, the only third-party terminal emulator I've had luck with on Windows is ConEmu, which doesn't seem to suffer from this problem.

After some debugging, the hang seems to come from this line (window.ts)

rpc.on('exit', ({uid}) => {
    const session = sessions.get(uid);
    if (session) {
      session.exit(); // <-- this line
    }
  });

which in turns points to session.ts#destroy, either this.pty.kill(); or this.emit('exit'); are likely the issues.

I can no longer reproduce :| and I have only added a console.log() :|

FIX: adding useConpty: true, to your .hyper.js fixes it, as stated by #3781 (not sure why this is not in the default config for windows...)

That fix didn't work for me when I tried it

There used to be two bugs about this ticket. One is fixed with Conpty.

FIX: adding useConpty: true, to your .hyper.js fixes it, as stated by #3781 (not sure why this is not in the default config for windows...)

This fixed it for me (using CMDer).

For me bug appears only if I open a new tab and then close it without waiting while shell will be loaded. (Windows 10, git bash)
My config:

// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.

module.exports = {
  config: {
    // choose either `'stable'` for receiving highly polished,
    // or `'canary'` for less polished but more frequent updates
    updateChannel: 'canary',

    useConpty: true,

    // default font size in pixels for all tabs
    fontSize: 12,

    // font family with optional fallbacks
    fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',

    // default font weight: 'normal' or 'bold'
    fontWeight: 'normal',

    // font weight for bold characters: 'normal' or 'bold'
    fontWeightBold: 'bold',

    // line height as a relative unit
    lineHeight: 1,

    // letter spacing as a relative unit
    letterSpacing: 0,

    // terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
    cursorColor: '#cccccc',

    // terminal text color under BLOCK cursor
    cursorAccentColor: '#cccccc',

    // `'BEAM'` for |, `'UNDERLINE'` for _, `'BLOCK'` for █
    cursorShape: 'BLOCK',

    // set to `true` (without backticks and without quotes) for blinking cursor
    cursorBlink: false,

    // color of the text
    foregroundColor: '#cccccc',

    // terminal background color
    // opacity is only supported on macOS
    backgroundColor: 'rgb(30, 30, 30)',

    // terminal selection color
    selectionColor: 'rgb(128, 128, 128)',

    // border color (window, tabs)
    borderColor: 'rgba(128, 128, 128, 0.35)',

    // custom CSS to embed in the main window
    css: '',

    // custom CSS to embed in the terminal window
    termCSS: '',

    // if you're using a Linux setup which show native menus, set to false
    // default: `true` on Linux, `true` on Windows, ignored on macOS
    showHamburgerMenu: false,

    // set to `false` (without backticks and without quotes) if you want to hide the minimize, maximize and close buttons
    // additionally, set to `'left'` if you want them on the left, like in Ubuntu
    // default: `true` (without backticks and without quotes) on Windows and Linux, ignored on macOS
    showWindowControls: true,

    // custom padding (CSS format, i.e.: `top right bottom left`)
    padding: '5px 5px 1px 5px',

    // the full list. if you're going to provide the full color palette,
    // including the 6 x 6 color cubes and the grayscale map, just provide
    // an array here instead of a color map object
    colors: {
      black: '#000000',
      red: '#C51E14',
      green: '#1DC121',
      yellow: '#C7C329',
      blue: '#0A2FC4',
      magenta: '#C839C5',
      cyan: '#20C5C6',
      white: '#C7C7C7',
      lightBlack: '#686868',
      lightRed: '#FD6F6B',
      lightGreen: '#67F86F',
      lightYellow: '#FFFA72',
      lightBlue: '#6A76FB',
      lightMagenta: '#FD7CFC',
      lightCyan: '#68FDFE',
      lightWhite: '#FFFFFF',
    },

    // the shell to run when spawning a new session (i.e. /usr/local/bin/fish)
    // if left empty, your system's login shell will be used by default
    //
    // Windows
    // - Make sure to use a full path if the binary name doesn't work
    // - Remove `--login` in shellArgs
    //
    // Bash on Windows
    // - Example: `C:\\Windows\\System32\\bash.exe`
    //
    // PowerShell on Windows
    // - Example: `C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`
    shell: 'C:\\Program Files\\Git\\bin\\bash.exe',

    // for setting shell arguments (i.e. for using interactive shellArgs: `['-i']`)
    // by default `['--login']` will be used
    // shellArgs: [],

    // for environment variables
    env: {},

    // set to `false` for no bell
    bell: 'SOUND',

    // if `true` (without backticks and without quotes), selected text will automatically be copied to the clipboard
    copyOnSelect: false,

    // if `true` (without backticks and without quotes), hyper will be set as the default protocol client for SSH
    defaultSSHApp: true,

    // if `true` (without backticks and without quotes), on right click selected text will be copied or pasted if no
    // selection is present (`true` by default on Windows and disables the context menu feature)
    quickEdit: false,

    // choose either `'vertical'`, if you want the column mode when Option key is hold during selection (Default)
    // or `'force'`, if you want to force selection regardless of whether the terminal is in mouse events mode
    // (inside tmux or vim with mouse mode enabled for example).
    macOptionSelectionMode: 'vertical',

    // URL to custom bell
    // bellSoundURL: 'http://example.com/bell.mp3',

    // Whether to use the WebGL renderer. Set it to false to use canvas-based
    // rendering (slower, but supports transparent backgrounds)
    webGLRenderer: true,

    // for advanced config flags please refer to https://hyper.is/#cfg
  },

  // a list of plugins to fetch and install from npm
  // format: [@org/]project[#version]
  // examples:
  //   `hyperpower`
  //   `@company/project`
  //   `project#1.0.1`
  plugins: [],

  // in development, you can create a directory under
  // `~/.hyper_plugins/local/` and include it here
  // to load it and avoid it being `npm install`ed
  localPlugins: [],

  keymaps: {
    "editor:copy": "ctrl+c",
    "editor:paste": "ctrl+v",
    "editor:break": "ctrl+shift+c",
    "tab:new": "ctrl+t",
    "pane:close": "ctrl+w",
    "tab:next": "ctrl+shift+]",
    "tab:prev": "ctrl+shift+[",
    "pane:next": "ctrl+tab",
    "pane:prev": "ctrl+shift+tab",
  },
};

Yeah I really wanted to make this work too.

  • won't open directly into Wsl, tried with both full path and the direct Wsl.exe. I even tried linking it directly to the Ubuntu..exe, where I had to take over permissions of the Windows apps folder, subsequently breaking every application in there (yay), but that didn't work either.

-Then theres the freezing issue, which actually seemed to be solved by pointing straight to the exe and adding the use conpty parameter, but such is not the case with more than one tab open. - and might I add, each tab requires loading into wsl. I mean I suppose what's one line, but it makes a difference to me anyway.

And this isn't even a hyper problem but a Wsl one.. The memory usage is ridiculous. Open task manager to see vmemm utilizing 5gb of ram.

This is all my first foray into Linux and really getting down to business with the command line. Wsl seemed like a great solution but to be honest I've been met with nothing but bug after bug. My win10 install is screwed up now, vscode does all kinds of weird things and it seems half my extensions fail to work properly, I lost over an hour of work because of a bug with git and vscode where if you have a symlink set up they don't play nicely together.. I've wasted so much time trying to figure things out, only to time and time again come across threads like these that are a year or more old, with no solutions not even a sign of admission that there's an active problem.

I probably just should have just dual booted at this point. After a weekend messing around with all this crap I now truly appreciate Linux for what it is. I didn't know before but I do now. For now i'll continue to use wsl2 through the Ubuntu terminal which I'm pretty sure is just the windows terminal anyway and hope some bug fixes are on the way. I'll Open however many instances I need and deal with the interfering cross system keyboard shortcuts as I destroy files while struggling to close vim and make sense of the myriad of commands and their cryptic options that seem limitless and unwilling to give up their secrets. Its all worth it for now.

Yup same here. Exactly as described. Happens on wsl, cygwin and powershell.

Since there hasn't been any release since #3781 you may instead use the canary build
You can download it from the artifacts in the ci
if you still run into this issue, can you please try setting useConpty: true and report how it behaves (it will help if you can also report what happens when you set it to false)

Since there hasn't been any release since #3781 you may instead use the canary build
You can download it from the artifacts in the ci
if you still run into this issue, can you please try setting useConpty: true and report how it behaves (it will help if you can also report what happens when you set it to false)

Thanks - that is one of few things i didn't try ;)

V. 3.1.0-canary.4 (stable) which got installed as canary fixes all the issues I had.

I tested the Conpty settings you suggested and it seems like it has no impact over this issue (on canary at least).
I can quit / exit / kill hyper now with no problems no matter the value or presence of this setting in .hyper.js .

For everyone having same problem, I think you can just change updateChannel value in cfg from 'stable' to 'canary' and give it a shot.

Thanks again @LabhanshAgrawal

@rofazayn were you able to try out the ci build?

@rofazayn were you able to try out the ci build?

No, not really, I stopped using hyper exactly after this issue, I am currently using linux. Although, a friend of mine who had tried windows' new terminal, mentioned that it is way better than hyper and he hadn't faced any issues using it with zsh.

@rofazayn
from the latest comments, seems like this is fixed now. Can you please close the issue.

Still happens. Just happened with me in Windows 10, when I am using cmder.

+1 Still happening, Windows 10, running wsl with zsh.

@rithwikjc @TimofeyBiryukov on latest canary ci build?

Installing canary version fixed the problem for me.

Building from source on canary branch. It does not happen every time I close a tab, but opening more than 2-3 tabs and closing them will lead to the same result no matter what. Let me know if you need more info. @LabhanshAgrawal

@TimofeyBiryukov Can't say much, earlier it was happening because of an issue in node-pty but it has been fixed since then, and we're on the latest version, if more people experience this behaviour then maybe we can look at similarities. You can try to look into the processes and dev console.

Can this be fix for windows using git bash?
image

I'm on Win10, Hyper 3.0.2 (stable)

When running a gulp task with browsersync and trying to close the window, Hyper crashes.

Adding useConpty: true, to .hyper.js config did nothing, other than that my config is unchanged. Then I tried updateChannel: 'canary', which opened another can of worms: hyper canary will not update past 3.0.2 because of a windows certificate issue.

Since @TimofeyBiryukov didn't seem to have much luck building from source I don't feel very inclined to try that route.

Guess I'll live with the freezes for the time being 🤫

I dont know why but my hyper just stated crashing a lot within the last day
too. Thought I might be crazy but then saw this email and your post.

The changelogs say there havnt been any releases to the main branch in a
long while.. but Im pretty sure we're having updates pushed to us, and its
these silent updates that lead to things seemingly happening out of
nowhere. I only say this because today my hyper started hanging and
crashing on me a boatload, and I also happened to notice that my dev tool
settings were reset.. updates are nice and all but not like this man

On Fri, Jun 19, 2020 at 1:28 AM Rolf Brocke notifications@github.com
wrote:

I'm on Win10, Hyper 3.0.2 (stable)

When running a gulp task with browsersync and trying to close the window,
Hyper crashes.

Adding useConpty: true, to .hyper.js config did nothing, other than that
my config is unchanged. Then I tried updateChannel: 'canary', which
opened another can of worms: hyper canary will not update past 3.0.2
because of a windows certificate issue
https://github.com/vercel/hyper/issues/4511.

Since @TimofeyBiryukov https://github.com/TimofeyBiryukov didn't seem
to have much luck
https://github.com/vercel/hyper/issues/3736#issuecomment-639474668
building from source I don't feel very inclined to try that route.

Guess I'll live with the freezes for the time being 🤫


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/vercel/hyper/issues/3736#issuecomment-646442741, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AIAHBMW26TKM3IK5AATE5BLRXLZPXANCNFSM4HYRRCUA
.

@GTMxCode there aren't any silent updates. There was one update for 3.1.0-canary4, but it was rolled back (IIRC). You might've been using 3.0.2 with updateChannel as canary and received that build (there's a popup informing about update). I suggest to install the latest build from ci which shouldn't have any update issues as there are no newer releases.

reproducing on 3.0.2

I still have issue with useConpty: true enabled

For people facing this error in 2020,
There is a second way to solve:
You can just use wsl.exe without any shell arguments:

shell: 'wsl.exe',
shellArgs: [],

After getting stuck for an hour on this, Instantly solved the problem for me.

Also having this problem.

I'm also having this problem now on Windows 10 20H2.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aem picture aem  ·  3Comments

juicygoose picture juicygoose  ·  3Comments

rauchg picture rauchg  ·  3Comments

hxnt picture hxnt  ·  3Comments

ghost picture ghost  ·  3Comments