Search code examples
outlookoffice-jsoutlook-addinoffice-addinsoutlook-web-addins

Outlook add-in Manifest can open taskapane on desktop but can't open taskpane on Outlook for the Web


I'm currently developing an outlook add-in for my company. I have designed a manifest and tested it mostly on desktop, but web tests were made. Currently I cannot open taskpane one the outlook web anymore and no error, debug or other log file is avaliable. Below is an example manifest, it load normally when sideloaded to Outlook Desktop and can open taskpane but on outlook web it loads, becames avaliable on app list but can't open taskpane, no error is given. I tried loading it via office-addin-debugging and adding it manually via https://aka.ms/olksideload both with the same result.

No relevant console information is printed on browser.

Does anyone know the problem or a workaround? or a way for debugging it?

here is the add-in on desktop

screenshot of the taskpane with the example webpage loaded on outlook desktop

here is the same add-in on web

screenchot depicting outlook web add-in tray with the example add-in loaded

Here is a reproducible example

<?xml version="1.0" encoding="utf-8"?>
<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:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" xsi:type="MailApp">
  <Id>666540ce-167f-11ee-be56-0242ac120666</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>Contoso</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="Contoso Add-in"/>
  <Description DefaultValue="An Outlook add-in template to get started."/>
  <IconUrl DefaultValue="https://script-lab.azureedge.net/assets/images/icon-64.png" />
  <HighResolutionIconUrl DefaultValue="https://script-lab.azureedge.net/assets/images/icon-128.png" />
  <SupportUrl DefaultValue="https://www.york.ac.uk/teaching/cws/wws/webpage1.html" />
  <Hosts>
    <Host Name="Mailbox" />
  </Hosts>
  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.1" />
    </Sets>
  </Requirements>
    <FormSettings>
        <Form xsi:type="ItemRead">
            <DesktopSettings>
                <SourceLocation DefaultValue="https://www.york.ac.uk/teaching/cws/wws/webpage1.html" />
                <RequestedHeight>450</RequestedHeight>
            </DesktopSettings>
            <TabletSettings>
                <SourceLocation DefaultValue="https://www.york.ac.uk/teaching/cws/wws/webpage1.html" />
                <RequestedHeight>450</RequestedHeight>
            </TabletSettings>
            <PhoneSettings>
                <SourceLocation DefaultValue="https://www.york.ac.uk/teaching/cws/wws/webpage1.html" />
            </PhoneSettings>
        </Form>
        <Form xsi:type="ItemEdit">
            <DesktopSettings>
                <SourceLocation DefaultValue="https://www.york.ac.uk/teaching/cws/wws/webpage1.html" />
            </DesktopSettings>
            <TabletSettings>
                <SourceLocation DefaultValue="https://www.york.ac.uk/teaching/cws/wws/webpage1.html" />
            </TabletSettings>
            <PhoneSettings>
                <SourceLocation DefaultValue="https://www.york.ac.uk/teaching/cws/wws/webpage1.html" />
            </PhoneSettings>
        </Form>
    </FormSettings>
  <Permissions>ReadWriteItem</Permissions>
  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="ReadOrEdit" />
  </Rule>
  <DisableEntityHighlighting>false</DisableEntityHighlighting>
  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
    <!-- <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1"> -->
    <Requirements>
      <bt:Sets DefaultMinVersion="1.4">
        <bt:Set Name="Mailbox"/>
      </bt:Sets>
    </Requirements>
    <Hosts>
      <Host xsi:type="MailHost">
        <DesktopFormFactor>
          <ExtensionPoint xsi:type="MessageComposeCommandSurface">
            <CustomTab id="File.Tab2">
              <Group id="msgComposeGroup">
                <Label resid="GroupLabel" />
                <Control xsi:type="Button" id="composeButton">
                  <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">
                    <SourceLocation resid="Taskpane.Url" />
                    <!-- Enables your add-in to activate without the Reading Pane enabled or a message selected. -->
                    <!-- <SupportsNoItemContext>true</SupportsNoItemContext> -->
                  </Action>
                </Control>
              </Group>
              <Label resid="GroupLabel" />
            </CustomTab>
                    </ExtensionPoint>

          <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <CustomTab id="File.Tab">
              <Group id="msgReadGroup">
                <Label resid="GroupLabel" />
                <Control xsi:type="Button" id="msgReadOpenPaneButton">
                  <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">
                    <SourceLocation resid="Taskpane.Url" />
                    <!-- Enables your add-in to activate without the Reading Pane enabled or a message selected. -->
                    <!-- <SupportsNoItemContext>true</SupportsNoItemContext> -->
                  </Action>
                </Control>
              </Group>
              <Label resid="GroupLabel" />
            </CustomTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>
    <Resources>
      <bt:Images>
        <bt:Image id="Icon.16x16" DefaultValue="https://script-lab.azureedge.net/assets/images/icon-16.png"/>
        <bt:Image id="Icon.32x32" DefaultValue="https://script-lab.azureedge.net/assets/images/icon-32.png"/>
        <bt:Image id="Icon.80x80" DefaultValue="https://script-lab.azureedge.net/assets/images/icon-64.png"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Taskpane.Url" DefaultValue="https://www.york.ac.uk/teaching/cws/wws/webpage1.html" />
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="GroupLabel" DefaultValue="Contoso"/>
        <bt:String id="TaskpaneButton.Label" DefaultValue="Open Taskpane"/>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Open a taskpane to show a webpage."/>
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
</OfficeApp>

office-addin-manifest validate output


Based on the requirements specified in your manifest, your add-in can run on the following platforms; your add-in will be tested on these platforms when you submit it to the Office Store:
  - Outlook 2013 or later on Windows
  - Outlook 2016 or later on Windows
  - Outlook 2019 or later on Windows
  - Outlook 2013 or later on Mac
  - Outlook 2016 or later on Mac
  - Outlook 2019 or later on Mac
  - Outlook on the web
  - Outlook on Windows (Microsoft 365)
  - Outlook on Mac (Microsoft 365)
Important: This analysis is based on the requirements specified in your manifest and does not account for any runtime JavaScript calls within your add-in. For information about which API sets and features are supported on each platform, see Office Add-in host and platform availability. (https://docs.microsoft.com/office/dev/add-ins/overview/office-add-in-availability).

*This does not include mobile apps. You can opt-in to support mobile apps when you submit your add-in.

The manifest is valid.

Solution

  • I created a new add-in as suggested and compared with mine. I have done the following things and the problem was solved:

    • copied the new generated commands html and ts file to my project.
    • updated office-addin-debugging to the new major version.

    I have done some other alterations but rollbacking any but those two seem to make the taskpane still be able to be opened, what makes me think those are the problem solvers.

    In more detailes the code that seems to have solved the issue is the following line on the end of the Commands script that was missing on my old generated file (I have not changed the commands script since it's generation a year or so ago):

    // Register the function with Office.
    Office.actions.associate('action', action);
    

    If there is anything I'm missing please just comment and will edit.

    If you are having similar problems and these was not sufficient please comment and I will try to troubleshoot further.