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

Event-based activation in Outlook on mobile devices not always working #3780

Open bogdanst24 opened 1 year ago

bogdanst24 commented 1 year ago

Provide required information needed to triage your issue

Your Environment

Expected behavior

Once a web add-in is deployed to the entire organization, all users are receiving the web add-in, and all users are getting the functionality working. For example, when the "OnNewMessageCompose" event is triggered, the Web add-in handler will be invoked in a matter of seconds. The status would be seen somewhere if any error occurs while loading the add-in or executing it.

Current behavior

Half of the Android and half of the iOS devices are not getting the event-based triggered. This does not seem to be related to the version of the mobile OS or the version of Outlook. The Outlook version is the latest one. In some cases, on Android, the events are triggered only sometimes. After having the application open for a while, they would stop triggering and require an application restart for them to trigger again.

Unfortunately, as there is no (known) way to gather logs, have runtime logging, or inspect network requests on customer's mobiles, I have no resources to show.

yathk commented 1 year ago

We're also having this issue. The addin doesn't fire at all while testing on my phone. I'm on iOS 16.7.2 and Outlook 4.2342.0

exextoc commented 1 year ago

@bogdanst24 Please share the manifest of your addin for a repro.

bogdanst24 commented 1 year ago

@exextoc can I get an email address to send it to privately?

exextoc commented 1 year ago

@bogdanst24 You can share to OutlookExtensibility@M365x53858506.onmicrosoft.com and notify here.

bogdanst24 commented 1 year ago

Thank you, I have shared it.

Most of the issues are with iPhones.

exextoc commented 1 year ago

This feature is not rolled out 100% for iOS so it might not work for all the users. For android, we are not able to repro it at our end. Can you please share the repro steps.

bogdanst24 commented 1 year ago

Regarding iOS: Where can we see the status of the rollout, and how can we identify if it was rolled out to a device or not? Except for another GitHub issue comment from September, there is no information I could find about the rollout and its status.

Regarding Android: Personally, I can't reproduce it, but we have reports from users. Because the Web Add-in doesn't even load, we don't even have errors to look for...

exextoc commented 1 year ago

Unfortunately, tracking of rollout is internal and we cannot share this information. We will update the ticket once the rollout is 100% . For Android, how many users are affected? Does uninstall/install of the add-in help? You can send us the log from Android. These are the steps to collect logs:

  1. Relaunch Outlook and once the issue reproduces, Go to Help-> Collect Diagnostics -> Get Started-> Collect Logs
  2. Copy the Incident ID and share
bogdanst24 commented 1 year ago

Unfortunately, tracking of rollout is internal and we cannot share this information. We will update the ticket once the rollout is 100% .

Is it at least possible to have an article updated with this information? As in, the fact the rollout is currently stopped?

For Android, how many users are affected? Does uninstall/install of the add-in help?

Rough estimation, around 15% of users. By "uninstall/install", you are probably referring to having the manifest removed and then redeployed for the entire organization. We are afraid to do that, because the previous time it took almost 2 weeks to get in this state of 85% of the Andoid users having it working. There is another issue related to that https://github.com/OfficeDev/office-js/issues/3772

The issue is that the Web Add-in is not present at all on the phone. How would logs help in that case?

exextoc commented 1 year ago

Hi @bogdanst24 , sorry for the miscommunication about Android. We thought that the Android add-in is installed but event is not triggered. Add-in not being deployed on all devices on Android is being tracked at https://github.com/OfficeDev/office-js/issues/3772 and will be updated once we have some information there. For iOS the roll out is in progress and we will share further updates as and when available.

bogdanst24 commented 1 year ago

For iOS the roll out is in progress and we will share further updates as and when available.

Thank you! I'm sure we are not the only ones waiting for an update here.

We thought that the Android add-in is installed but event is not triggered.

This also happens randomly. Usually, when you start the Outlook process for the first time on mobile, it takes up to 10 seconds for the signature to be inserted, or it ends up never being inserted. Probably hitting some timeouts. Then, closing the message compose and opening again will insert the signatures in 2-3 seconds.

exextoc commented 1 year ago

Thank you for your inquiry. We are currently in the process of rolling out the iOS version of our product. The roll-out is expected to be completed by mid-February, tentatively. We appreciate your patience.

fedeisas commented 10 months ago

Thank you for your inquiry. We are currently in the process of rolling out the iOS version of our product. The roll-out is expected to be completed by mid-February, tentatively. We appreciate your patience.

@exextoc happy 2024! Is there a more definitive timeline for this? Thanks!

fedeisas commented 9 months ago

Thank you for your inquiry. We are currently in the process of rolling out the iOS version of our product. The roll-out is expected to be completed by mid-February, tentatively. We appreciate your patience.

@exextoc hey! Any updates for this one? Thanks! 🙏🏽

martinguenther commented 7 months ago

Any updates here? We've created an Outlook add-in with event-based activation to insert signatures on message compose. It works perfectly in the Outlook app on iOS. But we have issues on Android devices. The signature is not inserted. Re-installing the add-in, deleting cache and app data on the device does not resolve the issue. It does not work on the first email, nor on subsequent emails. The add-in works on all other platforms (iOS, Outlook old/new, Outlook Web) without issues. Just not on Android devices. Outlook App version is 4.2413.1 - which should be compatible according to the docs (min. version 4.2352.0)

anjalitp commented 7 months ago

Event-based activations is now available for all users on Outlook on Android and on iOS starting in Version 4.2352.0

@martinguenther Could you please provide following details?

  1. How was the add-in installed for the user? Event-based add-ins must be deployed by an organization's administrator.
  2. Does the add-in show up in Mobile Store "Add-ins" section as installed add-in?
  3. Please create an Incident ID from the device and share it with us by following below steps:
    • Relaunch Outlook and once the issue reproduces, Go to Help-> Collect Diagnostics -> Get Started-> Collect Logs
    • Copy the Incident ID and share
martinguenther commented 7 months ago

Thanks @anjalitp 1) Yes, the add-in was deployed by an admin. Event-based function works on all other devices for the same (and other) users, just not on Android. 2) Yes, it is listed and checked (active) 3) Done. How to share the Incident ID with you? Paste it here?

anjalitp commented 7 months ago

@martinguenther Thanks for the details. Please paste it here.

martinguenther commented 7 months ago

@anjalitp Incident ID: PAZJ57PN

In the meantime I found this issue regarding roaming settings on Android (#4153). Our add-in uses roaming settings too, but does not fully rely on them.

anjalitp commented 7 months ago

@martinguenther We had a look at the logs. The add-in is launching fine but one of the API Office.context.mailbox.item.body.getTypeAsync seems to be failing. While we investigate more on this failure, would you be able to test your add-in on Android locally by removing this API from code, so that we can confirm this is the root cause.

martinguenther commented 7 months ago

@anjalitp Thanks! That really helped.

I put a try/catch around the function which uses Office.context.mailbox.item.body.getTypeAsync. Now it works. Please let me know if you need any further assistance to tackle the issue. I'd be more than glad to help.

Of course it would be great to get this working. We use the getTypeAsync API to insert the signature in the format matching the email (html / txt).

anjalitp commented 7 months ago

@martinguenther Thanks for the confirmation. This issue with Office.context.mailbox.item.body.getTypeAsync has been put on our backlog. We unfortunately have no timelines to share at this point. Internal Tracking ID: 4051340

bogdanst24 commented 7 months ago

We have the getTypeAsync conditionally called based on the platform. What I can see from the exceptions is that sometimes (seems random) this function doesn't work:

export function getIsMobilePlatform() { return ( Office.context.diagnostics.platform === getOfficePlatformTypes().iOS || Office.context.diagnostics.platform === getOfficePlatformTypes().Android ); }

It returns false, even though it is Android/iOS