microsoft / vscode-tools-for-ai

Azure Machine Learning for Visual Studio Code, previously called Visual Studio Code Tools for AI, is an extension to easily build, train, and deploy machine learning models to the cloud or the edge with Azure Machine Learning service.
Other
321 stars 91 forks source link

Unable to open VSCode web for accessing AzureML compute #2358

Open usoni1 opened 2 months ago

usoni1 commented 2 months ago

Does this occur consistently%3F Yes Repro steps:

  1. Go to the AzureML compute (see image) image
    1. Open VSCode (Web)
    2. It used to work earlier but now it has started giving the following error.

Error message: Failed to authenticate. Error type: AuthError

Version: 0.48.0 Browser Name: Chrome Browser Version: 124.0.0.0 OS: Windows 10 64-bit Product: Visual Studio Code Product Version: 1.88.1 Language: en

Call Stack ``` kt.getSession webOpener.js:2:706485 https:/webOpener.js:2:785853 Ar.measure webOpener.js:2:792927 Tr.getSession webOpener.js:2:785811 Tr.create webOpener.js:2:785519 $n.resolve webOpener.js:2:742087 https:/webOpener.js:2:772433 Ar.measure webOpener.js:2:792927 Lr.doRoute webOpener.js:2:772390 Module.Ir webOpener.js:2:793530 ```

The above was the stack trace generated automatically. But I also did inspect element to get some more logs for you from the console.

Please see the following:

image

I feel like for some reason VSCode is expecting to do Multi-factor authentication while it is never needed as I have a company laptop.

Also, please note that VSCode web is working for some employees in the same workspace and it is not working for other people.

Please let me know whatever help I can do from my end.

sevillal commented 1 week ago

Hi @usoni1, thanks for filing this issue.

This is a known VS Code issue, but we are currently testing the solution provided by VS Code team, your input is very valuable to improve this scenario. Could you please try the following and report if it fixed your issue?

  1. Go to Azure ML Studio and open the Compute tab
  2. Right click on the VS Code (Web) link of your compute instance and click Copy link
  3. Open a new browser tab
  4. Paste the link and add &useMsal=true at the end of the URL
  5. Hit enter
  6. Enter your credentials if needed and report if you are able to connect or if you see a different error
usoni1 commented 1 week ago

@sevillal , thank for your input. VSCode desktop was working for me so I didn't try VSCode web. But I followed the steps you said out and it is working for me.

sevillal commented 1 week ago

@usoni1, does it work if you directly click on the VS Code (Web) (without adding anything to the URL as I mentioned earlier)?

usoni1 commented 6 days ago

@sevillal , it does not work without it.

sevillal commented 6 days ago

Thanks for your confirmation @usoni1. We are working on the rollout plan of this fix; I'll update this issue when I have more information.