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
674 stars 95 forks source link

React-based add-ins won't sideload on Old Outlook #4192

Closed Rick-Kirkham closed 7 months ago

Rick-Kirkham commented 7 months ago

Provide required information needed to triage your issue

Add-ins that are created with the React option in Yo Office will sideload on New Outlook, but not on Old Outlook.

Since the problem doesn't occur on New Outlook it seems that the problem can't be with the code in Yo Office or the React project templates.

This is similar to 3986. But that issue makes it seem like it applies only to event-based add-ins. It doesn't.

Your Environment

Expected behavior

The add-in should be sideload in the Outlook message compose surface. The button should be visible on the ribbon in a new message or reply message window.

Current behavior

The button does not appear on the ribbon.

Steps to reproduce

  1. Be sure you have Office in "Old Office" UI.
  2. Run Yo Office.
  3. Choose the React option.
  4. Choose either JavaScript or TypeScript.
  5. After the project is created, cd to the project folder.
  6. Be sure Outlook is closed.
  7. In a command window, terminal, or bash, run npm start.
  8. Wait until Outlook has completely launched; at least 60 seconds after it opens.
  9. Reply to a message or open a new message window.
  10. The add-in's button is not on the ribbon as it should be.

Context

This blocks users who are using Yo Office to create React-based add-ins.  

Thank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.

millerds commented 7 months ago

@Rick-Kirkham I believe this is because of changes you made to manifest.outlook.xml when updating the template to current react versions. There is an extra section between the two different "VersionOverrides" tag that is causing this to break. I'm not sure why that doesn't affect OWA, but if you take that sections out it will work.

Rick-Kirkham commented 7 months ago

Yes. The manifest.outlook.xml manifest has a <VersionOverrides> (v 1_1) element nested inside a <VersionOverrides> (v 1_0) element. Just inside the top of the outer <VersionOverrides> there is a <Hosts> element. Deleting this <Hosts> element fixes this problem and the add-in sideloads in Old Outlook.

But this issue should remain open because this is still a bug in Old Outlook. The presence of that <Hosts> element is valid. The whole point of Version Overrides is that they override settings in the parent. The settings in the <VersionOverrides> (v 1_0) element override the settings in the base manifest and the settings in the <VersionOverrides> (v 1_1) override the settings in the <VersionOverrides> (v 1_0) element. This purpose is defeated if the developer has to remove a setting from the parent. This is why sideloading in New Outlook worked even with that <Hosts> element present in the <VersionOverrides> (v 1_0) element.

millerds commented 7 months ago

Fair enough. I have but the issue on our backlog (internal id: 8798620)