Giter Club home page Giter Club logo

codespace's People

Contributors

azure-helper avatar brianyu28 avatar carterzenke avatar dmalan avatar rongxin-liu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codespace's Issues

Project 10

My directory and files for project 10 are missing. I was in recovery mode and after restarting and updating it is all gone.

Add Doxygen to Base Image?

Right now my students have to manually install doxygen each time we use it (it doesn't persist in the image). It's fast to install and takes only a little memory, but it's still kind of a hassle. Right now in my classes I use your .devcontainer.json file as part of the student's codespace repo, so it seems to be built from the CS50 image. Reading the docs, I haven't found a way to modify that to actually add doxygen. I think it needs to be done at the DockerFile stage.

Cursor Absent

Hello,

I am trying to check the code I have developed for Exercise 6, Scarify. I am accessing CodeSpace via the web. Unfortunately, the cursor is not available on the screen and I can't write anything in the box. At the same time, the $ prompt is visible. I have been prompted to rebuild the container multiple time in vain. Appreciate your support to provide a solution. Looking forward to your response and thank you in advance.

Best Regards,
Rania.

Hide make's command output by default?

$ make hello
clang -ggdb3 -O0 -std=c11 -Wall -Werror -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wshadow    hello.c  -lcrypt -lcs50 -lm -o hello

Since most of the switches aren't that enlightening, and output itself is overwhelming early on.

http-server errs on launch

$ http-server 
/opt/cs50/bin/http-server:22: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if sys.argv[1] is not '--help' or sys.argv[1] is not '-h':
/opt/cs50/bin/http-server:22: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if sys.argv[1] is not '--help' or sys.argv[1] is not '-h':
Traceback (most recent call last):
  File "/opt/cs50/bin/http-server", line 59, in <module>
    main()
  File "/opt/cs50/bin/http-server", line 22, in main
    if sys.argv[1] is not '--help' or sys.argv[1] is not '-h':
IndexError: list index out of range

Update broke Github updating

Unfortunately, this couldn't have happened at a worse time for me. Our classes start on Monday. We have been using CodeSpaces but I have used your CS50 devcontainer.json file so it looks like the CS50 IDE. Everything worked fine until we were prompted to update. When that happened, git stopped authenticating. This dialog pops up when it tries to automatically update the repo.
image

When you go to the Github logs, this error message appears:

2023-01-27 22:44:46.704 [info] > git cat-file -s 66ba7cbbbf34af3f81c6850e635b9b6846f7afae [1ms]
2023-01-27 22:44:46.792 [info] > git show --textconv :cpp-hello.cpp [2ms]
2023-01-27 22:44:47.084 [info] > git push --force origin main [1270ms]
2023-01-27 22:44:47.084 [info] remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/occ-cs150/cs150-s23-sgilbert-student/'
2023-01-27 22:49:30.024 [info] > git log --oneline --cherry main...main@{upstream} -- [2ms]

Before the update, this is what happened in the github log.

git cat-file -s 2db30975169a6164ca90766435576e4d7f34cb28 [1ms]
2023-01-27 22:35:21.416 [info] > git show --textconv :cs150/hw/h01/h01.cpp [3ms]
2023-01-27 22:35:22.268 [info] > git push --force origin main [1766ms]
2023-01-27 22:35:22.268 [info] To https://github.com/occ-cs150/cs150-s23-steveandkathyg
9f1606d..2501985 main -> main
2023-01-27 22:35:22.289 [info] > git config --get commit.template [9ms]

Do you have any hints for me that would help me get going on Monday?

.devcontainer settings object is not active in CS50 codespace

After launching a fresh environment is CS50, the .devcontainer settings that are deployed do not actually affect the environment itself once launched.

.vscode/settings.json is an empty object (ie {})

Redeploying did not seem to have an effect.

Is this the desired behavior?

Unable to Launch VNC

I am excited to see this codespace project and ablity to natively work with codespace using VSCode.

I tried it with my VSCode, was able to test a program.

image

I tried to launch GUI, but it failed to connect to the server.

image

  • How should I troubleshoot?
  • I couldn't find anything in the logs docker logs.

502 Bad Gateway - unable to create codespace

I was experiencing some issues with my codespace not syncing the extensions correctly and communicating with github after accidentally removing the .devcontainer.json file.

Tried a few things to fix it:

  • rebuilding the codespace.
  • deleting the codespace and getting a new one.
  • manually adding a .devcontainer.json with code retrieved from another code50 instance.

Eventually I thought perhaps if I leave the code50 organisation and try to start fresh with the same github account (this one) it would fix it.

I have left the code50 organisation but now when I try to create a new codespace from code.cs50.io it gives me a Bad Gateway error.

I'm guessing it's probably regarding the organisation status since it's failing before it allows me to connect my github to the organisation.

When using a new github account it works fine but I would love to not have to change github accounts.

Any assistance would be appreciated.

Supported Browser

I tested code50 in OperaGX browser and it works completely fine. The html code can be updated to not show the red alert while opened in OperaGX browser.

Bad Gateway Error on code.cs50.io

Hi there!

I am a 2021 student, trying to login to code.cs50.io, following the steps to migrate my files from the IDE to VS Code. I am unable to login, as I get a 502 Bad Gateway error.

GET https://code.cs50.io/open?code=********* 502 (Bad Gateway)

From reading past issues on GitHub, I see that I probably need to be invited to the CS50 org? If so, this is my GitHub account!

Thanks!

Not working

It says Error "CodespaceStateWatcher' not found

Accessing code.cs50.io always gives a Bad Gateway error

Trying to access code.cs50.io on Safari, Chrome or Firefox always gives out "Bad Gateway Could not create codespace" error after clicking on "Login via github" even if you check "Open in VS Code Desktop".

It makes it impossible to do any work if not locally.

Intelli-Sense for c++

Hello again...
Although the C/C++ extension is enabled in code.cs50.io, intelli-sense does not seem to work to propose methods after the dot .
I am getting ...no suggestions even with ctrl-space.
I have tried using all different versions of compilers and intelli-sense options....
I am doing something wrong? or it is disabled from the container?
Thank you for reading this!
Maira K.

CS50 Codespace no longer pushes file changes to the private repo code50/{id}

08/05/22 around 11:30 PM GMT, CS50 codespace no longer pushes file changes automatically to the dedicated repo, in this case, the code50/{id} repo.
update50 or deleting the codespace along with the ssh key and re-configuring everything didn't solved the problem
Git command cannot be used to commit and push to the repo, instead what seems to work is the source control panel on the left sidebar.

Path to code binary has changed

When running code command I get the following error:

$ code
/opt/cs50/bin/code: line 52: /vscode/bin/linux-x64/5554b12acf27056905806867f251c859323ff7e9/bin/code: No such file or directory

I can reproduce the issue on fresh instances of codespace.
This patch should fix it:

diff --git a/opt/cs50/bin/code b/opt/cs50/bin/code
index 04d5acb..bb9a4fe 100755
--- a/opt/cs50/bin/code
+++ b/opt/cs50/bin/code
@@ -49,4 +49,4 @@ if [ "$options" = false ]; then
     done
 fi
 
-$(dirname "$VSCODE_GIT_ASKPASS_NODE")/bin/code "$@"
+$(dirname "$VSCODE_GIT_ASKPASS_NODE")/bin/remote-cli/code "$@"

Possible to configure Format Document to indent HTML inside of Jinja tags?

E.g., Format Document currently converts:

{% extends "layout.html" %}

{% block body %}
  <h1>Register</h1>
  <form action="/register" method="post">
      <input autocomplete="off" autofocus name="name" placeholder="Name" type="text">
      <select name="sport">
          <option disabled selected>Sport</option>
          {% for sport in sports %}
          <option value="{{ sport }}">{{ sport }}</option>
          {% endfor %}
      </select>
      <button type="submit">Register</button>
  </form>
{% endblock %}

to:

{% extends "layout.html" %}

{% block body %}
<h1>Register</h1>
<form action="/register" method="post">
    <input autocomplete="off" autofocus name="name" placeholder="Name" type="text">
    <select name="sport">
        <option disabled selected>Sport</option>
        {% for sport in sports %}
        <option value="{{ sport }}">{{ sport }}</option>
        {% endfor %}
    </select>
    <button type="submit">Register</button>
</form>
{% endblock %}

Could "Teacher" make the codespace repository public?

I was just thinking, whether the GitHub repo (where the code in the codespace is located)
could have the option to be made public?
As such students could copy/clone the code demonstrated in class by the instructor...
Just an idea as a teaching modality

Building CodeSpace Fails

I'm trying to customize the build to add a package. I forked the project and tried to open a CodeSpace on both main and on dev. I believe I've done this in the past. Currently, the build gets to the following step and dies.
#9 [internal] load metadata for docker.io/cs50/cli:amd64-minimized
2023-07-01 18:00:12.607Z: ERROR: failed to receive status: rpc error: code = Unavailable desc = error reading from server: EOF
2023-07-01 18:00:12.706Z: {"outcome":"error","message":"Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-root/container-features/0.43.0-1688234121503/Dockerfile-with-features -t vsc-codespace-0a6a6053f944d4952cd697988e6e34637e8d4aaf4431fd12cb2810b18e18ae9b --target dev_containers_target_stage --build-arg VCS_REF= --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.43.0-1688234121503 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label --build-arg _DEV_CONTAINERS_IMAGE_USER=ubuntu --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /var/lib/docker/codespacemount/workspace/codespace","description":"An error occurred building the image."}
2023-07-01 18:00:12.711Z: Stop: Run: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-root/container-features/0.43.0-1688234121503/Dockerfile-with-features -t vsc-codespace-0a6a6053f944d4952cd697988e6e34637e8d4aaf4431fd12cb2810b18e18ae9b --target dev_containers_target_stage --build-arg VCS_REF= --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.43.0-1688234121503 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label --build-arg _DEV_CONTAINERS_IMAGE_USER=ubuntu --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /var/lib/docker/codespacemount/workspace/codespace
2023-07-01 18:00:12.725Z: Error: Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-root/container-features/0.43.0-1688234121503/Dockerfile-with-features -t vsc-codespace-0a6a6053f944d4952cd697988e6e34637e8d4aaf4431fd12cb2810b18e18ae9b --target dev_containers_target_stage --build-arg VCS_REF= --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.43.0-1688234121503 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label --build-arg _DEV_CONTAINERS_IMAGE_USER=ubuntu --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /var/lib/docker/codespacemount/workspace/codespace
2023-07-01 18:00:12.727Z: at xte (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2005:1698)
2023-07-01 18:00:12.728Z: at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-07-01 18:00:12.730Z: at async zw (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2004:1691)
2023-07-01 18:00:12.731Z: at async TN (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2004:610)
2023-07-01 18:00:12.733Z: at async Lte (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2021:3660)
2023-07-01 18:00:12.736Z: at async Hf (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2021:4775)
2023-07-01 18:00:12.737Z: at async rne (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2152:10371)
2023-07-01 18:00:12.738Z: at async tne (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2152:10112)
2023-07-01 18:00:12.740Z: devcontainer process exited with exit code 1
= = ==================================== ERROR ====================================
2023-07-01 18:00:12.745Z: Failed to create container.
= = ===============================================================================
2023-07-01 18:00:12.750Z: Error: Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-root/container-features/0.43.0-1688234121503/Dockerfile-with-features -t vsc-codespace-0a6a6053f944d4952cd697988e6e34637e8d4aaf4431fd12cb2810b18e18ae9b --target dev_containers_target_stage --build-arg VCS_REF= --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.43.0-1688234121503 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label --build-arg _DEV_CONTAINERS_IMAGE_USER=ubuntu --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /var/lib/docker/codespacemount/workspace/codespace
2023-07-01 18:00:12.752Z: Error Code: 1302

Some file extensions are not uploaded to user github

I do not know if this is an issue or a misconfiguration from my part,
but .cpp, .java, or .ipynb files created in the online workspace (code.cs50.io) are not pushed to github.com/code50/UserRepoNumber
although are successfully saved in the workspace...

Alias cd

alias cd="HOME=/workspaces/$RepositoryName cd"

Possible to use Python GUI apps within Codespace?

import tkinter as tk

# Create the main window
root = tk.Tk()
root.title("My GUI")

# Create label
label = tk.Label(root, text="Hello, World!")

# Lay out label
label.pack()

# Run forever!
root.mainloop()
$ sudo apt-get install python3-tk
$ pip install tk
$ python hello.py 
Traceback (most recent call last):
  File "hello.py", line 4, in <module>
    root = tk.Tk()
  File "/usr/lib/python3.8/tkinter/__init__.py", line 2270, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.