duckietown / duckietown-shell-commands

Commands for the Duckietown Shell
4 stars 2 forks source link

dts code editor command failure on vscode web version #440

Open ajjollymore opened 7 months ago

ajjollymore commented 7 months ago

Issue Summary: The command line seems to execute fine, but once I open the online VSCode editor I Receive an error output within the online editor, error is outlined below. and ss is taken.

Command Line:

alex@WINDELL-SUSS7JS:~/elec390/duckietown-lx/braitenberg$ dts code editor
Duckietown Shell (v5.5.13)
INFO:dts:Commands version: daffy
INFO:dts:Checking for updates in the Duckietown shell commands repo...
INFO:dts:Fetching remote SHA from github.com ...
INFO:dts:Duckietown shell commands are up-to-date.
DEBUG:duckietown_docker_utils:duckietown_docker_utils version 6.1.1 path /home/alex/.local/lib/python3.10/site-packages
INFO:dts:Project workspace: /home/alex/elec390/duckietown-lx/braitenberg

Project:
  Name: braitenberg
  Distro: latest
  Version: latest
  Index: Clean
  Semantic Version: 0.0.0
  Path: /home/alex/elec390/duckietown-lx/braitenberg
  Type: template-exercise
  Template Version: 3
  Adapters: fs dtproject
________

INFO:dts:Retrieving info about Docker endpoint...
INFO:dts:Target architecture automatically set to amd64.
INFO:dts:Checking if the project's recipe needs to be updated...
INFO:dts:Fetching remote SHA from github.com ...
INFO:dts:Recipe is up-to-date.
INFO:dts:Building VSCode image for project 'braitenberg'...
INFO:dts:Using custom recipe from '/home/alex/.dt-shell/recipes/duckietown/duckietown-lx-recipes/mooc2022/braitenberg'
INFO:dts:Overriding version 'latest' with 'latest-vscode'
INFO:dts:Logging in to docker.io as 'ajjollymore' with secret '*********************************NXI'`
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Login Succeeded
INFO:dts:Target architecture automatically set to amd64.
INFO:dts:Found an image with the same name. Using it as cache source.
INFO:dts:Packaging project...
[internal] load build definition from Dockerfile.vscode
transferring dockerfile: 39B done
DONE 0.0s

[internal] load .dockerignore
transferring context: 2B done
DONE 0.0s

resolve image config for docker.io/docker/dockerfile:1.4
...

[auth] docker/dockerfile:pull token for registry-1.docker.io
DONE 0.0s

resolve image config for docker.io/docker/dockerfile:1.4
DONE 2.6s

docker-image://docker.io/docker/dockerfile:1.4@sha256:9ba7531bd80fb0a858632727cf7a112fbfd19b17e94c4e84ced81e24ef1a0dbc
CACHED

[internal] load .dockerignore
DONE 0.0s

[internal] load build definition from Dockerfile.vscode
DONE 0.0s

[internal] load metadata for docker.io/duckietown/dt-vscode:daffy-amd64
...

[context recipe] load .dockerignore
transferring recipe: 35B done
DONE 0.0s

[internal] load metadata for docker.io/duckietown/dt-vscode:daffy-amd64
...

[auth] duckietown/dt-vscode:pull token for registry-1.docker.io
DONE 0.0s

[internal] load metadata for docker.io/duckietown/dt-vscode:daffy-amd64
DONE 5.3s

[base 1/8] FROM docker.io/duckietown/dt-vscode:daffy-amd64@sha256:3bd929b12ebdc5ec9a8db3647ecf16ac478681bb0812b9240dbc5e9c07283e0e
DONE 0.0s

[context recipe] load from client
transferring recipe: 2.02kB 0.0s done
DONE 0.0s

[base 3/8] COPY --from=recipe ./dependencies-apt.txt /tmp/
CACHED

[base 4/8] RUN dt-apt-install /tmp/dependencies-apt.txt
CACHED

[base 5/8] COPY --from=recipe ./dependencies-py3.* /tmp/
CACHED

[base 6/8] RUN python3 -m pip install -r /tmp/dependencies-py3.txt
CACHED

[base 7/8] COPY --from=recipe assets/vscode/setup.sh /tmp/vscode_setup.sh
CACHED

[base 2/8] RUN dt-build-env-check "braitenberg" "Andrea F. Daniele (afdaniele@duckietown.com)" "VSCode - Braitenberge Exercise"
CACHED

[base 8/8] RUN /tmp/vscode_setup.sh
CACHED

exporting to image
exporting layers done
writing image sha256:b7fafd328ab153158ace319ddad9984435b94063a27b8ceb225cb21fbe7cf0fa
writing image sha256:b7fafd328ab153158ace319ddad9984435b94063a27b8ceb225cb21fbe7cf0fa done
naming to docker.io/alex/braitenberg:latest-vscode-amd64 done
DONE 0.4s
INFO:dts:Project packaged successfully!
INFO:dts:VSCode for project 'braitenberg' successfully built!
INFO:dts:Retrieving info about Docker endpoint...

Docker Endpoint:
  Hostname: docker-desktop
  Operating System: Docker Desktop
  Kernel Version: 5.15.133.1-microsoft-standard-WSL2
  OSType: linux
  Architecture: x86_64
  Total Memory: 15.50 GB
  CPUs: 12

INFO:dts:Target architecture automatically set to amd64.
INFO:dts:Running image 'docker.io/alex/braitenberg:latest-vscode-amd64'...
INFO:dts:Waiting for VSCode (up to 30 seconds)...
INFO:dts:

===============================================================================
|                                                                             |
|    VSCode should open in the browser automatically.                         |
|    Alternatively, you can click on:                                         |
|                                                                             |
|        >   https://localhost:49153                                          |
|                                                                             |
===============================================================================

WARNING:dts:We could not found a web browser to open the code editor in. Please, use the URL given above in the web browser you prefer instead.
INFO:dts:Use Ctrl-C in this terminal to stop VSCode.

ScreenShot of VSCode image

Error pasted from VSCode

Error loading webview: Error: Could not register service workers: SecurityError: Failed to register a ServiceWorker for scope ('https://localhost:49153/stable-74b1f979648cc44d385a2286793c226e611f59e7/static/out/vs/workbench/contrib/webview/browser/pre/') with script ('https://localhost:49153/stable-74b1f979648cc44d385a2286793c226e611f59e7/static/out/vs/workbench/contrib/webview/browser/pre/service-worker.js?v=4&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&remoteAuthority=localhost:49153'): An SSL certificate error occurred when fetching the script..
ajjollymore commented 7 months ago

Further Detail for Clarity: Running WSL2 and opening with chrome in screenshot but have tried in edge with same error. The Not Secure is from invalid SSL certificate