问题
I am developing an Azure DevOps extension and I keep seeing the below error in my console. I am quite confused because the extension itself has no issues access all the API endpoints I need and nowhere else in the program do I get errors. I am frankly not even sure which of the azure devops npm dependencies I have is the issue. I presume its in the internal auth for the sdk.
ms.vss-web.platform-content.es6.PRFIe__3y_bOOZcQR.min.js:1 No permissions found for security namespace '2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87' and token 'repoV2/f2613275-db5d-4cbb-95c8-00ba53f76641/cd200cef-44c7-4839-8f93-57c6a0979eaa/'. Ensure that the effective permissions are included in shared data.
handleMissingState @ ms.vss-web.platform-content.es6.PRFIe__3y_bOOZcQR.min.js:1
hasPermission @ ms.vss-web.platform-content.es6.PRFIe__3y_bOOZcQR.min.js:1
hasPermission @ ms.vss-code-web.repos-common.es6.IVnGfEDL4locZJoF.min.js:1
o @ ms.vss-code-web.repo-dropdown.es6.YGhYtNfEnTm__X8z4.min.js:1
wt @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
rn @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
sn @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
Yn @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
$n @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
sr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
lr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
rr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
Xn @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
hr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
yr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
wr.render @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
(anonymous) @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
pr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
xr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
render @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
renderPage @ ms.vss-web.platform-content.es6.PRFIe__3y_bOOZcQR.min.js:1
(anonymous) @ ms.vss-web.platform-content.es6.PRFIe__3y_bOOZcQR.min.js:1
notify @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
set value @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
(anonymous) @ ms.vss-web.platform-content.es6.PRFIe__3y_bOOZcQR.min.js:1
ms.vss-web.platform-content.es6.PRFIe__3y_bOOZcQR.min.js:1 No permissions found for security namespace '2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87' and token 'repoV2/f2613275-db5d-4cbb-95c8-00ba53f76641/cd200cef-44c7-4839-8f93-57c6a0979eaa/'. Ensure that the effective permissions are included in shared data.
handleMissingState @ ms.vss-web.platform-content.es6.PRFIe__3y_bOOZcQR.min.js:1
hasPermission @ ms.vss-web.platform-content.es6.PRFIe__3y_bOOZcQR.min.js:1
hasPermission @ ms.vss-code-web.repos-common.es6.IVnGfEDL4locZJoF.min.js:1
o @ ms.vss-code-web.repo-dropdown.es6.YGhYtNfEnTm__X8z4.min.js:1
wt @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
rn @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
sn @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
Yn @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
$n @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
sr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
lr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
rr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
Xn @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
hr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
yr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
wr.render @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
(anonymous) @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
pr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
xr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
render @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
renderPage @ ms.vss-web.platform-content.es6.PRFIe__3y_bOOZcQR.min.js:1
(anonymous) @ ms.vss-web.platform-content.es6.PRFIe__3y_bOOZcQR.min.js:1
notify @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
set value @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
(anonymous) @ ms.vss-web.platform-content.es6.PRFIe__3y_bOOZcQR.min.js:1
ms.vss-web.platform-content.es6.PRFIe__3y_bOOZcQR.min.js:1 No permissions found for security namespace '2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87' and token 'repoV2/f2613275-db5d-4cbb-95c8-00ba53f76641/cd200cef-44c7-4839-8f93-57c6a0979eaa/'. Ensure that the effective permissions are included in shared data.
handleMissingState @ ms.vss-web.platform-content.es6.PRFIe__3y_bOOZcQR.min.js:1
hasPermission @ ms.vss-web.platform-content.es6.PRFIe__3y_bOOZcQR.min.js:1
hasPermission @ ms.vss-code-web.repos-common.es6.IVnGfEDL4locZJoF.min.js:1
o @ ms.vss-code-web.repo-dropdown.es6.YGhYtNfEnTm__X8z4.min.js:1
wt @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
rn @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
sn @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
Yn @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
$n @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
sr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
lr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
rr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
Xn @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
hr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
yr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
wr.render @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
(anonymous) @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
pr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
xr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
render @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
renderPage @ ms.vss-web.platform-content.es6.PRFIe__3y_bOOZcQR.min.js:1
(anonymous) @ ms.vss-web.platform-content.es6.PRFIe__3y_bOOZcQR.min.js:1
notify @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
set value @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
(anonymous) @ ms.vss-web.platform-content.es6.PRFIe__3y_bOOZcQR.min.js:1
ms.vss-web.platform-content.es6.PRFIe__3y_bOOZcQR.min.js:1 No permissions found for security namespace '2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87' and token 'repoV2/f2613275-db5d-4cbb-95c8-00ba53f76641/cd200cef-44c7-4839-8f93-57c6a0979eaa/'. Ensure that the effective permissions are included in shared data.
handleMissingState @ ms.vss-web.platform-content.es6.PRFIe__3y_bOOZcQR.min.js:1
hasPermission @ ms.vss-web.platform-content.es6.PRFIe__3y_bOOZcQR.min.js:1
hasPermission @ ms.vss-code-web.repos-common.es6.IVnGfEDL4locZJoF.min.js:1
o @ ms.vss-code-web.repo-dropdown.es6.YGhYtNfEnTm__X8z4.min.js:1
wt @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
rn @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
sn @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
Yn @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
$n @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
sr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
lr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
rr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
Xn @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
hr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
yr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
wr.render @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
(anonymous) @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
pr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
xr @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
render @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
renderPage @ ms.vss-web.platform-content.es6.PRFIe__3y_bOOZcQR.min.js:1
(anonymous) @ ms.vss-web.platform-content.es6.PRFIe__3y_bOOZcQR.min.js:1
notify @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
set value @ ms.vss-web.core-content.es6.h5KNnhyJXjqXbn7t.min.js:1
(anonymous) @ ms.vss-web.platform-content.es6.PRFIe__3y_bOOZcQR.min.js:1
回答1:
I encountered a similar error when creating a test web extension following the tutorial from Microsoft site. After investigating i found the security namespace is Git Repositories, check here for more information.
And i found only if i the targets for my extension targeted azure repository as below. The error will show up in my console.
However my extension is not affected and still functioning. You can just try publishing your extension and have a try. "
targets": [
"ms.vss-code-web.code-hub-group"
],
I confirmed that the permissions are all set and correct. I reported an issue here. You can go vote it up and track it on.
来源:https://stackoverflow.com/questions/58776335/console-error-regarding-permissions-for-ms-vss-web-platform