You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Office Add-in侧加载失败及SSL错误问题求助

侧加载Office Add-in时的加载失败与SvelteKit配置问题

错误现象

侧加载Office Add-in时出现「...加载项未加载...」错误,启用调试后日志显示:

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

  • 该错误仅每日首次加载时出现,后续加载不再显示
  • 当前清单文件已无taskpane.html相关引用,但日志仍输出该信息

已执行office-addin-manifest validate ./manifests/manifest.xml验证清单,结果显示正常。清单内容如下:

<?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>

环境对比与关联问题

  • 使用Yeoman生成器+Webpack创建的默认加载项可正常加载
  • GitHub上的Office Add-in Svelte模板可正常加载
  • 新建极简SvelteKit项目时,网站本身可正常访问,但Office Add-in在Word中加载失败

尝试通过HTTPS访问localhost:3000时出现以下错误,推测与加载失败相关:

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

需求

希望使用SvelteKit匹配现有站点,复用已开发组件,同时利用其服务器端预加载数据的能力。已知有其他用户成功实现,寻求技术指导。

内容的提问来源于stack exchange,提问作者Justin Greywolf

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.15 14:57:14