hyper icon indicating copy to clipboard operation
hyper copied to clipboard

Hyper crashes on launch on recent Windows 10 builds

Open cerebrate opened this issue 9 years ago • 15 comments

  • [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 Pro Insider Preview, build 16215

  • Hyper.app version: 1.3.3

  • Link of a Gist with the contents of your .hyper.js: https://gist.github.com/cerebrate/ac9aa51a9dfa641a23fe1881f3be449a

  • Relevant information from devtools (CMD+ALT+I on Mac OS, CTRL+SHIFT+I elsewhere): N/A

  • The issue is reproducible in vanilla Hyper.app: Yes. Removing plugins has no effect on problem.

Issue

Hyper crashes on launch with the following error:

[Window Title] Error

[Main Instruction] A JavaScript error occurred in the main process

[Content] Uncaught Exception: Error: EINVAL: invalid argument, lstat 'C:\Users\avatar\OneDrive' at Error (native) at fs.lstatSync (fs.js:982:18) at Object.fs.lstatSync (ELECTRON_ASAR.js:244:16) at Gaze._addToWatched (C:\Users\avatar\AppData\Local\hyper\app-1.3.3\resources\app\node_modules\gaze\lib\gaze.js:292:14) at Gaze.add (C:\Users\avatar\AppData\Local\hyper\app-1.3.3\resources\app\node_modules\gaze\lib\gaze.js:190:8) at new Gaze (C:\Users\avatar\AppData\Local\hyper\app-1.3.3\resources\app\node_modules\gaze\lib\gaze.js:74:10) at gaze (C:\Users\avatar\AppData\Local\hyper\app-1.3.3\resources\app\node_modules\gaze\lib\gaze.js:86:10) at watch (C:\Users\avatar\AppData\Local\hyper\app-1.3.3\resources\app\config.js:44:3) at Object.exports.init (C:\Users\avatar\AppData\Local\hyper\app-1.3.3\resources\app\config.js:130:3) at Object. (C:\Users\avatar\AppData\Local\hyper\app-1.3.3\resources\app\index.js:62:8)

[OK]

I believe this may relate to the changes to OneDrive in Windows 10 build 16215 and higher, in which placeholders are once again available in place of conventional files, although I don't know why Hyper is attempting to access that folder in the first place.

cerebrate avatar Jun 27 '17 17:06 cerebrate

Confirmed : hacking config.js at line 20 to use an arbitrary temporary directory rather than homedir() - parent of the problematic OneDrive directory - makes the problem go away.

cerebrate avatar Jun 27 '17 18:06 cerebrate

I don't experience this issue on Build 16226.

qnfz6

Edit: Nevermind it occurs now. dunno wtf changed. it was working and now its not.... weird

DuIslingr avatar Jun 28 '17 14:06 DuIslingr

@cerebrate thanks for the tip! I feel like this might have something to do with the new OneDrive "files on demand" feature that Microsoft recently released with the new insider builds.

Hyper starts up without any issues if i turn off that feature within OneDrive settings.

srimajji avatar Jun 29 '17 04:06 srimajji

@DuIslingr Did you enable OneDrive files on demand?

UsmanMohammad avatar Jun 29 '17 11:06 UsmanMohammad

@UsmanMohammad I did actually. I'm gonna turn it off and see if that solves it.

Edit: Ok Turning it off solves it. When I turn it back on I am able to start it once. But after that I get the error above.

DuIslingr avatar Jun 29 '17 15:06 DuIslingr

Yeah, the fundamental problem is that node.js lstat() doesn't understand NTFS reparse points, which the OneDrive "folder" is (Edit: to enable the on-demand functionality, that is).

cerebrate avatar Jun 29 '17 15:06 cerebrate

@UsmanMohammad Are you thinking it's due to nodejs/node#12737

Edit: Seems that @cerebrate beat me to it.

Florian-R avatar Jun 29 '17 15:06 Florian-R

Same bug, same solution (turning off Files on Demand allowed Hyper to launch).

2017-07-14

ddemaree avatar Jul 14 '17 12:07 ddemaree

Same issue, but turning off Files On-Demand didn't resolve the issue. I am on the latest fast-ring Windows 10 version (started happening 2 versions back)

eamodio avatar Aug 26 '17 15:08 eamodio

I just updated to windows 16725 and started getting this issue.

I looked at my OneDrive settings, and Files On-Demand is not enabled.

HotelCalifornia avatar Aug 26 '17 18:08 HotelCalifornia

For now I just commented out line 130 in config.js (%userprofile%\AppData\Local\hyper\app-1.3.3\resources\app\config.js)

  // watch();

You will lose the auto-detect of config changes, but at least it works :)

eamodio avatar Aug 26 '17 19:08 eamodio

I'm on 16251 build and I'm having this issue. I disabled Files On-Demand and it fixed it for a while but it returned today for some reason. Commenting watch(); on line 130 mentioned by @eamodio made it work here.

athosmoreno avatar Aug 29 '17 01:08 athosmoreno

This seems to have been resolved in either the latest Windows fast-ring or the hyper upgrade

eamodio avatar Aug 31 '17 13:08 eamodio

Confirmed #fixed for Build 16278 (Latest slow release) and for Hyper 1.4.3

danielsada avatar Sep 06 '17 05:09 danielsada

Great! Thank you!

chabou avatar Sep 06 '17 06:09 chabou