Reputation: 847
I am having an issue with my office add-in. When I try to sideload it I am getting the "...add in did not load..." error message.
I enabled debugging, and in the log I see:
Unexpected Manifest Issue encountered while parsing manifest, add-in ID : bdb87fae-106b-4eb5-909b-a1075076d14d, Location : Error at element "DefaultValue" : URL has unsupported protocol: taskpane.html, Line=26, CharPosition=38
(added 07/24) -
(FYI - that error message only appears once "per day" - the first time I try to laod add-in, and then after subsequent load attempts it does not come back. manifest file no longer has any reference to taskpane.html, but that still shows in log)
I have validated the manifest ("office-addin-manifest validate ./manifests/manifest.xml"), and it seems to be correct.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="TaskPaneApp">
<Id>e1813867-194d-4c0f-86a8-303b4ef6c4fe</Id>
<Version>1.0.0.0</Version>
... <snipped for brevity> ...
<Hosts>
<Host Name="Document"/>
</Hosts>
<DefaultSettings>
<SourceLocation DefaultValue="https://localhost:3000/office/taskpane.htm"/>
</DefaultSettings>
<Permissions>ReadWriteDocument</Permissions>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<Hosts>
<Host xsi:type="Document">
<DesktopFormFactor>
<FunctionFile resid="Commands.Url" />
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<OfficeTab id="TabHome">
<Group id="CommandsGroup">
<Label resid="CommandsGroup.Label" />
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
<bt:Image size="32" resid="Icon.32x32" />
<bt:Image size="80" resid="Icon.80x80" />
</Icon>
<Control xsi:type="Button" id="TaskpaneButton">
<Label resid="TaskpaneButton.Label" />
<Supertip>
<Title resid="TaskpaneButton.Label" />
<Description resid="TaskpaneButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
<bt:Image size="32" resid="Icon.32x32" />
<bt:Image size="80" resid="Icon.80x80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<TaskpaneId>ButtonId1</TaskpaneId>
<SourceLocation resid="Taskpane.Url" />
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://localhost:3000/assets/icon-16.png"/>
<bt:Image id="Icon.32x32" DefaultValue="https://localhost:3000/assets/icon-32.png"/>
<bt:Image id="Icon.80x80" DefaultValue="https://localhost:3000/assets/icon-80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="Commands.Url" DefaultValue="https://localhost:3000/office/commands.htm"/>
<bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/office/taskpane.htm"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="CommandsGroup.Label" DefaultValue="Mermaid Chart"/>
<bt:String id="TaskpaneButton.Label" DefaultValue="Show Taskpane"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Click to Show Taskpane"/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</OfficeApp>
------ edit (added 07/24) -:
I have created a default add-in using yeoman generator and webpack, and am able to load the add-in fine.
I have tried using an office add-in svelte template from github, and that seems to load fine.
However, when creating a brand new sveltekit site, with minimal code, I will get this failed to load add-in error. The website itself loads fine, but add-in fails to load in Word.
In trying to navigate to the localhost using https explicitly, I see this, which I think may be part of the issue?:
Secure Connection Failed
An error occurred during a connection to localhost:3000. SSL received a record that exceeded the maximum permissible length.
Error code: SSL_ERROR_RX_RECORD_TOO_LONG
Can anyone provide some guidance here?
I want to use sveltekit to match our site, and take advantage of components that we have already written for some of the funcitonality (I also want to take advantage of loading some data on server side before render. I have seen from at least two other people that are using sveltekit ok, so it seems like it is possible
Upvotes: 0
Views: 719
Reputation: 49455
The problematic line of code is listed below:
<SourceLocation DefaultValue="https://localhost:3000/office/taskpane.htm"/>
From the first sight it looks good which confirms the validation process. It makes sense try to open any web browser and navigate to that URL to check whether the specified URL is valid.
In that case you need to check the file which you are using to sideload the add-in. Webpack (if used) can transpile your files, so you may get URL changed according to the settings in your solution.
Upvotes: 0