Closed heungson closed 2 years ago
Hmm...I followed your repro steps and uploading worked for me. Is there anything I'm missing?
https://user-images.githubusercontent.com/3806031/136598642-950da1be-9c32-4ed8-bb85-7c0b620bc290.mov
@jsjoeio Sorry I figured out the real issue here after I posted this report. So I updated the report. I'll attach a screen shot.
Ahhh...thank you! Yeah, I was able to reproduce that. It gets stuck trying to upload via the context menu for some reason 🤔
I do see this error in the browser logs:
ERR Unable to write file 'vscode-remote://localhost:8080/Users/jp/Dev/coder/code-server/src/node/http.ts/Screen Shot 2021-10-08 at 9.52.40 AM.png' (Error: Unable to create folder 'vscode-remote://localhost:8080/Users/jp/Dev/coder/code-server/src/node/http.ts' that already exists but is not a directory): Error: Unable to write file 'vscode-remote://localhost:8080/Users/jp/Dev/coder/code-server/src/node/http.ts/Screen Shot 2021-10-08 at 9.52.40 AM.png' (Error: Unable to create folder 'vscode-remote://localhost:8080/Users/jp/Dev/coder/code-server/src/node/http.ts' that already exists but is not a directory)
at ci.writeFile (http://localhost:8080/static/4cd55f94c0a72f05c18cea070e10b969996614d2/usr/local/Cellar/code-server/3.12.0/libexec/vendor/modules/code-oss-dev/out/vs/workbench/workbench.web.api.js:609:15094)
at async FileReader.z.onload (http://localhost:8080/static/4cd55f94c0a72f05c18cea070e10b969996614d2/usr/local/Cellar/code-server/3.12.0/libexec/vendor/modules/code-oss-dev/out/vs/workbench/workbench.web.api.js:2635:14032)
Thanks for clarifying! We'll need to investigate.
Possibly related:
@jsjoeio Thanks for the quick response and working for this great project!
@heungson no thank YOU for caring enough to file an issue for this bug - it's only a great project because people like you care about making it better!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days.
OS/Web Information
code-server --version
: 3.12.0Steps to Reproduce
Expected
'Upload' in the context menu should not be shown when a file is selected.
Actual
Code-server tries to upload a file in the selected file and and get stuck.
Logs
[2021-10-09 02:07:07.846] [window] [error] Unable to write file 'vscode-remote://localhost:8080/home/mllab/test/NotebookBasics.ipynb/vscode-pylance-2021.8.2_vsixhub.com.vsix' (Error: Unable to create folder 'vscode-remote://localhost:8080/home/mllab/test/NotebookBasics.ipynb' that already exists but is not a directory): Error: Unable to write file 'vscode-remote://localhost:8080/home/mllab/test/NotebookBasics.ipynb/vscode-pylance-2021.8.2_vsixhub.com.vsix' (Error: Unable to create folder 'vscode-remote://localhost:8080/home/mllab/test/NotebookBasics.ipynb' that already exists but is not a directory) at ci.writeFile (http://localhost:8080/static/b37ff28a0a582aee84a8f961755d0cb40a4081db/usr/lib/code-server/vendor/modules/code-oss-dev/out/vs/workbench/workbench.web.api.js:609:15094)
Screenshot
Notes
This issue can be reproduced in VS Code: No (there is no upload in the context menu when a file is selected.) Looks like code-server recognizes a file as a folder.