You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

添加MobileFormFactor标签后Outlook加载项侧载失败的问题求助

添加MobileFormFactor标签后Outlook加载项侧载失败的问题求助

问题背景

我正在开发一个跨Web、桌面和移动端的轻量Outlook加载项,核心功能是提取邮件信息并关联到Claude.ai。目前用ngrok把本地开发服务暴露到公网,用npx office-addin-manifest validate验证manifest.xml完全通过,但只要在版本覆盖配置里加入<MobileFormFactor>块,侧载到Outlook Web时就直接失败——移除这个标签后,侧载和功能都完全正常。

错误信息

Outlook Web端提示

Installation Failed: Object reference not set to an instance of an object

命令行侧载日志

--Error sideloading!--  
Error: Error: Command failed: npx -p @microsoft/m365agentstoolkit-cli atk install --xml-path "D:\\DynamicsProjects\\EmailInfoExtractorInOutlook\\manifest.xml" --interactive false  
(×) Error: M365.PackageServiceError: Request failed with status code 400 (tracingId: 00-bdaf9c304a1e48c68d6ca30f195ff7aa-3c659f215a583bf6-01) BadRequest: Sideloading rejected by Exchange  
STDERR:  
(×) Error: M365.PackageServiceError: Request failed with status code 400 (tracingId: 00-bdaf9c304a1e48c68d6ca30f195ff7aa-3c659f215a583bf6-01) BadRequest: Sideloading rejected by Exchange  
Error: Unable to start debugging.  
Error: Unable to sideload the Office Add-in.  
Error: Command failed: npx -p @microsoft/m365agentstoolkit-cli atk install --xml-path "D:\\DynamicsProjects\\EmailInfoExtractorInOutlook\\manifest.xml" --interactive false  
(×) Error: M365.PackageServiceError: Request failed with status code 400 (tracingId: 00-bdaf9c304a1e48c68d6ca30f195ff7aa-3c659f215a583bf6-01) BadRequest: Sideloading rejected by Exchange

我的MobileFormFactor配置代码

<!-- VersionOverrides for mobile (v1.1) -->
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
  <Requirements>
    <bt:Sets DefaultMinVersion="1.5">
      <bt:Set Name="Mailbox"/>
    </bt:Sets>
  </Requirements>

  <Hosts>
    <Host xsi:type="MailHost">
      <MobileFormFactor>
        <FunctionFile resid="Commands.Url"/>

        <ExtensionPoint xsi:type="MobileMessageReadCommandSurface">
          <Group id="mobileMsgReadGroup">
            <Label resid="GroupLabel"/>

            <Control xsi:type="MobileButton" id="MobileOpenPaneButton">
              <Label resid="TaskpaneButton.Label"/>
              <Icon>
                <bt:Image resid="Icon.25x25" size="25" scale="1"/>
                <bt:Image resid="Icon.25x25" size="25" scale="2"/>
                <bt:Image resid="Icon.25x25" size="25" scale="3"/>
                <bt:Image resid="Icon.32x32" size="32" scale="1"/>
                <bt:Image resid="Icon.32x32" size="32" scale="2"/>
                <bt:Image resid="Icon.32x32" size="32" scale="3"/>
                <bt:Image resid="Icon.48x48" size="48" scale="1"/>
                <bt:Image resid="Icon.48x48" size="48" scale="2"/>
                <bt:Image resid="Icon.48x48" size="48" scale="3"/>
              </Icon>
              <Action xsi:type="ShowTaskpane">
                <SourceLocation resid="Taskpane.Url"/>
              </Action>
            </Control>
          </Group>
        </ExtensionPoint>
      </MobileFormFactor>
    </Host>
  </Hosts>

  <Resources>
    <bt:Images>
      <bt:Image id="Icon.25x25" DefaultValue="https://luculent-nonnocturnally-louis.ngrok-free.dev/assets/icon-32.png"/>
      <bt:Image id="Icon.32x32" DefaultValue="https://luculent-nonnocturnally-louis.ngrok-free.dev/assets/icon-32.png"/>
      <bt:Image id="Icon.48x48" DefaultValue="https://luculent-nonnocturnally-louis.ngrok-free.dev/assets/icon-64.png"/>
    </bt:Images>

    <bt:Urls>
      <bt:Url id="Commands.Url" DefaultValue="https://luculent-nonnocturnally-louis.ngrok-free.dev/commands.html"/>
      <bt:Url id="Taskpane.Url" DefaultValue="https://luculent-nonnocturnally-louis.ngrok-free.dev/taskpane.html"/>
    </bt:Urls>

    <bt:ShortStrings>
      <bt:String id="GroupLabel" DefaultValue="Email Info Extractor"/>
      <bt:String id="TaskpaneButton.Label" DefaultValue="Show Email Info"/>
    </bt:ShortStrings>

    <bt:LongStrings>
      <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Opens a pane displaying email information"/>
    </bt:LongStrings>
  </Resources>
</VersionOverrides>

已做的排查

  • 确认ngrok服务正常,所有图标、页面资源都能直接访问
  • 用官方验证工具检查manifest,没有任何语法或配置错误
  • 移除MobileFormFactor块后,侧载流程完全顺畅,加载项功能正常

求助点

有没有大佬遇到过类似的情况?或者能帮我看看MobileFormFactor的配置哪里可能踩坑了?实在搞不懂为什么验证通过但侧载会被Exchange拒绝,麻烦大家帮忙看看,谢谢!

火山引擎 最新活动