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

hyper CLI still shows old version and likely causing other issues #3602

Closed
2 tasks done
pcnate opened this issue May 6, 2019 · 7 comments
Closed
2 tasks done

hyper CLI still shows old version and likely causing other issues #3602

pcnate opened this issue May 6, 2019 · 7 comments
Assignees
Labels
⌨️ CLI tool Issue or PR related to CLI tool 🐛 Type: Bug Issue pertains to something wrong within Hyper

Comments

@pcnate
Copy link

pcnate commented May 6, 2019

  • I am on the latest Hyper.app version

  • I have searched the issues of this repo and believe that this is not a duplicate

  • OS version and name: Windows 10 1803 Build 17134.706

  • Hyper.app version: 3.0.0

  • Link of a Gist with the contents of your .hyper.js: 'https://gist.github.com/pcnate/fcc7b45394d0c8d74f4b4f98ce329fa5'

  • Relevant information from devtools : null

  • The issue is reproducible in vanilla Hyper.app: true

Issue

When executing hyper version it shows 2.1.2 after upgrading to 3.0.0.

After a reboot, the issue remains. I could manually fix my path but I would rather wait and have it properly fixed in an update. I'll deal with it until then.

This could be the root of the issues with the wrong config being used and not being able to install plugins.

@ZaLiTHkA
Copy link

ZaLiTHkA commented May 6, 2019

with regards to your link from #3500: the output of hyper version on my side definitely shows 3.0.0, so this is definitely a separate issue.

that said, I did have a few environment issues to sort out after upgrading from 2.1.2: the upgrade process didn't remove the %LOCALAPPDATA%\hyper\app-2.1.2\ folder and the paths in my current environment's %PATH% variable were still pointing to the old version.

I ended up removing 2.1.2, deleting all relevant files and plugin cache folders (look in both %LOCALAPPDATA% and %APPDATA%), then log out and log in again before installing 3.0.0.

another way I could tell that my environment variables were screwy is running hyper from a new terminal window.

if you don't mind, try something for me quickly:

  • open Hyper
  • check the output of hyper version
  • run hyper to launch another instance
  • check the output of hyper version again

if the version shown in the second instance shows 3.0.0, then you most likely also have environment variable issues.. in this case, I would suggest you try remove all Hyper related files and do a fresh install.


one other issue I had, which it seems you don't, is that my %PATH% variable type somehow changed back to the "static" type that doesn't expand variables. this only happened after installing 3.0.0, but I haven't managed to reproduce it so I can't be sure..

@pcnate
Copy link
Author

pcnate commented May 6, 2019

both output 2.1.2.

Maybe it will changed when I log back into OS but I don't plan on doing that today.

It could be useful to have 2 items in the issue template. One to show the output of hyper version and the other to show the version from the help -> about dialog after upgrades to detect if this is an issue.

@ZaLiTHkA
Copy link

ZaLiTHkA commented May 6, 2019

interesting.. I'm finishing work in a little while, so I'll pay more attention to the process when I upgrade Hyper on my personal laptop this evening to see if I can work out anything more helpful for you. :)

@cuuupid
Copy link

cuuupid commented May 6, 2019

My hyper CLI shows 3.0.0, but running hyper using the CLI now opens Hyper but with loading in my previous settings & plugins perfectly while running Hyper via the executable in Windows does not.

Edit: actually, although --version shows 3.0.0, the Hyper CLI is pointing to the old 2.1.2 executable as shown here:

image

@Stanzilla Stanzilla added the 🐛 Type: Bug Issue pertains to something wrong within Hyper label May 7, 2019
@ZaLiTHkA
Copy link

ZaLiTHkA commented May 7, 2019

...when I upgrade Hyper on my personal laptop this evening to see if I can work out anything more helpful for you. :)

had a bit of a family emergency last night, so I only got to dig into this now.. sorry about that.


from what I've worked out now; the Hyper 3 Windows setup does update the PATH variable, but it also changes the type from REG_EXPAND_SZ to the simpler REG_SZ. so basically if you have any %VARIABLE% entries in your path, it breaks completely. this can be fixed by either changing the type through regedit.exe directly, or by opening the Windows environment variables settings window, editing the PATH variable and simply saving it without making changes.

obviously keep in mind you'll need to close and reopen any running instances of Hyper to get this new environment, just because, well, Microsoft. O.o the safest option is to just log out and log in again.

but basically, after that, the hyper version command now shows 3.0.0 and which hyper shows /c/Users/Andre/AppData/Local/hyper/app-3.0.0/resources/bin/hyper regardless of how I choose to launch it. my paths show forward slashes because I use Bash from Git.

@NileshSP
Copy link

NileshSP commented Aug 23, 2019

Hi there - was facing the relevant issue and after troubleshooting figured out that the issue occurs due to settings filepath are accessed & updated differently during certain operations and is for windows specific cases only as far i could understand from code

During actual runtime, settings file is loaded & modified in filepath as

C:\Users\{userloggedin}\AppData\Roaming\Electron\.hyper.js

whereas it should be

C:\Users\{userloggedin}\AppData\Roaming\Hyper\.hyper.js

and is probably because of app.getPath('userData') which returns ...\Electron\.hyper.js instead of ...\Hyper\.hyper.js location https://github.com/zeit/hyper/blob/758e93c21e98556dd50acd81e8dc27615eebe787/app/config/paths.js#L17

while in hyper-cli path.join(process.env.APPDATA, 'Hyper') always returns

C:\Users\{userloggedin}\AppData\Roaming\Hyper\.hyper.js

https://github.com/zeit/hyper/blob/758e93c21e98556dd50acd81e8dc27615eebe787/cli/api.js#L14

Believe the issue also belongs to the #3500

Kindly confirm the analysis and if possible can help with a PR for a solution - @chabou

@Stanzilla Stanzilla added the ⌨️ CLI tool Issue or PR related to CLI tool label Oct 10, 2019
@LabhanshAgrawal
Copy link
Collaborator

The issues mentioned here seem to be fixed in canary branch
please try a build from https://github.com/vercel/hyper/actions/runs/568537952#artifacts
closing this, please open a new issue if you face any problems with the ci build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⌨️ CLI tool Issue or PR related to CLI tool 🐛 Type: Bug Issue pertains to something wrong within Hyper
Projects
None yet
Development

No branches or pull requests

7 participants