fix: resolve Invalid id in Terminal add in still installed error#968
fix: resolve Invalid id in Terminal add in still installed error#968archiesaxenaa wants to merge 1 commit intoOfficeDev:masterfrom
Conversation
millerds
left a comment
There was a problem hiding this comment.
The titleId was used because originally that was the only way to remove an add-in. That id had to be stored in the registry to use later when removing the add-in. Using the manifestId was added later when that support got added added to the ttk cli but left the titleId usage in place, so both were supported.
It seems odd to me the declarative agents need a different prefix and that this new prefix is not supported by the cli. Seems like the bug is with the cli needing support for the new prefix. Granted, the scripts code would still need to be updated because it's looking for a specific prefix, but it becomes a simpler change (potentially just updating the one regex to look for both prefixes). If the cli is not going to be updated, then this script should be updated based on the general plans for the cli.
Bottom line, we shouldn't be trying to special case each prefix. We should be making changes that are future proof the scripts code to work with add-ins generally and avoid examining values to determine what to do. Maybe that means becoming titleId type agnostic, or maybe that means always using manifestId (if that is the broadly accepted way of identifying an add-in). Examining the value is too fragile.
Root Cause
T_prefix (vs.U_for traditional Office add-ins)T_prefixatk uninstall --mode title-iddoesn't supportT_IDs (30s timeout)Solution
T_prefix title IDsT_prefix to extract the manifest GUID--mode manifest-idinstead of--mode title-idfor uninstallU_IDs continue using--mode title-id(existing behavior)Changes
uninstallWithTeams()inpackages/office-addin-dev-settings/src/publish.tsT_andU_prefixesT_<guid>→--mode manifest-id --manifest-id <guid>Validation/testing performed:
Local Testing done via
npm link.Stop command now works for DA projects without errors or timeouts. Clean add-in un-installation when office app is closed and debug is stopped.