Weird white screen issue #1042

Closed
rainerborene opened this Issue Nov 25, 2016 · 7 comments

Projects

None yet

5 participants

@rainerborene
rainerborene commented Nov 25, 2016 edited

Issue

Sometimes when I type a command that does not exist it shows that blank page.

screenshot from 2016-11-25 12 57 21

Is it possible to disable web preview stuff?

@thejmazz

heh, I also have random white screen issues (esp. when using tmux). you can hide it by doing

store.dispatch({
  type: 'SESSION_URL_UNSET',
  uid: store.getState().sessions.activeUid
})

if you want to disable all web stuff,
just intercept the SESSION_URL_SET action in a plugin middleware and don't call next:

// ~/.hyper_plugins/disableweb/index.js

exports.middleware = (store) => (next) => (action) => {
  if (action.type !== 'SESSION_URL_SET') {
    next(action)
  } else {
    console.log('Intercepted SESSION_URL_SET')
  }
}

then add disableweb to your local plugins in ~/.hyper.js. You can use cmd+r to refresh/reload plugins while the terminal is open.

This is the same pattern I used, but the other way around, in my imgcat plugin:

https://github.com/thejmazz/hyper-imgcat/blob/6d9410a62f378ec2d62daf55d943968ac3f690fb/index.js#L1-L22

@ppot
Collaborator
ppot commented Nov 26, 2016

@rainerborene Does your command include a URL?

@rainerborene
rainerborene commented Nov 27, 2016 edited

@ppot no

@rauchg rauchg closed this in #1259 Dec 17, 2016
@jrop
jrop commented Dec 20, 2016

I am running into this when entering a non-existent command within TMUX. For example, if I enter the command "asdf", then the isUrlCommand(shell, data) {...} function erroneously interprets data as a URL:

//
// Variable capture from within isUrlCommand(shell, data) {...}
//
shell = "zsh"
data = "\u001b[1;84r\u001b[H\r\nzsh: command not found: asdf\u001b[1;85r\u001b[H\u001b[2B"
matcher = "zsh: (?:(?:command not found)|(?:no such file or directory)): ((?:https?:\/\/)|(?:file:\/\/)|(?:\/\/))?([^\n]+)"
match = ["zsh: command not found: asdf\u001b[1;85r\u001b[H\u001b[2B", undefined, "asdf\u001b[1;85r\u001b[H\u001b[2B"]
protocol = undefined
path = "asdf\u001b[1;85r\u001b[H\u001b[2B"
domain = "asdf\u001b[1;85r\u001b[H\u001b[2B"
result = "1"
return "http://1"

As you can see, isUrlCommand is erroneously interpreting the string as being a URL. Can this issue be opened back up?

@jrop
jrop commented Dec 20, 2016

It seems this was fixed in this commit: b2f67c7

If I clone the repo and run npm run dev/npm run app, this problem is fixed. When will this be released as an official build? This is the only thing keeping me from using Hyper.js right now.

@ppot
Collaborator
ppot commented Dec 20, 2016

Yes @jrop I fixed it in #1259

@rauchg
Contributor
rauchg commented Dec 31, 2016

URL handling has been vastly improved on 1.0.1! Thanks for the reports 🙏

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