microsoft / AzureAISpeechToolKit

MIT License
0 stars 0 forks source link

Fail to configure speech resource: Error: [UserError] failToFindSubscription #33

Open randriksen opened 1 week ago

randriksen commented 1 week ago

Getting this error: Fail to configure speech resource: Error: [UserError] failToFindSubscription When trying to configure speech resource.

Not really sure why.

dilin-MS2 commented 1 week ago

Hi @randriksen , this usually happens when user accidentally cancel the process when extension tries to fetch subscription list. This process sometimes can be slow, we have a processing bar indicating 'Fetching Azure subscriptions...' Please wait a while for the list retrival. If you haven't interact the process but still see this error, please list your reproduce steps. Thanks!

Besides, which extensionn version are you using?

randriksen commented 1 week ago

It fails at the Fetching Azure subscriptions almost instantly. I sign in, and try to configure speech resources, and then it just fails. I have speech resources configured in Azure, i have contributor access to a subscription. And when testing with PowerShell i can see 3 different subscriptions. I can give you a screen recording if you want, but i don't feel like posting it here since you can see my username in the sign-in pulldown. The extension version I'm using is v0.0.4.

I have a feeling this has something to do with rights, but I'm not completely sure.

dilin-MS2 commented 1 week ago

Hi @randriksen , can you see subscriptions listed in the extension speech resource tree view after logged in? Image

You don't need to use a recording. Simply list down the reproduce steps, maybe with some screenshot to help illustrate. You can blur any secrets or private info in the pictures.

randriksen commented 1 week ago

resources doesn't show anything interesting: Image

steps to reproduce: sign in: Image allow: Image choose correct account in dropdown: Image

and then it fails: Image it fails in less than 3 seconds.

Edit: formating

dilin-MS2 commented 1 week ago

Thanks for the detailed steps. There seems to be some issue fetching your subscription list. How many tenants does your account have? When you go to Azure portal and log in your account, how many subscriptions are listed under your default tenant (directory)?

Also, could you toggle VS Code developer Tools by "Help -> Toggle Developer Tools" and check whether there is any error message in the pop up window when you tries to fetch the subscription list?

randriksen commented 1 week ago

So, My account is tied to 2 tenants. In the default tenant I see 3 subscriptions in the azure portal, but i only have rights to do anything into one of them. In the other tenant it's just a guest user for teams access.

This is what i get in the developer console:

@ | event.ts:1278 -- | --   | addNotification | @ | notifications.ts:228   | notify | @ | notificationService.ts:253   | (anonymous) | @ | mainThreadMessageService.ts:86   | f | @ | mainThreadMessageService.ts:51   | $showMessage | @ | mainThreadMessageService.ts:45   | S | @ | rpcProtocol.ts:458   | Q | @ | rpcProtocol.ts:443   | M | @ | rpcProtocol.ts:373   | L | @ | rpcProtocol.ts:299   | (anonymous) | @ | rpcProtocol.ts:161   | B | @ | event.ts:1243   | fire | @ | event.ts:1274   | fire | @ | ipc.net.ts:652   | l.onmessage | @ | localProcessExtensionHost.ts:378

Can't find a proper error about anything dealing with the subscription or extension

randriksen commented 1 week ago

I saw that there was a new version of the extension out, so I've now updated to v0.0.5 It now gives a different error: Fail to configure speech resource: Error: SelectSubscriptionError

This is what's in the developer console:

B | @ | event.ts:1243 -- | -- | --   | C | @ | event.ts:1254   | fire | @ | event.ts:1278   | addNotification | @ | notifications.ts:228   | notify | @ | notificationService.ts:253   | (anonymous) | @ | mainThreadMessageService.ts:86   | f | @ | mainThreadMessageService.ts:51   | $showMessage | @ | mainThreadMessageService.ts:45   | S | @ | rpcProtocol.ts:458   | Q | @ | rpcProtocol.ts:443   | M | @ | rpcProtocol.ts:373   | L | @ | rpcProtocol.ts:299   | (anonymous) | @ | rpcProtocol.ts:161   | B | @ | event.ts:1243   | fire | @ | event.ts:1274   | fire | @ | ipc.net.ts:652   | l.onmessage | @ | localProcessExtensionHost.ts:378
BinarywoodB commented 1 week ago

Hi @randriksen , can you check on azure portal that your account has switch to the tenant with feasible subscription, and also set the startup directory to the same tenant? Image

We will have a new release these days, hopefully the new release can resolve your issue. Stay tuned.

randriksen commented 6 days ago

I've made sure the startup directory is the correct one, and that the correct tenant is selected as current. There's no difference in the behavior. I don't think the problem is connected to the tenant, but rather somehow the subscription

dilin-MS2 commented 6 days ago

Hi @randriksen Please try the latest v0.0.6 to see if that resolves your issue. Thanks!

randriksen commented 3 days ago

No difference on v0.0.6

randriksen commented 2 days ago

No better in v0.0.7 either. Is there some way to get better error messages? It would be really nice to debug this.

dilin-MS2 commented 2 days ago

Hi @randriksen , thank you for actively trying out this extension - really appreciate it!

A more detailed error message is on our backlog and will be included in a future release. Until then, we’ll need to use other methods to understand what’s happening.

  1. SelectSubscriptionError and failToFindSubscription indicate different error scenarios:

    • SelectSubscriptionError: This occurs when the login is unsuccessful.
    • failToFindSubscription: This occurs when login is successful, but the extension, using the VS Code session credentials, retrieves an empty list of subscriptions for your account. If you’re logged into an Azure account where the default tenant has accessible subscriptions, the extension should be able to fetch them accordingly.

    With the current v0.0.6 extension, are you consistently seeing only the SelectSubscriptionError error? Also, what’s the account status in the VS Code account center? Image

  2. The log you pasted for "Help -> Toggle Developer Tools" seems not what I am expected:

    Image

  3. Is this how the resource tree view look like after you get the error message? Image

randriksen commented 1 day ago
  1. The error is Fail to configure speech resource: Error: [UserError] failToFindSubscription Image And this is what the account center looks like: Image

  2. This is how the developer console looks after i try to configure a speech resource. Image

  3. Yes. That's what the resource tree looks like. Image

dilin-MS2 commented 1 day ago

I notice that you have several account signed in. Could you try log out all accounts and sign in only the one that you would like to interact with Azure AI Speech Toolkit extension?

randriksen commented 18 hours ago

That seems to have helped :) But it's a bit impractical not to be able to use copilot at the same time.

dilin-MS2 commented 13 hours ago

Good to know we found a way to unblock your process.

The extension should allow you to log in to both your GitHub account (for Copilot) and your Microsoft Azure account simultaneously. You can log in to one Azure account and possibly multiple GitHub accounts without issue. However, using more than one Azure account hasn't been tested. This might explain the issue with fetching subscriptions—it's possible that the VS Code session is using the credentials from a different Azure account, leading to a failure in retrieving the subscription list.

dilin-MS2 commented 13 hours ago

@randriksen Where do you find a entry point to login 2 Microsoft Azure accounts, please? Let me see whether we can do something to cover this multi-azure-accounts cases.