Unable to resolve resource
Getting this error when trying to open container.
Unable to resolve resource <remote url>

Output of Remote OSS extension is just connecting to local... nothing else.
And the output of reh in the container..
Server bound to 127.0.0.1:8000 (IPv4)
Extension host agent listening on 8000
[12:58:42] Extension host agent started.
settings.json:
{
...
"remote.OSS.hosts": [
{
"type": "manual",
"name": "local",
"host": "172.17.0.2",
"port": 8000,
"folders": [
{
"name": "hass-core",
"path": "/workspaces/hass-core"
}
]
}
]
}
Running this in the container before connecting:
export VSCODIUM_DIR=~/.vscodium-server
export VSCODIUM_VERSION="1.71.0.22245"
export PACKAGE="vscodium-reh-linux-x64-${VSCODIUM_VERSION}.tar.gz"
mkdir -p "${VSCODIUM_DIR}"
pushd "${VSCODIUM_DIR}"
wget "https://github.com/VSCodium/vscodium/releases/download/${VSCODIUM_VERSION}/${PACKAGE}"
export COMMIT=$(tar -xf "${VSCODIUM_DIR}/${PACKAGE}" ./product.json -O | jq ".commit" -r)
export BIN_DIR="${VSCODIUM_DIR}/bin/${COMMIT}"
mkdir -p "${BIN_DIR}"
pushd "${BIN_DIR}"
tar -xf "${VSCODIUM_DIR}/${PACKAGE}"
popd
ln -sf "${BIN_DIR}" "${VSCODIUM_DIR}/bin/current"
rm "${VSCODIUM_DIR}/${PACKAGE}"
popd
export CONNECTION_TOKEN=MySecretToken
export REMOTE_PORT=8000
~/.vscodium-server/bin/current/bin/codium-server \
--host localhost \
--port ${REMOTE_PORT} \
--telemetry-level off \
--connection-token ${CONNECTION_TOKEN}
The container was made with the original devcontainers extension. I then disabled that extension, enabled Remote OSS, restarted the container (which was stopped, but not removed), attached to a shell and ran the above commands to install and start vscodium-server.
Here is the original devcontainer.json from which the container was created:
Note port 8000 has been opened.
{
"name": "Home Assistant Dev",
"context": "..",
"dockerFile": "../Dockerfile.dev",
"postCreateCommand": "script/setup",
"postStartCommand": "script/bootstrap",
"containerEnv": { "DEVCONTAINER": "1" },
"appPort": ["8123:8123","8000:8000"],
"runArgs": ["-e", "GIT_EDITOR=code --wait"],
"extensions": [
"ms-python.vscode-pylance",
"visualstudioexptteam.vscodeintellicode",
"redhat.vscode-yaml",
"esbenp.prettier-vscode",
"GitHub.vscode-pull-request-github"
],
// Please keep this file in sync with settings in home-assistant/.vscode/settings.default.json
"settings": {
"python.pythonPath": "/usr/local/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.formatting.blackPath": "/usr/local/bin/black",
"python.linting.flake8Path": "/usr/local/bin/flake8",
"python.linting.pycodestylePath": "/usr/local/bin/pycodestyle",
"python.linting.pydocstylePath": "/usr/local/bin/pydocstyle",
"python.linting.mypyPath": "/usr/local/bin/mypy",
"python.linting.pylintPath": "/usr/local/bin/pylint",
"python.formatting.provider": "black",
"python.testing.pytestArgs": ["--no-cov"],
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"files.trimTrailingWhitespace": true,
"terminal.integrated.profiles.linux": {
"zsh": {
"path": "/usr/bin/zsh"
}
},
"terminal.integrated.defaultProfile.linux": "zsh",
"yaml.customTags": [
"!input scalar",
"!secret scalar",
"!include_dir_named scalar",
"!include_dir_list scalar",
"!include_dir_merge_list scalar",
"!include_dir_merge_named scalar"
]
}
}
From https://github.com/home-assistant/core if it's of any help.
As far as I am aware, this should work just fine. But evidently I'm missing something.
I have a hard time reproducing this as I do not use devcontainers myself. Can you access the vscodium-server on the local port by the following?
curl -v localhost:8000/version
This should reply with the commit of the server.
The %2B in the URL looks suspect here, it should be + unescaped, I believe. I have a lot more luck using this form of URL: vscodium://vscode-remote/remote-oss+${REMOTE_NAME}${REMOTE_PATH}. So for this issue: vscodium://vscode-remote/remote-oss+local/workspaces/hass-core