You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear,
I am running into an error on an on-premise instance of Azure DevOps 2019. The same extension installed on an online organization, is working fine.
This the source code (typescript): const navigationService = await SDK.getService<IWorkItemFormNavigationService>(WorkItemTrackingServiceIds.WorkItemFormNavigationService); if (typeof navigationService != 'undefined' && navigationService != null) { navigationService.openWorkItem(id, false); } else { throw new Error("Could not load WorkItemFormNavigationService from the SDK"); }
It is failing on the call to .getService() with the following message:
`
message: "No contribution provider or uri for ms.vss-work-web.work-item-form-navigation-service."
I have found a temporary workaround that works (but not as nice as it should) const commonNavigationService = await SDK.getService<IHostNavigationService>(CommonServiceIds.HostNavigationService); if (typeof commonNavigationService != 'undefined' && commonNavigationService != null) { console.warn("Could not load WorkItemFormNavigationService from the SDK. Workaround applied.") commonNavigationService.navigate(editUrl); } else { throw new Error("Could not load HostNavigationService from the SDK"); }
Can someone please take a look?
Thanks in advance.
Kr.
Edward Trouw
The text was updated successfully, but these errors were encountered:
Dear,
I am running into an error on an on-premise instance of Azure DevOps 2019. The same extension installed on an online organization, is working fine.
This the source code (typescript):
const navigationService = await SDK.getService<IWorkItemFormNavigationService>(WorkItemTrackingServiceIds.WorkItemFormNavigationService); if (typeof navigationService != 'undefined' && navigationService != null) { navigationService.openWorkItem(id, false); } else { throw new Error("Could not load WorkItemFormNavigationService from the SDK"); }
It is failing on the call to .getService() with the following message:
`
message: "No contribution provider or uri for ms.vss-work-web.work-item-form-navigation-service."
stack: "Error: No contribution provider or uri for ms.vss-work-web.work-item-form-navigation-service.
at t.getBackgroundHost (https://myserver.be/tfs/_static/_ext/ms.vss-web/ext-content/ms.vss-web.ext-content.luCfz4YwcHM3_pJR.min.js:1:19120)
at t.getService (https://myserver.be/tfs/_static/_ext/ms.vss-web/ext-content/ms.vss-web.ext-content.luCfz4YwcHM3_pJR.min.js:1:18834)
at https://myserver.be/tfs/_static/_ext/ms.vss-web/platform-content/ms.vss-web.platform-content.xjg1YXj9NZN2H2LQ.min.js:1:21067"
`
I have found a temporary workaround that works (but not as nice as it should)
const commonNavigationService = await SDK.getService<IHostNavigationService>(CommonServiceIds.HostNavigationService); if (typeof commonNavigationService != 'undefined' && commonNavigationService != null) { console.warn("Could not load WorkItemFormNavigationService from the SDK. Workaround applied.") commonNavigationService.navigate(editUrl); } else { throw new Error("Could not load HostNavigationService from the SDK"); }
Can someone please take a look?
Thanks in advance.
Kr.
Edward Trouw
The text was updated successfully, but these errors were encountered: