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

Studio Code Server stopped to launch #586

Closed
artlov opened this issue Mar 14, 2023 · 25 comments
Closed

Studio Code Server stopped to launch #586

artlov opened this issue Mar 14, 2023 · 25 comments
Labels
stale There has not been activity on this issue or PR for quite some time.

Comments

@artlov
Copy link

artlov commented Mar 14, 2023

Problem/Motivation

It happened after last update of HA Core 2023.3.4. At least I discovered this after last update.

Expected behavior

Add-on should to be started and working

Actual behavior

Log:
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
 Add-on: Studio Code Server
 Fully featured Visual Studio Code (VSCode) experience integrated in the Home Assistant frontend.
-----------------------------------------------------------
 Add-on version: 5.5.3
 You are running the latest version of this add-on.
 System: Home Assistant OS 9.5  (amd64 / qemux86-64)
 Home Assistant Core: 2023.3.4
 Home Assistant Supervisor: 2023.03.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-timezone: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
[16:58:08] INFO: Configuring timezone (Europe/Tallinn)...
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service base-addon-timezone successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-user: starting
s6-rc: info: service init-mysql: starting
s6-rc: info: service init-mosquitto: starting
s6-rc: info: service init-code-server: starting
s6-rc: info: service init-user successfully started
s6-rc: info: service init-mysql successfully started
s6-rc: info: service init-code-server successfully started
s6-rc: info: service code-server: starting
s6-rc: info: service code-server successfully started
[16:58:09] INFO: Starting code-server...
s6-rc: info: service init-mosquitto successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[2023-03-14T14:58:10.215Z] info  Wrote default config file to ~/.config/code-server/config.yaml
[2023-03-14T14:58:10.882Z] info  code-server 4.10.1 d477972c68fc8c8e8d610aa7287db87ba90e55c7
[2023-03-14T14:58:10.885Z] info  Using user-data-dir /data/vscode
[2023-03-14T14:58:10.902Z] info  Using config file ~/.config/code-server/config.yaml
[2023-03-14T14:58:10.902Z] info  HTTP server listening on http://0.0.0.0:1337/
[2023-03-14T14:58:10.903Z] info    - Authentication is disabled
[2023-03-14T14:58:10.904Z] info    - Not serving HTTPS
[16:58:26] 
[16:58:26] Extension host agent started.
[2023-03-14T14:58:27.323Z] error Forbidden HttpError: Forbidden
    at ensureOrigin (/usr/local/lib/code-server/out/node/http.js:288:15)
    at wrapped (/usr/local/lib/code-server/out/node/wsRouter.js:64:24)
    at Layer.handle [as handle_request] (/usr/local/lib/code-server/node_modules/router/lib/layer.js:102:15)
    at next (/usr/local/lib/code-server/node_modules/router/lib/route.js:144:13)
    at Route.dispatch (/usr/local/lib/code-server/node_modules/router/lib/route.js:109:3)
    at handle (/usr/local/lib/code-server/node_modules/router/index.js:515:11)
    at Layer.handle [as handle_request] (/usr/local/lib/code-server/node_modules/router/lib/layer.js:102:15)
    at /usr/local/lib/code-server/node_modules/router/index.js:291:22
    at param (/usr/local/lib/code-server/node_modules/router/index.js:368:14)
    at param (/usr/local/lib/code-server/node_modules/router/index.js:379:14)
    at Function.process_params (/usr/local/lib/code-server/node_modules/router/index.js:424:3)
    at next (/usr/local/lib/code-server/node_modules/router/index.js:285:10)
    at Function.handle (/usr/local/lib/code-server/node_modules/router/index.js:184:3)
    at router (/usr/local/lib/code-server/node_modules/router/index.js:59:12)
    at Layer.handle [as handle_request] (/usr/local/lib/code-server/node_modules/router/lib/layer.js:102:15)
    at trim_prefix (/usr/local/lib/code-server/node_modules/router/index.js:330:13)
    at /usr/local/lib/code-server/node_modules/router/index.js:294:7
    at Function.process_params (/usr/local/lib/code-server/node_modules/router/index.js:349:12)
    at Immediate.next (/usr/local/lib/code-server/node_modules/router/index.js:285:10)
    at Immediate.<anonymous> (/usr/local/lib/code-server/node_modules/router/index.js:671:15)
    at processImmediate (node:internal/timers:468:21)

Steps to reproduce

Upgrade and try to start addon

@artlov
Copy link
Author

artlov commented Mar 18, 2023

Add-on version 5.5.4 nor HA Core upgrade did not solve this problem.

-----------------------------------------------------------
 Add-on: Studio Code Server
 Fully featured Visual Studio Code (VSCode) experience integrated in the Home Assistant frontend.
-----------------------------------------------------------
 Add-on version: 5.5.4
 You are running the latest version of this add-on.
 System: Home Assistant OS 9.5  (amd64 / qemux86-64)
 Home Assistant Core: 2023.3.5
 Home Assistant Supervisor: 2023.03.1
-----------------------------------------------------------

@rokam
Copy link

rokam commented Mar 21, 2023

Same issue here

@freakmonk
Copy link

Same issue after last update.
Current version: 5.5.4

Home Assistant 2023.3.5
Supervisor 2023.03.1
Frontend 20230309.1 - latest

@artlov
Copy link
Author

artlov commented Mar 24, 2023

It seems that every time to trying access this add-on from sidebar error will be generated in the HA log:
23-03-24 09:48:30 ERROR (MainThread) [supervisor.api.ingress] Ingress error: 403, message='Invalid response status', url=URL('http://172.30.33.1:1337/stable-5e805b79fcb6ba4c2d23712967df89a089da575b?reconnectionToken=d6a2311d-2a33-4639-bd10-0693912dd261&reconnection=false&skipWebSocketFrames=false')

@artlov
Copy link
Author

artlov commented Mar 26, 2023

Unfortunately, the latest version 5.5.5 did not justify my hopes and did not solve this issue - the same errors in the logs continues and the add-on crashes when accessing it.

@kalavo
Copy link

kalavo commented Mar 28, 2023

Experienced the same issue moving from 5.5.2 to 5.5.3 (and 5.5.5). Downgrading to 5.5.2 resolves the issue.

Current environment is a Raspberry Pi 64bit 8gb running...
Home Assistant 2023.3.6
Supervisor 2023.03.2
Operating System 9.5
Frontend 20230309.1 - latest

Expected behaviour (as occurs in 5.5.2)...

[2023-03-28T04:49:16.721Z] info  Wrote default config file to ~/.config/code-server/config.yaml
[2023-03-28T04:49:17.874Z] info  code-server 4.9.1 f7989a4dfcf21085e52157a01924d79d708bcc05
[2023-03-28T04:49:17.877Z] info  Using user-data-dir /data/vscode
[2023-03-28T04:49:17.920Z] info  Using config file ~/.config/code-server/config.yaml
[2023-03-28T04:49:17.920Z] info  HTTP server listening on http://0.0.0.0:1337/ 
[2023-03-28T04:49:17.921Z] info    - Authentication is disabled 
[2023-03-28T04:49:17.921Z] info    - Not serving HTTPS 
[15:49:31] 
[15:49:31] Extension host agent started.
[15:49:34] [172.30.32.2][7a0f0dfa][ManagementConnection] New connection established.
[15:49:35] [172.30.32.2][23582607][ExtensionHostConnection] New connection established.
[15:49:35] [172.30.32.2][23582607][ExtensionHostConnection] <446> Launched Extension Host Process.

Error message experienced in 5.5.5...

[2023-03-28T04:36:59.682Z] info  Wrote default config file to ~/.config/code-server/config.yaml
[2023-03-28T04:37:01.154Z] info  code-server 4.11.0 85e083580dec27ef19827ff42d3c9257d56ea7e3
[2023-03-28T04:37:01.156Z] info  Using user-data-dir /data/vscode
[2023-03-28T04:37:01.212Z] info  Using config file ~/.config/code-server/config.yaml
[2023-03-28T04:37:01.213Z] info  HTTP server listening on http://0.0.0.0:1337/
[2023-03-28T04:37:01.213Z] info    - Authentication is disabled
[2023-03-28T04:37:01.213Z] info    - Not serving HTTPS
[15:37:14] 
[15:37:14] Extension host agent started.
[2023-03-28T04:37:26.075Z] error Forbidden HttpError: Forbidden
    at ensureOrigin (/usr/local/lib/code-server/out/node/http.js:288:15)
    at wrapped (/usr/local/lib/code-server/out/node/wsRouter.js:64:24)
    at Layer.handle [as handle_request] (/usr/local/lib/code-server/node_modules/router/lib/layer.js:102:15)
    at next (/usr/local/lib/code-server/node_modules/router/lib/route.js:144:13)
    at Route.dispatch (/usr/local/lib/code-server/node_modules/router/lib/route.js:109:3)
    at handle (/usr/local/lib/code-server/node_modules/router/index.js:515:11)
    at Layer.handle [as handle_request] (/usr/local/lib/code-server/node_modules/router/lib/layer.js:102:15)
    at /usr/local/lib/code-server/node_modules/router/index.js:291:22
    at param (/usr/local/lib/code-server/node_modules/router/index.js:368:14)
    at param (/usr/local/lib/code-server/node_modules/router/index.js:379:14)
    at Function.process_params (/usr/local/lib/code-server/node_modules/router/index.js:424:3)
    at next (/usr/local/lib/code-server/node_modules/router/index.js:285:10)
    at Function.handle (/usr/local/lib/code-server/node_modules/router/index.js:184:3)
    at router (/usr/local/lib/code-server/node_modules/router/index.js:59:12)
    at Layer.handle [as handle_request] (/usr/local/lib/code-server/node_modules/router/lib/layer.js:102:15)
    at trim_prefix (/usr/local/lib/code-server/node_modules/router/index.js:330:13)
    at /usr/local/lib/code-server/node_modules/router/index.js:294:7
    at Function.process_params (/usr/local/lib/code-server/node_modules/router/index.js:349:12)
    at Immediate.next (/usr/local/lib/code-server/node_modules/router/index.js:285:10)
    at Immediate.<anonymous> (/usr/local/lib/code-server/node_modules/router/index.js:671:15)
    at processImmediate (node:internal/timers:466:21)
[2023-03-28T04:37:37.004Z] error Forbidden HttpError: Forbidden
    at ensureOrigin (/usr/local/lib/code-server/out/node/http.js:288:15)
    at wrapped (/usr/local/lib/code-server/out/node/wsRouter.js:64:24)
    at Layer.handle [as handle_request] (/usr/local/lib/code-server/node_modules/router/lib/layer.js:102:15)
    at next (/usr/local/lib/code-server/node_modules/router/lib/route.js:144:13)
    at Route.dispatch (/usr/local/lib/code-server/node_modules/router/lib/route.js:109:3)
    at handle (/usr/local/lib/code-server/node_modules/router/index.js:515:11)
    at Layer.handle [as handle_request] (/usr/local/lib/code-server/node_modules/router/lib/layer.js:102:15)
    at /usr/local/lib/code-server/node_modules/router/index.js:291:22
    at param (/usr/local/lib/code-server/node_modules/router/index.js:368:14)
    at param (/usr/local/lib/code-server/node_modules/router/index.js:379:14)
    at Function.process_params (/usr/local/lib/code-server/node_modules/router/index.js:424:3)
    at next (/usr/local/lib/code-server/node_modules/router/index.js:285:10)
    at Function.handle (/usr/local/lib/code-server/node_modules/router/index.js:184:3)
    at router (/usr/local/lib/code-server/node_modules/router/index.js:59:12)
    at Layer.handle [as handle_request] (/usr/local/lib/code-server/node_modules/router/lib/layer.js:102:15)
    at trim_prefix (/usr/local/lib/code-server/node_modules/router/index.js:330:13)
    at /usr/local/lib/code-server/node_modules/router/index.js:294:7
    at Function.process_params (/usr/local/lib/code-server/node_modules/router/index.js:349:12)
    at Immediate.next (/usr/local/lib/code-server/node_modules/router/index.js:285:10)
    at Immediate.<anonymous> (/usr/local/lib/code-server/node_modules/router/index.js:671:15)
    at processImmediate (node:internal/timers:466:21)
[2023-03-28T04:37:47.329Z] error Forbidden HttpError: Forbidden
    at ensureOrigin (/usr/local/lib/code-server/out/node/http.js:288:15)
    at wrapped (/usr/local/lib/code-server/out/node/wsRouter.js:64:24)
    at Layer.handle [as handle_request] (/usr/local/lib/code-server/node_modules/router/lib/layer.js:102:15)
    at next (/usr/local/lib/code-server/node_modules/router/lib/route.js:144:13)
    at Route.dispatch (/usr/local/lib/code-server/node_modules/router/lib/route.js:109:3)
    at handle (/usr/local/lib/code-server/node_modules/router/index.js:515:11)
    at Layer.handle [as handle_request] (/usr/local/lib/code-server/node_modules/router/lib/layer.js:102:15)
    at /usr/local/lib/code-server/node_modules/router/index.js:291:22
    at param (/usr/local/lib/code-server/node_modules/router/index.js:368:14)
    at param (/usr/local/lib/code-server/node_modules/router/index.js:379:14)
    at Function.process_params (/usr/local/lib/code-server/node_modules/router/index.js:424:3)
    at next (/usr/local/lib/code-server/node_modules/router/index.js:285:10)
    at Function.handle (/usr/local/lib/code-server/node_modules/router/index.js:184:3)
    at router (/usr/local/lib/code-server/node_modules/router/index.js:59:12)
    at Layer.handle [as handle_request] (/usr/local/lib/code-server/node_modules/router/lib/layer.js:102:15)
    at trim_prefix (/usr/local/lib/code-server/node_modules/router/index.js:330:13)
    at /usr/local/lib/code-server/node_modules/router/index.js:294:7
    at Function.process_params (/usr/local/lib/code-server/node_modules/router/index.js:349:12)
    at Immediate.next (/usr/local/lib/code-server/node_modules/router/index.js:285:10)
    at Immediate.<anonymous> (/usr/local/lib/code-server/node_modules/router/index.js:671:15)
    at processImmediate (node:internal/timers:466:21)

@auanasgheps
Copy link

I have the exact same issue, logs in the spoiler.
Reinstalling the container does not help.

I'd like to downgrade, how do I do it on HASSOS?

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-user: starting
s6-rc: info: service init-mysql: starting
s6-rc: info: service init-mosquitto: starting
s6-rc: info: service init-code-server: starting
s6-rc: info: service init-mysql successfully started
s6-rc: info: service init-code-server successfully started
s6-rc: info: service init-user successfully started
s6-rc: info: service code-server: starting
s6-rc: info: service code-server successfully started
[11:48:29] INFO: Starting code-server...
s6-rc: info: service init-mosquitto successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[2023-03-28T09:48:31.147Z] info  Wrote default config file to ~/.config/code-server/config.yaml
[2023-03-28T09:48:32.702Z] info  code-server 4.11.0 85e083580dec27ef19827ff42d3c9257d56ea7e3
[2023-03-28T09:48:32.708Z] info  Using user-data-dir /data/vscode
[2023-03-28T09:48:32.776Z] info  Using config file ~/.config/code-server/config.yaml
[2023-03-28T09:48:32.776Z] info  HTTP server listening on http://0.0.0.0:1337/
[2023-03-28T09:48:32.776Z] info    - Authentication is disabled
[2023-03-28T09:48:32.777Z] info    - Not serving HTTPS
[11:48:41] 
[11:48:41] Extension host agent started.
Error: Unexpected SIGPIPE
    at process.<anonymous> (/usr/local/lib/code-server/lib/vscode/out/bootstrap.js:1:419)
    at process.emit (node:events:402:35)
[11:48:41] Error: Unexpected SIGPIPE
    at process.<anonymous> (/usr/local/lib/code-server/lib/vscode/out/vs/server/node/server.main.js:161:6350)
    at process.emit (node:events:402:35)
[2023-03-28T09:48:42.350Z] error Forbidden HttpError: Forbidden
    at ensureOrigin (/usr/local/lib/code-server/out/node/http.js:288:15)
    at wrapped (/usr/local/lib/code-server/out/node/wsRouter.js:64:24)
    at Layer.handle [as handle_request] (/usr/local/lib/code-server/node_modules/router/lib/layer.js:102:15)
    at next (/usr/local/lib/code-server/node_modules/router/lib/route.js:144:13)
    at Route.dispatch (/usr/local/lib/code-server/node_modules/router/lib/route.js:109:3)
    at handle (/usr/local/lib/code-server/node_modules/router/index.js:515:11)
    at Layer.handle [as handle_request] (/usr/local/lib/code-server/node_modules/router/lib/layer.js:102:15)
    at /usr/local/lib/code-server/node_modules/router/index.js:291:22
    at param (/usr/local/lib/code-server/node_modules/router/index.js:368:14)
    at param (/usr/local/lib/code-server/node_modules/router/index.js:379:14)
    at Function.process_params (/usr/local/lib/code-server/node_modules/router/index.js:424:3)
    at next (/usr/local/lib/code-server/node_modules/router/index.js:285:10)
    at Function.handle (/usr/local/lib/code-server/node_modules/router/index.js:184:3)
    at router (/usr/local/lib/code-server/node_modules/router/index.js:59:12)
    at Layer.handle [as handle_request] (/usr/local/lib/code-server/node_modules/router/lib/layer.js:102:15)
    at trim_prefix (/usr/local/lib/code-server/node_modules/router/index.js:330:13)
    at /usr/local/lib/code-server/node_modules/router/index.js:294:7
    at Function.process_params (/usr/local/lib/code-server/node_modules/router/index.js:349:12)
    at Immediate.next (/usr/local/lib/code-server/node_modules/router/index.js:285:10)
    at Immediate.<anonymous> (/usr/local/lib/code-server/node_modules/router/index.js:671:15)
    at processImmediate (node:internal/timers:466:21)

@artlov

This comment was marked as abuse.

@frenck
Copy link
Member

frenck commented Mar 28, 2023

That is not an acceptable solution @artlov And possibly breaking. I strongly recommend not advising that to anybody. You are creating a mismatch/version conflict doing that. I've marked your comment as abuse for that reason; as you potentially are breaking other people's systems with that comment.

A downgrade can be done using backups. That is what is offered on each add-on upgrade each time.

@artlov
Copy link
Author

artlov commented Mar 28, 2023

OK, I removed my advise. Is there any right solution coming soon?

@auanasgheps
Copy link

A downgrade can be done using backups. That is what is offered on each add-on upgrade each time.

Thank you, great advice!! I didn't think about it!

I restored the 5.5.2 version via Backups, and now it's working. :)

@llamafilm
Copy link

Same issue here with 5.5.5. Fixed by downgrading to 5.5.2

@auanasgheps
Copy link

Same issue with 5.5.6. What is going on?

@fabiorcosta
Copy link

For those who does not have 5.5.2 backup, any other workaround?

@thor0215
Copy link

thor0215 commented Apr 4, 2023

If you using a proxy server in front of Home Assistant, you should look at this thread
#584

@fabiorcosta
Copy link

fabiorcosta commented Apr 4, 2023 via email

@auanasgheps
Copy link

I am using NGINX Home Assistant SSL proxy. but I don't know if I am supposed to make those changes. I do not want to break the container.

@artlov
Copy link
Author

artlov commented Apr 4, 2023

Well, thanks @thor0215 for the hint. Indeed, I using ngnix proxy at front of HA and Code Server works with http on port 8123 within the local network. I've changed host configuration for HA in nginx proxy and it restored my Studio Code Server functionality (v.5.5.6).
Question still remain open for me - is it add-on fault or not.

image

@thor0215
Copy link

thor0215 commented Apr 4, 2023

@artlov Technically this is not an issue with vscode server addon as this new header security check was added to the vscode implementation. Reverting that change would require the addon to use a forked version of vscode. The fix should really be in the NGinx Proxy Manager default proxy.conf file.
https://github.com/NginxProxyManager/nginx-proxy-manager/blob/67208e43cc41f659ae2e68baa58a181a4d5f465b/docker/rootfs/etc/nginx/conf.d/include/proxy.conf#L1-L7

They should include the X-Forwarded-Host in that file. I've opened a bug for NGinx Proxy Manager to see if they will fix it.
NginxProxyManager/nginx-proxy-manager#2804

@fabiorcosta
Copy link

fabiorcosta commented Apr 4, 2023 via email

@thor0215
Copy link

thor0215 commented Apr 4, 2023

@fabiorcosta Can you better explain your setup and maybe post the log from your vscode addon?

@fabiorcosta
Copy link

fabiorcosta commented Apr 4, 2023 via email

@thor0215
Copy link

thor0215 commented Apr 4, 2023

Follow these instructions:
image

image

image

image

image

@PedroKTFC
Copy link

I've just replaced my microSD card with an SSD on a Raspberry Pi4 and taken the opportunity to go from 32 bit to 64 bit. I have VSC on another Home Assistant that works fine. However, on this one it never fully starts. I've Googled around and see several people have a similar issue. I can't tell if it's related to what's discussed here but to try and summarise my situation. HA fully up to date (2023.4.2 and VSC 5.5.6). I've set the log level for VSC to debug but I get no extra logging information (I've pasted the last few lines below as they're otherwise the same as normal). It's as though the add on hangs waiting for something that never completes. The red dot never goes green and clicking on the icon in the sidebar gives a message that VSC hasn't started. I don't know where else to look to find more information.

[20:40:21] INFO: Starting code-server...
s6-rc: info: service legacy-services successfully started
[2023-04-11T19:40:23.180Z] info Wrote default config file to ~/.config/code-server/config.yaml
[2023-04-11T19:40:24.715Z] info code-server 4.11.0 85e083580dec27ef19827ff42d3c9257d56ea7e3
[2023-04-11T19:40:24.718Z] info Using user-data-dir /data/vscode
[2023-04-11T19:40:24.784Z] info Using config file ~/.config/code-server/config.yaml
[2023-04-11T19:40:24.784Z] info HTTP server listening on http://0.0.0.0:1337/
[2023-04-11T19:40:24.784Z] info - Authentication is disabled
[2023-04-11T19:40:24.785Z] info - Not serving HTTPS

@github-actions
Copy link

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label May 13, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jun 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stale There has not been activity on this issue or PR for quite some time.
Projects
None yet
Development

No branches or pull requests

10 participants