OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
670 stars 96 forks source link

Outlook Add-in does not stay installed and does not appear on the ribbon in Office for Mac #4196

Open carlosknowee opened 6 months ago

carlosknowee commented 6 months ago

Provide required information needed to triage your issue

Your Environment

Expected behavior

After installing the add-in from the Get Apps modal in Outlook for Mac, it should remain installed and visible in the ribbon when composing a new mail, opening the taskpane when the button is clicked and successfully executing the onNewMessageCompose event (the first time it should show a notification to configure the add-in). This behaviour works correctly on other platforms.

Current behavior

After installing the add-in by selecting the manifest.xml in Outlook for Mac, it appears correctly installed. However, when closing the modal, the add-in does not appear in the ribbon and does not execute with the onNewMessageCompose event. When you reopen the application modal, the add-in no longer appears as installed.

Steps to reproduce

  1. Open Outlook for Mac and go to Get Apps.
  2. Install the add-in by selecting the manifest.xml file.
  3. Confirm that the add-in appears in the installed applications and then close the modal.
  4. Note that the add-in does not appear in the ribbon and does not execute with the onNewMessageCompose event.
  5. Reopen the applications modal and note that the add-in no longer appears as installed.

Link to live example(s)

I provide a link to the manifest.xml for review and testing purposes: manifest.xml.

Additionally, a screencast documenting the observed problem, as reported by Appsource reviewers, is available at the following link: Mac Issue.mp4.

Context

This issue prevents Mac users from being able to use my Outlook add-in, significantly limiting its availability and functionality within the Office ecosystem. This impediment is a critical obstacle to publishing my add-in on Appsource, affecting accessibility for our clients.

Useful logs

ajays-msft commented 6 months ago

@carlosknowee - For now can you workaround the issue by using Outlook Web to sideload the addin? You can sideload by typing aka.ms/olksideload in your browser. Meanwhile, I will investigate the issue on Mac, and get back to you.

https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/sideload-outlook-add-ins-for-testing?tabs=windows

image

carlosknowee commented 6 months ago

Yes, thank you. Users can use it from the web version. It works correctly in Safari. The problem is that the reviewers won't validate it for publication on AppSource.

ajays-msft commented 6 months ago

@carlosknowee - I am not able to repro the issue with a test manifest I had. I was able to sideload both in OWA and Mac.

The manifest.xml you attached is also not installing. I validated the manifest, and see some errors. You can validate yourself by sending a postman POST request to https://validationgateway.omex.officeppe.net/package/api/check by copy-pasting the manifest you had in the body section.

"errors": [ { "id": "c03b34d5-2ac0-49fe-a3c3-f48a1d4c4b59", "title": "Minimum Api requirement constraint for VersionOverrideV1_1 is violated", "content": "Minimum Api requirement constraint for VersionOverrideV1_1 is violated", "code": "The Minimum API requirement '1.3' specified in override VersionOverrideV1_1 is lower than minimum API requirement specified in base manifest." }

carlosknowee commented 6 months ago

Thank you very much and sorry for the inconvenience, the manifest.xml I uploaded was not the correct one, it corresponded to some tests I did before publishing the issue. I have updated the file: manifest.xml

ajays-msft commented 6 months ago

@carlosknowee - There is an issue in your manifest. Please update the Host section in manifest, something like:

<Hosts>
  <Host xsi:type="MailHost"/>

Host section details https://learn.microsoft.com/en-us/javascript/api/manifest/host?view=common-js-preview#child-elements

As per documentation: The values of child elements in the inner VersionOverrides override the values of the same-named elements in the parent VersionOverrides and the grandparent OfficeApp element. Sample :https://learn.microsoft.com/en-us/office/dev/add-ins/develop/xml-manifest-overview?tabs=tabid-3#manifest-v11-xml-file-examples-and-schemas

Alternatively, you can also remove the Hosts section.

carlosknowee commented 6 months ago

Thanks for your attention, @ajays-msft

I think it may be due to the tests I had done to try to limit the minimum version, maybe in those tests I changed xsi:type to name. My fault.

In any case, I have tried removing the main <Hosts> section with the same result: the addin disappears.

I have also tried changing the section like this:

    <Hosts>
        <Host xsi:type="Mailbox"/>
    </Hosts>

and in that case the following error occurs:

Installation error

We are unable to complete this operation at this time. Please try again later

image (2)

carlosknowee commented 6 months ago

Hi, I forgot to mention that the version without the bug is already updated in manifest.xml.

ajays-msft commented 6 months ago

@carlosknowee - You need to change it to `

`

Please refer to the documentation:

Host section details https://learn.microsoft.com/en-us/javascript/api/manifest/host?view=common-js-preview#child-elements

As per documentation: The values of child elements in the inner VersionOverrides override the values of the same-named elements in the parent VersionOverrides and the grandparent OfficeApp element. Sample :https://learn.microsoft.com/en-us/office/dev/add-ins/develop/xml-manifest-overview?tabs=tabid-3#manifest-v11-xml-file-examples-and-schemas

carlosknowee commented 6 months ago

Thanks @ajays-msft, I tried again:

image

It causes an error during the installation:

image

When I try to sideload from terminal with debugger, I see:

image

This is the new manifest.xml. What I am doing wrong?

ajays-msft commented 6 months ago

@carlosknowee - Please try to validate the addin manifest in postman using the endpoint I sent earlier. Please let me know what the output is.

millerds commented 6 months ago

There's a flaw in the manifest (one of our yo office templates created this issue) that his a but in rich client apps. Remove the following from between the two VersionOverride tags.

    <Hosts>
        <Host xsi:type="MailHost"/>
    </Hosts>
carlosknowee commented 6 months ago

Thank you, @ajays-msft and @millerds

I experimented by excluding the block of code located between the two VersionOverride tags. Additionaly, I tested scenarios both with and without the primary Hosts node:

<Hosts>
    <Host xsi:type="MailHost"/>
</Hosts>

Including the primary node results in a validation error when posting to https://validationgateway.omex.officeppe.net/package/api/check:

{
    "utcTimestamp": "2024-03-05T11:16:15.2026397+00:00",
    "status": "Rejected",
    "errors": [
        {
            "id": "072f035c-004f-4c76-b09a-2f012a490683",
            "title": "Package Type Not Identified",
            "content": "We could not recognize any supported add-in type "
        },
        {
            "id": "7e9767d6-3d6a-4f55-9ce7-f399108e2fb7",
            "title": "Wrong Package",
            "content": "Your package does not match submission type."
        }
    ],
    "warnings": [],
    "notes": [
        {
            "id": "906eba01-3ef7-44d9-8b44-c606b4fb9f55",
            "title": "Acceptance Test Completed",
            "content": "Acceptance test service has finished checking provided add-in."
        }
    ]
}

Omitting this node allows the validation to pass successfully. However, after installation on a Mac, the add-in disappears again.

I have updated the manifest.xml.

carlosknowee commented 6 months ago

Hello, can I offer any other information that might be helpful, or any tests I can carry out to try to solve it? Thank you very much.

DivyaPatidar commented 6 months ago

@carlosknowee The latest manifest.xml shared by you looks correct. It gets installed on Outlook mac without disappearing and validation is also passing successfully. Do you not see same behaviour?

carlosknowee commented 6 months ago

Hello, in our tests we keep getting the same error: the addin disappears after installation.

ajays-msft commented 6 months ago

Can you please capture logs and share incident id?

carlosknowee commented 6 months ago

How can I get the logs and the incident id on Mac?

mmanjaree-msft commented 6 months ago

Steps to generate Diagnostics/incident ID:

  1. Re-launch Outlook
  2. Repro the issue mentioned
  3. Click on Help->Collect Diagnostics
  4. Share the ID generated.
carlosknowee commented 6 months ago

We have not found a way to get the ID. When you follow the steps you get this message:

Captura de pantalla 2024-03-13 a las 13 22 32

On checking the directory mentioned above, we have the following files:

Captura de pantalla 2024-03-13 a las 13 23 03

rajjha-msft commented 5 months ago

Hey @carlosknowee

Thanks for reporting the issue. We have put it in our backlog, and unfortunately have no timelines to share.

Internal tracking id : 8885920