cs50 / codespace

https://cs50.readthedocs.io/cs50/codespace
GNU General Public License v3.0
120 stars 352 forks source link

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

Closed TarekVisch closed 2 years ago

TarekVisch commented 2 years ago

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.

rongxin-liu commented 2 years ago

Did you try pushing manually from the Source Control pane by clicking the "Sync" button? If you did, any error messages?

This could also happen if you pushed something manually to your code50 repo or somehow got it out of sync (e.g., generated or uploaded a large file over 100MB to codespace), then git push commands would fail.

TarekVisch commented 2 years ago

Yes, I manually pushed from the source control pane by clicking the "Sync", but it didn't sync, that is only after the issue occurred. I had to push every time I made a change manually. I got no errors image

Neshom-Imilas commented 2 years ago

source control doesn't work for me. it keeps crashing the code space

Neshom-Imilas commented 2 years ago

https://www.reddit.com/r/cs50/comments/whokoo/why_doesnt_my_code_and_activity_show_up_on_github/

image

I'm having the exact same problem I can't fix it even with source control

imeanup commented 2 years ago

Even I have the same issue. I tried to create a new Git account and the same happened with the newly created one.

Unfortunately, in this action, I deleted my actual git account.

The commit option in source control didn't complete the task and takes forever. Sync or backup doesn't work.

The steps I tried here are as follows:

  1. Deleted the codespaces repository main file and created a new file.
  2. Uninstalled and clean installed VScode.
  3. Disabled all extensions.
  4. Firewall allowed-VSCode application.
  5. Connected the newly created Codespaces repo.
  6. Created a new git account and followed the step to connect VSCode with Git.
  7. Created SSH Key-> Account linked-Sign up successfully.

Same error without any luck.

Kindly look into this issue as backup is an important feature that comes in handy to access the code in the Github ios app.

rongxin-liu commented 2 years ago

This issue is related to an extension we use and it is fixed: https://github.com/lostintangent/gitdoc/commit/46b934deab13320344159e90dac761e0717ff222

TarekVisch commented 2 years ago

The issue persists, even after deleting codespace and instantiating it, along with a new ssh key. GitDoc doesn't seem to work locally as well. It seems to use the 0.0.8 version instead of 0.0.9

rongxin-liu commented 2 years ago

We have no control over the gitdoc extension on VS Code marketplace, so please wait for an update. On CS50 Codespace, we are using a forked version of gitdoc and the issue should now be fixed. If for whatever reason gitdoc is not enabled for you, run Command+Shift+P, type GitDoc: Enabled.

You can run update50 --force to update your Codespace.

imeanup commented 2 years ago

Yes, it worked like a charm. Thank you.

imeanup commented 2 years ago

@rongxin-liu Kindly assists, after GitDoc is updated to v0.1.0 the sync function using the Ctrl + Shift + P, GitDoc: Enabled, doesn't sync code in Github. Moreover, the Commit option doesn't sync anymore. Also, I could not locate any solution in the above thread 46b934d. Please help here.

TarekVisch commented 2 years ago

Try and sync from the source control panel on the left sidebar of the IDE.

image click the commit and sync option, but before that try and run update50 --force

imeanup commented 2 years ago

@TarekVisch Thank you for your prompt reply. However, the steps didn't resolve the commit issue neither sync nor backup was showing in GitHub.

The mentioned steps are my first approach to using UI and committing the changes. Also, downgrading the v0.0.7 for GitDoc didn't help.

Screenshot 2022-08-14 181036

Screenshot 2022-08-14 181055

Logs: GitHub CodeSpace [Client:extension:f6e9:resolver:tunnel:16635:127.0.0.1:liveshare-tunnel[16635]:local-port-forwarder[16635] I] Port-forward channel # 20 closed. [Client:extension:f6e9:liveshare:connection:F5D00D93E15530E15AF6EAEBB3292AFDC768:liveshare:WorkspaceClient:1 V] checkConnectionWithTimeout -> 'started' [Client:extension:f6e9:liveshare:connection:F5D00D93E15530E15AF6EAEBB3292AFDC768:liveshare:WorkspaceClient V] checking ssh connection [Client:extension:f6e9:liveshare:connection:F5D00D93E15530E15AF6EAEBB3292AFDC768:liveshare:WorkspaceClient:1 V] checkConnectionWithTimeout -> 'succeeded' t:112.0 [Client:extension:f6e9:liveshare:connection:F5D00D93E15530E15AF6EAEBB3292AFDC768:liveshare:WorkspaceClient V] < streamManager.getStream() [Client:extension:f6e9:liveshare:connection:F5D00D93E15530E15AF6EAEBB3292AFDC768:liveshare:WorkspaceClient V] > streamManager.getStream() succeeded t:115.0 [Client:extension:f6e9:liveshare:connection:F5D00D93E15530E15AF6EAEBB3292AFDC768:liveshare:WorkspaceClient I] openStreamingChannel -> streamId:ServerSharing_20 [Client:extension:f6e9:resolver:tunnel:16635:127.0.0.1:liveshare-tunnel[16635]:local-port-forwarder[16635] I] Forwarding connection on channel # 21. [Performance I] Executed get-performance-data using gRPC [Client:extension:f6e9:resolver:tunnel:16635:127.0.0.1:liveshare-tunnel[16635]:local-port-forwarder[16635] I] Port-forward channel #21 closed. [Client:extension:f6e9:liveshare:connection:F5D00D93E15530E15AF6EAEBB3292AFDC768:liveshare:WorkspaceClient:1 V] checkConnectionWithTimeout -> 'started' [Client:extension:f6e9:liveshare:connection:F5D00D93E15530E15AF6EAEBB3292AFDC768:liveshare:WorkspaceClient V] checking ssh connection [Client:extension:f6e9:resolver:resolve:1:background-tasks:activity-monitor:vscode-activity-provider V] onActivity [Client:extension:f6e9:resolver:resolve:1:background-tasks:activity-monitor:vscode-activity-provider V] sending activity heartbeat [Client:extension:f6e9:liveshare:connection:F5D00D93E15530E15AF6EAEBB3292AFDC768:liveshare:WorkspaceClient:1 V] checkConnectionWithTimeout -> 'succeeded' t:113.0 [Client:extension:f6e9:liveshare:connection:F5D00D93E15530E15AF6EAEBB3292AFDC768:liveshare:WorkspaceClient V] < streamManager.getStream() [Client:extension:f6e9:liveshare:connection:F5D00D93E15530E15AF6EAEBB3292AFDC768:liveshare:WorkspaceClient V] > streamManager.getStream() succeeded t:113.0 [Client:extension:f6e9:liveshare:connection:F5D00D93E15530E15AF6EAEBB3292AFDC768:liveshare:WorkspaceClient I] openStreamingChannel -> streamId:ServerSharing_21 [Client:extension:f6e9:resolver:tunnel:16635:127.0.0.1:liveshare-tunnel[16635]:local-port-forwarder[16635] I] Forwarding connection on channel # 22. [Performance I] Executed get-performance-data using gRPC [Client:extension:f6e9:resolver:tunnel:16635:127.0.0.1:liveshare-tunnel[16635]:local-port-forwarder[16635] I] Port-forward channel # 22 closed.

rongxin-liu commented 2 years ago

@rongxin-liu Kindly assists, after GitDoc is updated to v0.1.0 the sync function using the Ctrl + Shift + P, GitDoc: Enabled, doesn't sync code in Github. Moreover, the Commit option doesn't sync anymore. Also, I could not locate any solution in the above thread 46b934d. Please help here.

Please run update50 --force to force update your Codespace now and wait about 3-5 minutes for your Codespace to finish loading. GitDoc should be working.

Please note that downgrading GitDoc below version 0.09 will not fix issues because it won't work with the current version of VS Code.

imeanup commented 2 years ago

@rongxin-liu Thank you for your reply.

I was able to fix the codespaces push (or sync/backup) issue.

Issue-reason: Changed the username of the GitHub account, and resulted in a change in codespace [a]users.noreply.github.com which is visible in COMMIT_EDITMSG # Author: section.

Resolution: Created a new codespace for the main, and sync started working for the new codespace.

Appreciate both of you @rongxin-liu and @TarekVisch for checking this.

imeanup commented 2 years ago

All set now. Thank you.