vscode-azureappservice
vscode-azureappservice copied to clipboard
Getting Internal Error: 'branchDataProvider.getResourceItem' threw exception message for all webapps
My org has multiple subscriptions, and when I view the web apps, all but one of those, show me what I want to see. There is one subscription that no matter which web app I select, I get this error in VSCODE:
Internal Error: 'branchDataProvider.getResourceItem' threw exception Cannot read properties of undefined (reading 'contextValuesToAdd')
And in the notifications window I a get a pop up for every web app:
Internal error: Expected value to be neither null nor undefined: id
At first I thought this was something at the permissions level of each subscription but for resources I don't have access to, I see a proper error message about my permissions. Any insights would be great.
Here are my VS-code specs:
Version: 1.81.1 (Universal)
Commit: 6c3e3dba23e8fadc360aed75ce363ba185c49794
Date: 2023-08-09T22:20:33.924Z
Electron: 22.3.18
ElectronBuildId: 22689846
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Darwin arm64 22.3.0
Azure App Service v0.25.0
Are you able to access these same resources through the portal with no issues? We suspect it may still be some variation of a permissions issue
Hi @MicroFish91 ,
Yes and no. Some things I can see (in the Portal), the like Overview page and all the fields, but things like Application Configuration tells me I'm not authorized. I would hope to see that same error message being passed on to the extension.
To give some more info, our Global Admin tried this and he too does not have access, and he has access to everything. Is there anything I can do to get more debugging info?
Thank you for your update!
Some things I can see (in the Portal), the like Overview page and all the fields, but things like Application Configuration tells me I'm not authorized.
To give some more info, our Global Admin tried this and he too does not have access, and he has access to everything
For your Global Admin, was this access issue tested/discovered using the Portal?
If so, any resource access issues would need to be resolved outside of the extension level. I'm not sure on the best place to raise a ticket, but perhaps the Help and Support center in the portal would be a good starting point:
Is there anything I can do to get more debugging info?
Unfortunately, we will need to update the extension(s) to improve the error messaging/logging first.
Since it seems that the web app GET request is failing for some reason... by chance could you try seeing what happens when you perform a similar request with another client like the Azure CLI? This command could be a good one to try, maybe it will help us understand if the issue is reproducing elsewhere: az webapp config show.
I think that the root of this is issue is that when we do the list ARM call to retrieve all the web apps, some of the web apps have the id return as null. This is causing issues when we try to build the tree node and throws the error in this issue.
As to why the list ARM call does this, I have no idea. We may be able to circumvent this by trying specifically get this resource if we see that any id's are null as a workaround, but this is a bandaid for something that should be probably fixed at the service level.
@nturinski Is there any way we can get the full stack trace of the exception? or debug (which extension) to pinpoint the property caused the exception?
We also ran into the issue and noticed that a warning message 'vscode using default string since no string found in i18n bundle' would appear in the output of Extension Host.