Home Assistant Community Add-on: Visual Studio Code

Probably a bug. I haven’t used anchors before but that time example should work.

The add-on has shown some of my code to be incorrect at times when it was actually fine. Best report it on the git.

ok thanks, issued it at
Incorrect type: expected "string" on a correct anchor · Issue #1294 · keesschollaart81/vscode-home-assistant · GitHub and String does not match the pattern of input_datetime · Issue #1293 · keesschollaart81/vscode-home-assistant · GitHub

Change your modem DNS like 8.8.8.8 and try again. I solved same issue with changing DNS

hello can not configure the output port does not appear configuration box

‘port’ is not listed as an option to configure in the docs. Where have you read about changing it?

I mean this box
box missing

Thank you, @CentralCommand.
This was the only way I could get Undo (Command-Z) to work while using the Visual Studio Code add-on in Safari 14.1.1 on MacOS Big Sur 11.4. Every time I tried it with the add-on in a hassio iFrame, Safari would “steal” the Undo keystroke and, well, not Undo my typing in the VS Code add-on, but traverse backwards through previously-opened Safari tabs and stuff. Hopefully my hassio_ingress URL stays the same.

1 Like

Hi @RyanAHolland
Sorry for a very late response, but I never got around to test this again but tonight I tried again. I deleted the Application OAuth key under https://github.com/settings/applications and started over with fresh settings i VSCode as well.

Unfortunately I can’t seem to get past step 3. When the box asking for “Token (press Enter or Escape to cancel)” appear I hit Escape and the program trows a “Sign in failed: Cancelled” at the right bottom of the screen and I get nowhere… It seems logical that hitting Escape at that stage leaves the sign in process and throws the error.

What kind of Token are you suppose to Enter I wonder, could that token be found in the OAuth link? I have tried some of the strings there but with no luck.Text

To bad this can’t seem to work somehow… It’s hard to share your config on GitHub if you can’t publish your code changes :slight_smile:

With the latest update to 3.6 i cannot access the addon any more. Restoring the 3.5 Snapshot doesnt work as well. I have already restarted the whole Server - didnt help.

Can’t fault it here

i figured it out - switched off the advanced tracking protection in firefox for the homeassistant domain and voila - works again.

1 Like

Any support for NabuCasa links?

Hi. Thank you for building and supporting the Visual Studio Code add-on. I was editing files using vi previously. The visual studio code is far easier.

Unfortunately I’m encountering an issue where often while editing files I lose connection to home assistant. The only remedy is to pull the plug (it doesn’t come back at all). At other times (when not editing files via visual studio code) my HA is very stable - it doesn’t crash / restart / become unavailable.

After restart things are stable, and generally I can have a fairly long editing session of my files via the add-on without another crash. But if I leave it for a few hours and then come back to edit it often happens again. When HA comes back up I’ve normally lost a few lines on the last edits - and in two cases the files are actually gone (probably corrupt and replaced) and I’ve had to restore to a snapshot.

I’d love to give logs or more information about what is going wrong, but I don’t know how to gather those - especially since the way I access terminal / logs is via the HA interface. Please let me know what you think I should do to gather better info about why this might be happening.

1 Like

Similar issue here: VSCode add-on works fine when accessing HA via local IP address and port.
But when going through Nginx reverse proxy I get a blank screen. Otherwise everything seems to work fine, it’s just the VS Code add-on that doesn’t work.

When trying to access the VS Code add-on, the supervisor logs this error:
21-07-30 14:36:35 ERROR (MainThread) [supervisor.api.ingress] Ingress error: 200, message='Invalid response status', url=URL('http://172.30.33.0:1337/?type=Management&reconnectionToken=55a462d9-6dee-4b2c-9a5f-5096aee41ffb&reconnection=false&skipWebSocketFrames=false')

Any clues towards how to resolve this are highly appreciated :slight_smile:

Got errors while trying to add new connection using extension SSH FS.
Suddenly i cannot change or add new SSH connection any more. I have tried everything.
“Could not connect to React dev server. Not running?”

Anyone have a clue?

Screenshot 2021-08-04 at 22-34-34 Visual Studio Code - Home Assistant

Hi Frenck you know what im missing in HA all the time a GITLAB-CI addon, you managed to make a lot of these great addons would it be an overkill to get a new usefull addon for project managment and maybe even versioning our configurations localy with that great gitlab sensor i see multiple uses.

I’m not able to start the VScode addon.
Using a odroid n2+ system with latest version of core.
When starting the webGUI I get a 401: Unauthorized

Otherwise this is a clean install.
Any idea’s on how to solve this?

Thanks in advance. See log below.

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Add-on: Visual Studio Code
 Fully featured VSCode experience, to edit your HA config in the browser, including auto-completion!
-----------------------------------------------------------
 Add-on version: 3.6.2
 You are running the latest version of this add-on.
 System: Home Assistant OS 6.2  (aarch64 / odroid-n2)
 Home Assistant Core: 2021.8.7
 Home Assistant Supervisor: 2021.06.8
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
Log level is set to DEBUG
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] code-server.sh: executing... 
[cont-init.d] code-server.sh: exited 0.
[cont-init.d] mosquitto.sh: executing... 
[cont-init.d] mosquitto.sh: exited 0.
[cont-init.d] mysql.sh: executing... 
[cont-init.d] mysql.sh: exited 0.
[cont-init.d] user.sh: executing... 
[cont-init.d] user.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[10:21:51] INFO: Starting the code server...
[2021-08-22T08:21:52.200Z] info  Wrote default config file to ~/.config/code-server/config.yaml
[2021-08-22T08:21:53.067Z] info  code-server 3.11.1 c680aae973d83583e4a73dc0c422f44021f0140e
[2021-08-22T08:21:53.070Z] info  Using user-data-dir /data/vscode
[2021-08-22T08:21:53.102Z] info  Using config file ~/.config/code-server/config.yaml
[2021-08-22T08:21:53.102Z] info  HTTP server listening on http://0.0.0.0:1337 
[2021-08-22T08:21:53.102Z] info    - Authentication is disabled 
[2021-08-22T08:21:53.102Z] info    - Not serving HTTPS 

finally! found this on the discord by @gue (don’t know forum name).
Took hours to find this answer so posting it here for others to also enjoy :slight_smile:

Blockquote the ‘401: Unauthorized’ errors on Firefox go away (at least for me) when you disable the “Enhanced tracking protection” Enhanced Tracking Protection in Firefox for desktop | Firefox Help
See this issue: Ingress addons alunched from sidebar return 401: Unauthorized · Issue #7090 · home-assistant/frontend · GitHub

1 Like

Hey, not sur it’s a bug or me not having configured VScode correctly, so I try here first. I use VScode with an AZERTY keyboard, with all default settings. Undo is still bind to Cmd-Z (on a mac), but hitting the keys closes the opened tab as if Cmd-W was hit… Any idea what might be going on?
Thanks a lot!
Cheers

Newbie here I have been doing changes on my configuration.yaml restarting server and when trying to go back I always get the error “The connection was reset” and a white screen. I’m using Raspberry Pi 4 with 4GB. I have only been able to go back into Visual Studio Code uninstalling the Add-on