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

Restart service after upgrading #4993

Open
3 tasks done
kuhar opened this issue Mar 15, 2022 · 11 comments
Open
3 tasks done

Restart service after upgrading #4993

kuhar opened this issue Mar 15, 2022 · 11 comments
Labels
bug Something isn't working

Comments

@kuhar
Copy link

kuhar commented Mar 15, 2022

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Chrome 98
  • Local OS: Chrome OS 98
  • Remote OS: Debian; Kernel 4.15.15
  • Remote Architecture: amd64
  • code-server --version: 4.1.0

Steps to Reproduce

  1. Install vscode 3.12.0. Verify that it launches.
  2. Install vscode 4.0.1 or 4.1.0 and attempt to launch.

(This is using the default installation script.)

Expected

Upgraded vscode launches.

Actual

The webpage shows: ENOENT: no such file or directory, open '/usr/lib/code-server/src/browser/pages/vscode.html'

Logs

No response

Screenshot/Video

No response

Does this issue happen in VS Code?

  • I cannot reproduce this in VS Code.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

Downgrading back to 3.12.0 resolves the issue.

@kuhar kuhar added bug Something isn't working triage This issue needs to be triaged by a maintainer labels Mar 15, 2022
@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 15, 2022

Install vscode 3.12.0. Verify that it launches.

I'm assuming hear you meant code-server.

browser/pages/vscode.html

No longer exists in 4.1.0 so this is expected. Can you share the install logs?

And can you share a screenshot and more information about how you're accessing/running code-server? What happens when you go to the root?

@jsjoeio jsjoeio added waiting-for-info Waiting for more information from submitter and removed bug Something isn't working triage This issue needs to be triaged by a maintainer labels Mar 15, 2022
@kuhar
Copy link
Author

kuhar commented Mar 15, 2022

Thanks for a quick reply, @jsjoeio!

I'm assuming hear you meant code-server.

My vscode version is 1.63.2.

No longer exists in 4.1.0 so this is expected. Can you share the install logs?

The install output was:

$ curl -fsSL https://code-server.dev/install.sh | sh                                   
                                                                                       
Debian GNU/Linux
Installing v4.1.0 of the amd64 deb package from GitHub.                                
                                                                                                                                                                               
+ mkdir -p ~/.cache/code-server                                                                                                                                                
+ curl -#fL -o ~/.cache/code-server/code-server_4.1.0_amd64.deb.incomplete -C - https://github.com/coder/code-server/releases/download/v4.1.0/code-server_4.1.0_amd64.deb      
######################################################################## 100.0%                                                                                                
+ mv ~/.cache/code-server/code-server_4.1.0_amd64.deb.incomplete ~/.cache/code-server/code-server_4.1.0_amd64.deb                                                              
+ sudo dpkg -i ~/.cache/code-server/code-server_4.1.0_amd64.deb                                                                                                                
[sudo] password for kubak:                                                                                                                                                     
(Reading database ... 558562 files and directories currently installed.)               
Preparing to unpack .../code-server_4.1.0_amd64.deb ...                                
Unpacking code-server (4.1.0) over (3.12.0) ...                                        
Setting up code-server (4.1.0) ...                                                                                                                                             
                                           
deb package has been installed.                                                                                                                                                
                                                                                                                                                                               
To have systemd start code-server now and restart on boot:                             
  sudo systemctl enable --now code-server@$USER                                        
Or, if you don't want/need a background service you can run:                           
  code-server    

And can you share a screenshot and more information about how you're accessing/running code-server? What happens when you go to the root?

I ran the systemcl command printed and then accessed the code-server via http://127.0.0.1:/49369.

My config file is:

bind-addr: localhost:49369
auth: none
cert: false
disable-telemetry: true
extensions-dir: $HOME/.vscode/extensions
user-data-dir: $HOME/.config/Code

(with shell variables expanded)

What do you mean by 'go to the root`?

image

@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 15, 2022

Thanks for all the details! I doubt this is related, but what happens if you try clearing your cache and navigate to http://localhost:49369/login?

@kuhar
Copy link
Author

kuhar commented Mar 15, 2022

How can I clean the cache?

@kuhar
Copy link
Author

kuhar commented Mar 15, 2022

Ah, I thought you wanted me to clear the code-server's cache on the remote machine.

I ran this in an incognito tab and it didn't help.

But restarting the service did the trick: sudo systemctl restart code-server@$USER. Perhaps this could be added to the installation script's output when it detects an upgrade?

@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 15, 2022

Ah, I thought you wanted me to clear the code-server's cache on the remote machine.

Ahhhh! My fault - I should have been more specific. Sorry about that!

But restarting the service did the trick: sudo systemctl restart code-server@$USER. Perhaps this could be added to the installation script's output when it detects an upgrade?

Nice find 🙌🏼 @code-asher thoughts?

@jsjoeio jsjoeio added needs-decision and removed waiting-for-info Waiting for more information from submitter labels Mar 15, 2022
@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 15, 2022

We should either add this to the installation script like @kuhar suggests (in which case this is a bug) or we update the Troubleshooting docs.

@code-asher
Copy link
Member

Restarting after upgrade sounds reasonable to me.

@code-asher
Copy link
Member

Oh I was thinking automatically but just adding to the output is even easier.

@jsjoeio jsjoeio added bug Something isn't working and removed needs-decision labels Mar 17, 2022
@jsjoeio jsjoeio added this to the On Deck - High Priority milestone Mar 17, 2022
@josephrocca
Copy link
Contributor

Ran into this same issue when upgrading from an old 3.x version - running sudo systemctl restart code-server@$USER gave me:

Warning: The unit file, source configuration file or drop-ins of [email protected] changed on disk. Run 'systemctl daemon-reload' to reload units.`

Just restarted the whole machine and that fixed it.

@code-asher code-asher changed the title [Bug]: Unable to launch after upgrade from 3.12.0 Restart service after upgrading Jul 13, 2024
@code-asher code-asher added enhancement Some improvement that isn't a feature bug Something isn't working and removed bug Something isn't working enhancement Some improvement that isn't a feature labels Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants