powerplatform-vscode icon indicating copy to clipboard operation
powerplatform-vscode copied to clipboard

Nothing happen after click on "Add Auth Profile"?

Open KwernHe opened this issue 2 years ago • 3 comments

After the extension(Power Platform Tools) get installed on my VSCode, when I tried to click on "Add Auth Profile" to sign it, but nothing happens? Anyone can please help on this?

Screen Shot 2022-08-24 at 20 27 08 ?

KwernHe avatar Aug 24 '22 12:08 KwernHe

I had the same issue, but it really was just opening an authentication window behind vscode that I had to find and authenticate with.

rayzorben avatar Aug 30 '22 20:08 rayzorben

There could be a couple things going on here. The authentication process launches a dialog (Windows) or your browser (Mac & Linux), which often launches behind the current window as @rayzorben said above.

This same symptom appears when the prerequisite .NET 6.0 is not installed on the machine. If your Mac is an Apple Silicon M1/M2, you will need to install both the x64 and arm64 versions of .NET6.0 as noted in the 1.0.20 release notes.

@KwernHe , if neither of those is the case, please check that running pac in a VS Code terminal successfully executes. If so, can you successfully authenticate via pac auth create?

tehcrashxor avatar Aug 30 '22 21:08 tehcrashxor

I had same issue. Resolved by reinstalling all dotnet-* packages and this extension...

ronram5126 avatar Sep 24 '22 09:09 ronram5126

Since uninstalling the extension and all dotnet packages on a new Apple M1 computer did not resolve this issue for me, I'm going to document the process I used to fix my install. Though it's not likely to be something others can reproduce, it may at least help with narrowing down the problem.

TL;DR The key here is that the pac executable wasn't getting installed for some reason and I was only able to resolve the issue because I had a copy of it elsewhere, allowing me to manually install it.

First, I uninstalled the extension in an effort to "start over."

Next, following steps provided here, I used this script to uninstall my previous installations of dotnet.

Using this issue as a starting place, I then reinstalled both the arm64 and x64 versions of dotnet to my system. I used a terminal session to browse my dotnet installation and confirm that both versions appeared as expected.

which dotnet
ls /usr/local/share/dotnet/

I then reinstalled the Power Platforms Tools extension in VS Code.

At this point, I couldn't continue with that recommended solution because I still was receiving a "pac command not found" error in all terminal windows after restart (which was my original issue and the reason I was researching the Add Auth Profile problem to begin with).

I browsed in terminal to the tools extension in my user library:

cd ~/Library/Application\ Support/Code/User/globalStorage/microsoft-isvexptools.powerplatform-vscode/pac/tools

There I eventually identified that the pac executable was not getting installed on my system. (I have no idea why!) Luckily, I had a backup from a previous system that I was able to grab the old extension install and copy it to my new system.

cp -rf PATH_TO_BACKUP/Library/Application\ Support/Code/User/globalStorage/microsoft-isvexptools.powerplatform-vscode/pac ~/Library/Application\ Support/Code/User/globalStorage/microsoft-isvexptools.powerplatform-vscode/pac

I then inspected my $PATH to determine which was the best location to make a symlink for the pac executable.

echo $PATH

# I chose ~/.dotnet/tools from my $PATH as a good place to put the symlink and created it using...
ln -s ~/Library/Application\ Support/Code/User/globalStorage/microsoft-isvexptools.powerplatform-vscode/pac ~/.dotnet/tools/pac

Finally, I restarted Code and tested everything, and I was back up and running. I successfully added an Auth Profile via Code and browser and then was once again able to execute pac commands in terminal.

anastaciaeg avatar Feb 17 '23 19:02 anastaciaeg