iotexproject / arduino-sdk

Apache License 2.0
11 stars 9 forks source link

Stuck at Downloading VS Code Server #10

Open FaitAccompli opened 1 year ago

FaitAccompli commented 1 year ago

Hi, currently setting up my dev environment

Pressed F1, and ran this: Dev Containers: Rebuild and Reopen in container formerly Remote-Containers: Rebuild and reopen in container

Docker daemon is running fine, this is probably a VS Code Server issue, but I just want to confirm if you're also experiencing this on your end. Might be related to this: 6961

Thank you!

as-iotex commented 1 year ago

I cannot reproduce your issue in Mac OS Catalina using Colima as the Docker engine. It definitely looks like an external issue. But let's try finding a solution. Could you share more details about your environment and the error? A workaround would be to build and run the devcontainer outside VSCode then use the VSCode extension to simply attach to the running container.

FaitAccompli commented 1 year ago

@as-iotex , thanks for the quick revert. I’ll send in more details later today, it’s 2AM here. Also, I’m looking into contributing or if you need an extra hand on some of the tasks I’ll be more than happy to help on my spare time. Are the tasks listed in the README the only ones available?

VS Code

OS

nslookup

Name: waws-prod-sg1-057-feea.southeastasia.cloudapp.azure.com Address: 20.43.132.130 Aliases: update.code.visualstudio.com vscode-update.trafficmanager.net vscode-update-sea.azurewebsites.net waws-prod-sg1-057.sip.azurewebsites.windows.net

as-iotex commented 1 year ago

It looks like it could be an issue related to WSL. You could look into that. Unfortunately I am not really familiar with that and don't have access to a Windows PC at the moment. If I get one, I'll try to replicate your environment. If you could attach a more detailed error log from VSCode maybe that sheds some more light (I am not sure how much information VSCode can give you).

Also, I’m looking into contributing or if you need an extra hand on some of the tasks I’ll be more than happy to help on my spare time. Are the tasks listed in the README the only ones available?

Thank you! This is so great, your contribution will be more than welcome. The tasks listed in the README are some "nice to have" items. I will ask the IoTeX team if there is anything else in the backlog. If you want to work on any of that, feel free to do it or ask any questions. Another task that could be added there would be the one tracked by this issue: fixing the dev environment in Windows

FaitAccompli commented 1 year ago

You were right @as-iotex , it was an issue with WSL. There was an issue with MS SEA server that was causing the VS Code Server to download too slow. For those experiencing the same problem (assuming you already have wsl installed), you can follow these steps:

  1. Run powershell or windows command prompt as Administrator and type in wsl --install. Alternatively, you can manually update using this https://wlstorestorage.blob.core.windows.net/wslblob/wsl_update_×64.msi (for x64 only)

By default, the installed Linux distribution will be Ubuntu. This can be changed using the -d flag. To change the distribution installed, enter: wsl --install -d . Replace with the name of the distribution you would like to install.

  1. In powershell with Administrator privileges, check if you're using WSL2 by running wsl --list --verbose. If your WSL version is still in version 1 you can switch to version 2 using this command: wsl --set-default-version <distribution name> 2. In my case, since I'm using Ubuntu, I used: wsl --set-default-version Ubuntu 2

  2. After that, you can confirm by running wsl --list --verbose again and you should see something like: image

  3. You can then open this repository using VSCode, and press F1 and choose Dev Containers: Rebuild and Reopen in container.

  4. You can test if you've set everything up correctly by running any of the tasks in tasks.json

References: [1]Windows Subsystem for Linux Documentation [2]Developing inside a Container [3]Downloading VS Code Server Stuck When Attach to Running Container #7073

as-iotex commented 1 year ago

This is great. I will try adding it to the docs somewhere. Maybe into a FAQ section of the Wiki. Really glad you got your setup working.

Let me know if there is any task you would like to pick up and start working on. Apart from the tasks described abode, we would really love to create more usage examples for the SDK. They would also serve as content for the developer portal: https://developers.iotex.io/academy/all

Let me know if you have any ideas and we will be more than happy to support you on them.

FaitAccompli commented 1 year ago

Oooh adding more usage examples for the SDK sounds interesting. I’ve been working on something with my friend recently, the basic idea is that we have a non-intrusive load monitoring device that can recognize which appliances are open in realtime using one sensor. How’s that sound?

as-iotex commented 1 year ago

That sound like a good fit. Please keep us updated on the progress You can join our developer discord community too at http://iotex.io/devdiscord if you would like to discuss more details