Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mouse movements bug #16

Closed
benmonro opened this issue Aug 15, 2016 · 44 comments
Closed

mouse movements bug #16

benmonro opened this issue Aug 15, 2016 · 44 comments
Labels

Comments

@benmonro
Copy link

I get a strange behavior when I move my mouse around the terminal. I've tried this in fish and oh my zsh:
image

@kenwheeler
Copy link
Contributor

What terminal type are you using?

@akre54
Copy link

akre54 commented Aug 15, 2016

Getting the same. I'm using iTerm2 in "Full-Width Top of Screen" ("guake") mode with zsh.

My dev start script is "nodemon server --watch server --exec babel-node --plugins transform-es2015-modules-commonjs,transform-object-rest-spread if that makes any difference

@sameerkat
Copy link

sameerkat commented Aug 15, 2016

Also experiencing the same issue with iTerm2.

@kenwheeler
Copy link
Contributor

What do your settings look like? here are mine:

screen shot 2016-08-15 at 3 54 29 pm

@theverything
Copy link

theverything commented Aug 15, 2016

I'm having the same issue and my iTerm settings are the same as yours @kenwheeler

@benmonro
Copy link
Author

I'm just using plain old terminal on mac @kenwheeler . I am using oh-my-zsh. Tried it on that as well as fish. both have the same issue.

@eschaefer
Copy link

eschaefer commented Aug 15, 2016

What's interesting for me is that the bug continues in iTerm2 after I kill the dev server as well. Could be related to chjj/blessed#235

FYI:

$ bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15)

iTerm2: build 3.0.7

@codejunkienick
Copy link

I've got the same issue with Termite on Arch Linux.

@kenwheeler
Copy link
Contributor

@akre54 I can reproduce if I run with nodemon. Is everyone here running nodemon?

@brandonmp
Copy link

Same, in gnome-terminal and in tilda

Ubuntu 16.04.1
bash v. 4.3.46(1)-release (x86_64-pc-linux-gnu)

I don't think I'm running nodemon, unless it's included in the react-redux-starterkit i'm using--doesn't show up in processes

@kenwheeler
Copy link
Contributor

yeah you're using nodemon if you are using that kit.

@kenwheeler
Copy link
Contributor

Ok, nodemon is the culprit. Issue filed here: remy/nodemon#890 , lets see what @remy has to say. Other suggestions certainly welcome.

@benmonro
Copy link
Author

Yep we're using nodemon
On Tue, Aug 16, 2016 at 6:16 AM Ken Wheeler notifications@github.com
wrote:

Ok, nodemon is the culprit. Issue filed here: remy/nodemon#890
remy/nodemon#890 , lets see what @remy
https://github.com/remy has to say. Other suggestions certainly welcome.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#16 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAYXhFObGdNRi0msBiwyAvK6l43K6ACyks5qgbgRgaJpZM4Jknol
.

@akre54
Copy link

akre54 commented Aug 16, 2016

It isn't just with nodemon though. Using babel-node without nodemon has the same issue. Both Terminal.app and iTerm2.

Our app prints debugging info to the console (like queries run), so maybe it's an issue with piping stdout?

@kenwheeler
Copy link
Contributor

I tried babel-node and couldn't reproduce the mouse issue. Maybe I'll just capture stdout and try to filter out control statements.

@kenwheeler kenwheeler added the Bug label Aug 16, 2016
@kenwheeler
Copy link
Contributor

@akre54 do you know of a way I can identify external stdout?

@akre54
Copy link

akre54 commented Aug 16, 2016

Not that I'm aware of (short of running the script as a child proces). I'm going to give #27 a try, will let you know how that goes.

@kenwheeler
Copy link
Contributor

That wont fix the nodemon issue. It'll work for child processes that use console, but for anything that uses stdout.write it'll still leak. Whats even stranger is, when using nodemon, if I exit, the server stays running.

@akre54
Copy link

akre54 commented Aug 16, 2016

Right. I'm wondering if this is useful at all? https://github.com/remy/nodemon#pipe-output-to-somewhere-else

@kenwheeler
Copy link
Contributor

Are you running nodemon using the node api?

@akre54
Copy link

akre54 commented Aug 16, 2016

I pulled in #27 and it seems to be working to redirect my query logging to the log window (I had to reorder some stuff so that Dashboard was set up before anything got logged). So A+ on that.

I'm still getting the mouse bug with nodemon and plain babel-node too. I'm running the nodemon executable (cli). I was thinking I could create an intermediate script that runs nodemon from the node-api.

@edorivai
Copy link

Same here as @brandonmp.
Running:

Ubuntu Gnome 16.04.1 LTS, 64-bit
GNU bash, version 4.3.46(1)-release (x86_64-pc-linux-gnu)

Express with webpack-dev-middleware and webpack-hot-middleware. Dashboard seems to we working fine, apart from this mouse-event printing.

@zrosenbauer
Copy link

Also getting this issue, I'll get my env details and pass along.

@kenwheeler
Copy link
Contributor

Can you guys give this a shot #50

@eschaefer
Copy link

@kenwheeler unfortunately for my case, #50 did not resolve the issue.

@kenwheeler
Copy link
Contributor

@eschaefer have you tried zsh instead of bash?

@eschaefer
Copy link

eschaefer commented Aug 17, 2016

@kenwheeler: just tried zsh (w/ iTerm2) too, and the problem is the same.

$ zsh --version
zsh 5.2 (x86_64-apple-darwin15.6.0)

@kenwheeler
Copy link
Contributor

@eschaefer can I see your iterm settings page like i posted above? Also, how are you running the dashboard? Can i see a gist of your whole setup from package.json to your server/webpack config?

@eschaefer
Copy link

eschaefer commented Aug 17, 2016

@kenwheeler

iTerm settings:
screen shot 2016-08-17 at 11 50 13 am

Dashboard is being launched from an npm script (npm run dev):

"dev": "cross-env NODE_ENV=development sh scripts/dev",

bash script and webpack config file contents are in this gist

@kenwheeler
Copy link
Contributor

Try the new approach in #50, look at the readme updates and use the webpack-dashboard bin in your npm scripts

remy added a commit to remy/nodemon that referenced this issue Aug 17, 2016
Fixes #890
Ref FormidableLabs/webpack-dashboard#16

The library blessed inside of the webpack-dashboard does some funky stuff with std streams and the expectation of the encoding. I'm not 100% sure of this change, I've got to see all the tests, but this tweak moves to inherit the child's stdin and doesn't purposely encode the stdin stream as utf8 (which, I don't recall exactly why I did this in the first place…though I'm fairly sure it was another issue somewhere else in nodemon).
@eschaefer
Copy link

eschaefer commented Aug 17, 2016

@kenwheeler sorry, totally overlooked the readme updates... updated the gist.

When I run this task alone, it's fine:

./node_modules/.bin/webpack-dashboard -- ./node_modules/.bin/webpack-dev-server --hot --silent --no-info --config webpack/webpack.client.config.js

When I run the full bash script with a parallel server webpack task, then the mouse movement characters get dumped into the terminal:

./node_modules/.bin/webpack --watch --devtool inline-source-map  --silent --config webpack/webpack.server.config.js &
./node_modules/.bin/webpack-dashboard -- ./node_modules/.bin/webpack-dev-server --hot --silent --no-info --config webpack/webpack.client.config.js 

@kenwheeler
Copy link
Contributor

what if you put the dashboard first

@remy
Copy link

remy commented Aug 17, 2016

I'm pretty confident that the PR I've raised against nodemon (expected to
land in nodemon@1.10.1) fixes this.

On Wed, 17 Aug 2016, 22:35 Eric Schaefer, notifications@github.com wrote:

@kenwheeler https://github.com/kenwheeler sorry, totally overlooked the
readme updates... updated the gist.

When I run this task alone, it's fine:

./node_modules/.bin/webpack-dashboard -- ./node_modules/.bin/webpack-dev-server --hot --silent --no-info --config webpack/webpack.client.config.js

When I run the full bash script with parallel webpack tasks, then the
mouse movement characters get dumped into the terminal.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#16 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAA1hI-cGcULp59yxPDDAJSJb9cpHan6ks5qg36MgaJpZM4Jknol
.

@kenwheeler
Copy link
Contributor

This should be fixed in the latest release

remy added a commit to remy/nodemon that referenced this issue Aug 18, 2016
* fix: non-utf8 stdin processing
Fixes #890
Ref FormidableLabs/webpack-dashboard#16

The library blessed inside of the webpack-dashboard does some funky stuff with std streams and the expectation of the encoding. I'm not 100% sure of this change, I've got to see all the tests, but this tweak moves to inherit the child's stdin and doesn't purposely encode the stdin stream as utf8 (which, I don't recall exactly why I did this in the first place…though I'm fairly sure it was another issue somewhere else in nodemon).
* fix: use stdin:inherit when we're not forked
* fix: don't use inherit when required
* style: lint
* style: I am going to 🐎 kick the lint in the 🌰
remy added a commit to remy/nodemon that referenced this issue Aug 18, 2016
Fixes #894
Fixes #895

I'll have to continue investigation as to how we deal with spawned clients setting raw on stdin. Will break #890 and FormidableLabs/webpack-dashboard#16
@remy
Copy link

remy commented Aug 18, 2016

This is back as I had to revert the change. It kinda blew up everyone's use of nodemon! I'll keep investigating. I know what the issue is, the child process is setRaw(true) but I can't detect and forward that from nodemon (though I'm trying stuff).

@edorivai
Copy link

I'm still getting the characters printed on mouse events. Using the same environment as before, now with the new setup which runs the webpack-dashboard binary.

For your convenience:

Ubuntu Gnome 16.04.1 LTS, 64-bit
GNU bash, version 4.3.46(1)-release (x86_64-pc-linux-gnu)

@tobbbles
Copy link

Experiencing this issue on my system with the following details:

GNU bash, version 4.3.46(1)-release (x86_64-unknown-linux-gnu)
Arch Linux x86_64
i3 version 4.12-non-git
termite v11

@tom76kimo
Copy link

tom76kimo commented Aug 30, 2016

After updating nodemon and webpack-dashboard, still encounter with this issue as well. Using iTerm2

@davefedele
Copy link

Changing iterm2 'report terminal type' to ANSI stops the mouse movements bug.

However, now I can't scroll :(

@cimi
Copy link

cimi commented Sep 15, 2016

Changing iterm2 'report terminal type' to ANSI stops the mouse movements bug.

I can confirm this. It is inconvenient, though.

I'm running it on OSX 10.10.5 with iTerm2, settings identical to the ones recommended on this post. The project was bootstrapped from react-redux-starter-kit about six months ago. I've tried plugging in the dashboard via the recommended way (through the binary).

This issue should probably be re-opened since the issue still persists.

@pie6k
Copy link

pie6k commented Feb 1, 2017

It happens when there are 2 or more processes active in one console thread. (Not sure if I call it properly)

For example, in my package.json, I've got commands:

  "scripts": {
    "start": "node server.js",
    "lint": "eslint src",
    "gulp": "gulp",
    "dev": "gulp | webpack",
    "webpack": "webpack-dashboard -- node server.js"
  },

If I call npm run dev - issue occurs (there is also gulp command running). If I run npm run webpack - there is no issue (webpack-dashboard is running alone).

@flipflopsandrice
Copy link

Indeed, as @pietrasiak noticed, it happens when starting two processes in one thread.
Tested in Terminator, Guake and GNOME Terminal. All with zsh.

"scripts": {
  "serve:dev": "webpack-dashboard -- webpack-dev-server --open --env dev & cd node_modules/api-mocks && DEBUG=-* yarn run start",
}

Using a package like concurrently makes no difference (obviously).

@kenwheeler
Copy link
Contributor

@flipflopsandrice you can run it standalone now, this should only happen using the old syntax where you pass a process. Otherwise it runs on its own and gets data via sockets. Doing it the old way, shown above, does some weird thing with stdout

@flipflopsandrice
Copy link

@kenwheeler Thanks, I fixed it by adding a separate npm script:

"scripts": {
  "dev:dashboard": "webpack-dashboard -- npm run serve:dev",
  "serve:dev": "webpack-dev-server --open --env dev & cd node_modules/api-mocks && DEBUG=-* yarn run start",
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests