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

Roaming settings not working correctly during compose event on Android #4153

Open sami-romdhana opened 7 months ago

sami-romdhana commented 7 months ago

When using every other Outlook client, during the compose event, storing and retrieving roaming settings works well.

Using Outlook for Android, roaming settings don't get fetched during the add-in lifetime. They appear to be stuck to whatever value was valid during install / deployment.

We somehow got an update, by changing the addin code and manifest, which worked to refresh the values once, but it then remained stuck (and obviously deploying each time is not going to be a solution)

Your Environment

Expected behavior

Roaming settings state gets refreshed for each compose event. Failing that, it should at least mirror the iOS version and refresh after 5 minutes (after stopping the app completely).

Current behavior

Roaming settings don't ever get refreshed (until the addin is changed and reloaded)

Steps to reproduce

There is an MRE below but I'll detail the steps taken to actually use it

  1. Setup an addin with... a. a taskpane to set data to roaming settings b. a JS runtime for the compose event, reading roaming settings to show a notification
  2. Setup the app registration
  3. Publish the code somewhere available with HTTPS

Link to live example(s)

The MRE can be found here.

Context

Our add-in relies on settings stored in roaming settings to operate during the compose events, it is not usable without it. We are making a signature addin which we would like to publish on mobile as well, but with Android having problems we don't think we're going to be able to do so.

FrancoisBard commented 6 months ago

Hi office-js team, do you have an update on this? We're quite lost, this completly prevents us from being compatible with mobiles, which was a big reason why we developped an office JS addin in the first place.

Best

neprasad-microsoft commented 6 months ago

Hi @FrancoisBard , @sami-romdhana Apologies for the delay in response. Would it be possible for you to share the manifest of a deployed add-in? If you are uncomfortable sharing it here, you could send it to us on OutlookExtensibility@M365x53858506.onmicrosoft.com.

Also, are you seeing this same issue on Read surface? i.e. you save a roaming setting on read and close the message. Open another message and try to retrieve the roaming setting. Are you able to get the setting or do you see the same behaviour as compose?

sami-romdhana commented 6 months ago

Hello @neprasad-microsoft, I've published a version of the manifest with the same code as the aforementioned MRE here : https://outlookmobilemre.azurewebsites.net/manifest.xml

As for the Read surface, this isn't something we're used before ; just to be clear, are you referring to this? If so, we'll be testing and coming back with results

neprasad-microsoft commented 6 months ago

Hi @sami-romdhana Thanks for sharing the manifest. How are you setting the roaming setting on mobile? I don't see a taskpane extension in the mobile form factor in manifest. And the code you shared sets the roaming settings only in taskpane. Could you please help me understand the exact repro steps.

sami-romdhana commented 6 months ago

Hello again @neprasad-microsoft, the roaming setting can be set using the taskpane on desktop, enter some text and click on the button to save.

Since roaming settings are supposed to be shared between devices, the value should then be propagated (admittedly not instantly) to mobile. At least it works that way between all desktop versions, the web version and the iOS version so it would be a surprise that it's not supposed to work that way on Android.

mmanjaree-msft commented 6 months ago

Thanks for reporting this issue. It has been put in our backlog but unfortunately we do not have timelines to share at this point. Internal tracking id: 8827159

sami-romdhana commented 6 months ago

Hello @mmanjaree-msft, would it be possible to prioritize this item? We have a lot of clients and possible deals asking for mobile compatibility and we can hardly convince with an offer that only works on iPhone as I'm sure you understand. We have no way of bypassing this issue, neither roaming settings nor Identity API [1] work on Android for the Compose scenario.

[1] https://learn.microsoft.com/en-us/javascript/api/requirement-sets/common/identity-api-requirement-sets?view=common-js-preview#outlook-and-identity-api-requirement-sets

FrancoisBard commented 6 months ago

Thanks @mmanjaree-msft. Adding to Sami's demand, I'd like to know, could you reproduce the problem or do you yet have to reproduce it? Also, do you have a recommended workaround? Thanks

neprasad-microsoft commented 6 months ago

Hi @FrancoisBard We could reproduce the problem and are working on a fix. We will update this thread as soon as we have a fix. As a workaround, you can kill the Outlook App and restart and try to check the values.

neprasad-microsoft commented 5 months ago

Hi @sami-romdhana This issue is fixed now and should be available on Android version 4.2414 onwards.

sami-romdhana commented 4 months ago

Hello @neprasad-microsoft

Sorry for the delay in our answer and thanks for responding to this issue. Unfortunately, after further testing on our part using the aforementioned MRE, it does not seem that the issue is fixed. Any value set on desktop will not appear on the Android app, even after waiting multiple hours, even after uninstalling and clearing the cache.

Opening OWA on a different browser, the same problem can be experienced. Can you confirm that our MRE works on your end? We don't seem to have the same experience using the add-in