Closed barclayadam closed 2 years ago
Further to above, I'm currently under the impression that this is a javascript syntax / runtime issue. I replaced the file with the absolute bare minimum and changed nothing else and it worked.
The Web Add-In Runtime Logging proceeds past "Outlook LaunchEvent JS loaded!" to:
13/05/2021 10:32:58 Verbose Runtime [Console] [Log] InvokeMailboxCreateOM was invoked! ...
13/05/2021 10:32:58 Verbose Runtime [Console] [Log] SDX Control is ready!
13/05/2021 10:32:58 Verbose Runtime [Console] [Log] MailboxHostExecuteApi invoked!
13/05/2021 10:32:58 Verbose Runtime [Console] [Log] RunLaunchEventHandlerFunctionWithData was invoked with funcName = onMessageComposeHandler
13/05/2021 10:32:58 Verbose Runtime [Console] [Log] Event completed message sent to host!
In the case that something is going wrong, whatever that may be, would be great to have some indication in that log file.
Still trying to figure out what is going on
I've not been able to track down why the issue occurs, but it does seem that if I import {init as initApm} from '@elastic/apm-rum';
the resulting code ends up being a problem for M365 Outlook (OWA continues to work).
You will not be able to use any imports in the add-in's JS. The JS file has to be one single file and cannot depend on any other files or libraries. A workaround would be to bundle any other files together within the JS file.
@exextoc Sorry for the confusion, I do already bundle to a single file using webpack. My comment should have been more explicit.
The issue appears to be importing that package ends up creating a bundle that cannot be loaded, in some way, by the desktop JS engine. I cannot narrow it down any more with an error in anyway as I see no error anywhere, just the lack of any further messages in the runtime log
The problem here could be that the package you are importing is not compatible with the environment. Are you able to share this package with us if it is public, or is this a private package that you authored?
@exextoc The package is on npm @ https://www.npmjs.com/package/@elastic/apm-rum. It is Elastic APM integration to track performance and errors.
It may well be that it makes assumptions about the environment that are not correct (i.e. it expects to be in a full browser environment). If that is the case, then some better error logging is needed from Outlook's side as there would be nothing I can do as it occurs before my code even gets hit
We are not familiar with this package. If the package isn't compatible with the environment, our sandbox process will consider the bundle broken. We are investigating how to improve our error logging here for such scenarios. Are you able to achieve your scenario without using this package?
This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!
This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.
@exextoc We have been able to work around this issue with the APM package, but now development has proceeded I think we are in a similar issue with a different package, or something else entirely.
We are now in a position where we have a bundle that will work a few times in a row, but then fail. By failing I mean that nothing happens, and the logs just stop as before. Given the actual JS does not change between retries (because I'm seeing it work and then immediately going back into the New Message dialog to try again) I'm confused.
Note that in OWA it works every time.
I removed some dependencies, namely i18next and i18next-pseudo and react-i18next and have got to a point of it working again, but not knowing why something is failing is proving very awkward to work with. At any moment a code update can end up in a state that causes problems that appear to be out of our control.
The log, with our log lines removed as they are not relevant, is below with the 3 attempts split out:
Attempt 1
=========
18/06/2021 12:08:39 Verbose Runtime [Console] [Log] Platform Bundle - Office exists!
18/06/2021 12:08:39 Verbose Runtime [Console] [Log] Platform Bundle - Office.actions exists!
18/06/2021 12:08:39 Verbose Runtime [Console] [Log] Platform Bundle - Office.actions.associate exists!
18/06/2021 12:08:39 Verbose Runtime [Console] [Log] Outlook Batch JS loaded!
18/06/2021 12:08:39 Verbose Runtime [Console] [Log] Outlook LaunchEvent JS loaded!
18/06/2021 12:08:40 Verbose Runtime [Console] [Log] InvokeMailboxCreateOM was invoked!["{\"hostVersion\":\"16.0.14131.20012\", \"itemType\":4, \"permissionLevel\":3, \"userEmailAddress\":\"th@example.com\", \"userDisplayName\":\"Tom Hanks\", \"userProfileType\":\"office365\", \"userTimeZone\":\"GMT Standard Time\", \"conversationId\":null, \"ewsUrl\":\"https://outlook.office365.com/EWS/Exchange.asmx\", \"restUrl\":\"https://outlook.office.com/api\", \"itemNumber\":6, \"roamingSettings\":\"{}\", \"extensionPointType\":8, \"enableBetaAPIs\":false, \"displayLanguage\":\"en-US\", \"contentLanguage\":\"en-GB\", \"officeVersion\":\"16.0.14131.20012\", \"isFromSharedFolder\":false, \"shouldRunNewCodeForFlags\":1}"]
18/06/2021 12:08:40 Verbose Runtime [Console] [Log] SDX Control is ready!
18/06/2021 12:08:40 Verbose Runtime [Console] [Log] MailboxHostExecuteApi invoked!
18/06/2021 12:08:40 Verbose Runtime [Console] [Log] RunLaunchEventHandlerFunctionWithData was invoked with funcName = onMessageComposeHandler
18/06/2021 12:08:40 Verbose Runtime [Console] [Log] ...
18/06/2021 12:08:40 Verbose Runtime [Console] [Log] MailboxHostExecuteApi invoked!
18/06/2021 12:08:40 Verbose Runtime [Console] [Log] ...
18/06/2021 12:08:40 Verbose Runtime [Console] [Log] ...
18/06/2021 12:08:40 Verbose Runtime [Console] [Log] MailboxHostExecuteApi invoked!
18/06/2021 12:08:40 Verbose Runtime [Console] [Log] ...
18/06/2021 12:08:40 Verbose Runtime [Console] [Log] MailboxHostExecuteApi invoked!
18/06/2021 12:08:41 Verbose Runtime [Console] [Log] ...
18/06/2021 12:08:41 Verbose Runtime [Console] [Log] MailboxHostExecuteApi invoked!
18/06/2021 12:08:41 Verbose Runtime [Console] [Log] ...
18/06/2021 12:08:41 Verbose Runtime [Console] [Log] MailboxHostExecuteApi invoked!
18/06/2021 12:08:41 Verbose Runtime [Console] [Log] ...
18/06/2021 12:08:41 Verbose Runtime [Console] [Log] Event completed message sent to host!
18/06/2021 12:10:01 Verbose Runtime [Console] [Log] Platform Bundle - Office exists!
18/06/2021 12:10:01 Verbose Runtime [Console] [Log] Platform Bundle - Office.actions exists!
18/06/2021 12:10:01 Verbose Runtime [Console] [Log] Platform Bundle - Office.actions.associate exists!
18/06/2021 12:10:01 Verbose Runtime [Console] [Log] Outlook Batch JS loaded!
18/06/2021 12:10:01 Verbose Runtime [Console] [Log] Outlook LaunchEvent JS loaded!
18/06/2021 12:10:01 Verbose Runtime [Console] [Log] InvokeMailboxCreateOM was invoked!["{\"hostVersion\":\"16.0.14131.20012\", \"itemType\":4, \"permissionLevel\":3, \"userEmailAddress\":\"th@example.com\", \"userDisplayName\":\"Tom Hanks\", \"userProfileType\":\"office365\", \"userTimeZone\":\"GMT Standard Time\", \"conversationId\":null, \"ewsUrl\":\"https://outlook.office365.com/EWS/Exchange.asmx\", \"restUrl\":\"https://outlook.office.com/api\", \"itemNumber\":9, \"roamingSettings\":\"{}\", \"extensionPointType\":8, \"enableBetaAPIs\":false, \"displayLanguage\":\"en-US\", \"contentLanguage\":\"en-GB\", \"officeVersion\":\"16.0.14131.20012\", \"isFromSharedFolder\":false, \"shouldRunNewCodeForFlags\":1}"]
Attempt 2
=========
18/06/2021 12:10:01 Verbose Runtime [Console] [Log] SDX Control is ready!
18/06/2021 12:10:01 Verbose Runtime [Console] [Log] MailboxHostExecuteApi invoked!
18/06/2021 12:10:01 Verbose Runtime [Console] [Log] RunLaunchEventHandlerFunctionWithData was invoked with funcName = onMessageComposeHandler
18/06/2021 12:08:40 Verbose Runtime [Console] [Log] ...
18/06/2021 12:08:40 Verbose Runtime [Console] [Log] MailboxHostExecuteApi invoked!
18/06/2021 12:08:40 Verbose Runtime [Console] [Log] ...
18/06/2021 12:08:40 Verbose Runtime [Console] [Log] ...
18/06/2021 12:08:40 Verbose Runtime [Console] [Log] MailboxHostExecuteApi invoked!
18/06/2021 12:08:40 Verbose Runtime [Console] [Log] ...
18/06/2021 12:08:40 Verbose Runtime [Console] [Log] MailboxHostExecuteApi invoked!
18/06/2021 12:08:41 Verbose Runtime [Console] [Log] ...
18/06/2021 12:08:41 Verbose Runtime [Console] [Log] MailboxHostExecuteApi invoked!
18/06/2021 12:08:41 Verbose Runtime [Console] [Log] ...
18/06/2021 12:08:41 Verbose Runtime [Console] [Log] MailboxHostExecuteApi invoked!
18/06/2021 12:08:41 Verbose Runtime [Console] [Log] ...
18/06/2021 12:10:02 Verbose Runtime [Console] [Log] Event completed message sent to host!
Attempt 3
=========
18/06/2021 12:10:16 Verbose Runtime [Console] [Log] Platform Bundle - Office exists!
18/06/2021 12:10:16 Verbose Runtime [Console] [Log] Platform Bundle - Office.actions exists!
18/06/2021 12:10:16 Verbose Runtime [Console] [Log] Platform Bundle - Office.actions.associate exists!
18/06/2021 12:10:16 Verbose Runtime [Console] [Log] Outlook Batch JS loaded!
18/06/2021 12:10:16 Verbose Runtime [Console] [Log] Outlook LaunchEvent JS loaded!
18/06/2021 12:10:16 Verbose Runtime [Console] [Log] InvokeMailboxCreateOM was invoked!["{\"hostVersion\":\"16.0.14131.20012\", \"itemType\":4, \"permissionLevel\":3, \"userEmailAddress\":\"th@example.com\", \"userDisplayName\":\"Tom Hanks\", \"userProfileType\":\"office365\", \"userTimeZone\":\"GMT Standard Time\", \"conversationId\":null, \"ewsUrl\":\"https://outlook.office365.com/EWS/Exchange.asmx\", \"restUrl\":\"https://outlook.office.com/api\", \"itemNumber\":12, \"roamingSettings\":\"{}\", \"extensionPointType\":8, \"enableBetaAPIs\":false, \"displayLanguage\":\"en-US\", \"contentLanguage\":\"en-GB\", \"officeVersion\":\"16.0.14131.20012\", \"isFromSharedFolder\":false, \"shouldRunNewCodeForFlags\":1}"]
18/06/2021 12:10:16 Verbose Runtime [Console] [Log] SDX Control is ready!
This is using Outlook 365 v2106, Build 14131.20012 on Windows 10. Also seen on Outlook 365 v2105, Build 14026.20308 on Windows 10.
Add-ins in OWA run in a browser. In the native Outlook Desktop client, the add-ins run in a sandboxed environment within a separate process. Are you comfortable sharing your bundle with us so that we can try them in-house to see if we can reproduce this issue? We have never encountered an issue like this.
This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!
This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.
@exextoc we are still experiencing issues here. How can we share more information with you privately?
If you can create a private github and give this account access, I can forward it to the product team.
@exextoc I have added your account to a repro repo at https://github.com/barclayadam/office-js-launch-repro
At the moment it contains just a readme with some details of the issue + access to a VM that has a running Outlook instance pointing at our add-in and associated services that you should be able to replicate the issue with
Please let me know what else you would need
I tried out the VM and your add-in worked every time I tried it. I tried a total of 10 times. I inspected your bundle which is cached on the VM and I couldn't find anything obvious that was problematic. I must admit that your bundle file was quite large so it is possible I missed something.
One thing to know is that we only allow 5 simultaneous instances of your add-in per Outlook session. I don't think that's the issue you are facing right now.
I'm in contact with the sandbox team to get instructions on how to get further logging for the sandbox (ULS logs) so that you can share those with us whenever you reproduce this issue.
@exextoc thank you for investigating.
The almost randomness of the loading issue makes me feel like it's potentially a race condition of sorts, or something similar. There is no pattern that I can discern. I have seen it work 20-30 times before it fails to one once, 10 times can in all likelihood work absolutely fine.
The instance limit will not be an issue here.
The bundle has a bit of overhead to support Promise (it's polyfilled) and async/await syntax, plus the usual webpack overhead. In terms of the actual code it's pretty simple. I can share if necessary the source if it would help tracking down what is going on here.
We have continued to investigate this issue and have created a small add-in that shows the issue. The issue is not easy to reproduce and is very non-determinstic, it feels like a race condition.
I have updated the readme at https://github.com/barclayadam/office-js-launch-repro with details and repros, and included some log files for failures.
Would love to progress this as we have customers experiencing issues in production and it appears there is nothing we can do. Happy to get some direct communication going if would help to expedite this issue
Thank you for the additional information. We are still following up with the sandbox team to get instructions on how to get further logging for the sandbox (ULS logs), as those could be helpful in determining the issue.
Is there any progress on this? Are additional logs going to be available? Sorry to push on this but it affects our production customers and we are at a loss as to what we could possibly do to progress this any further on our side.
As a note on loading of add-ins, we have definitely found there are quite some stability issues in Outlook on Windows in general, issues that are different to the above but present in similar ways. Without additional logging though we are, again, unable to make progress or give MS any ideas as to what issues we are hitting
To help obtain more logs:
Shutdown Microsoft Outlook.
Add the following registry keys:
Follow the instructions on this webpage to enable ULS logging: https://docs.microsoft.com/en-us/office365/troubleshoot/diagnostic-logs/collect-office-diagnostic-logs
Reproduce the issue and then exit Outlook.
Share the logs with us by adding the log file to your private repo. The location of the log file is specified on the webpage from step 3 above.
Thank you @exextoc
We will be looking at gathering the relevant logs as above this week and sharing them with your as soon as we have them
I have uploaded 3 sets of log files to the GitHub repo. Details can be found in the README at https://github.com/barclayadam/office-js-launch-repro/blob/main/README.md#update-23-09-2021
Looking forward to hearing if you can shed any light on what is going on.
And once again, would like to extend the invite to have more direct interaction if it would help to solve this issue
@barclayadam Thank you for sharing the logs.
Some of the logs in GitHub appear to be truncated. For instance, the second App file in each directory appears to contain blank lines and the end of the first App file also has blank lines. Do you see the same data on your machine, or is it just a problem with the copy in GitHub?
@exextoc that is indeed like the original files. I noticed a few odd lines in some of the files, but otherwise the files are good. To be sure I have uploaded 3x zip files with the original files, to ensure GitHub rendering / download / upload is not causing more issues
I'm sure the blank lines (and basically empty 2nd file) are because Outlook allocates 20mb zeroed files and then writes as much as it has. Leaving empty data at the end of each file, or the complete file in the case it did not write anything to it
You can find the 3x zip files at the root of the repo
@exextoc do we know yet if those logs are of any help at all? Quite a lot of information to digest I accept, was hoping there may be something to come from them at all?
The sandbox team is looking into the logs to find the root cause of the issue you are observing. PS : Any 404 errors to /.well-known path is ignorable. That is for additional resources in case your add-in supports our Single Sign On APIs. We are actively working on documentation for this.
Thank you for info regarding /.well-known
, something like that was my assumption.
As a reminder there is a VB script that can be used to automate this failure, where it will also fail in the same way (albeit it takes longer, sometimes much longer, on average), using the sample at https://github.com/OfficeDev/PnP-OfficeAddins/tree/main/Samples/outlook-set-signature
Details are in the linked GitHub repo
I tried your VB script. I had to modify it a bit to get it to execute. However, it didn't work as expected because the signature gets inserted after the script has executed. I'm going to try this out again.
You will find that, depending on what add in you are testing that the signature will get inserted hundreds, maybe thousands of times before it fails (in particular the GitHub hosted PnP sample can take a long time until it fails).
It is 100% reproducible eventually, at least on the VMs we have set up, and from customer reports.
The idea is the script creates a new email, focuses the body and inserts and X until it can find a signature. Once it finds the signature it will close the window and try again.
Also as a reminder, there are two issues I think we are seeing.
The "failed to load" message bar appearing. That appears to be an issue with loading the JS/initialising the runtime or similar as the code never executes. This is not hard to reproduce against the MS sample.
The other, with calls to the JS API is what I refer to above.
If it would be useful to set up any sort of screen share or similar to discuss more as may be difficult to exactly communicate this please let me know
Let me check if we can setup a meeting to discuss this online.
Thanks for reporting this issue regarding launch based activation. It has been put on our backlog. We unfortunately have no timelines to share at this point.
So does this mean you can reproduce the issues above? This GH issue became a little muddied with a couple of different issues reported in the end (JS not loading and calls disappearing), can you reproduce both of them?
Going back to your issue description, there are 2 problems you mentioned.
For the second one, we have internal bug tracking it (Office Bug # 5551163). We are actively working on this, however, we have no timelines to share regarding it. This is the bug that results in the error infobar with the message "We're sorry, we couldn't access [add-in name]. Make sure you have a network connection. If the problem continues, please try again later"
. The bug here is that our sandbox process experiences crashes for certain users, resulting in a failure to launch the add-in.
For the first problem you mentioned, whenever it reproduces, can you check the Windows TaskManager to see if the sandbox process is running? The process name is msoadfsb.exe
? We suspect that the crash from the second problem is related to this first problem.
We are seeing very similar behaviour with event based activation, we are also using the onMessageCompose
event, which has now moved to GA rather than Preview.
We see the "We're sorry, we couldn't access [add-in name]. Make sure you have a network connection. If the problem continues, please try again later"
. In my testing locally I'm seeing this intermittently using the same js file each time. Similarly to yourself, only in Windows Outlook, works fine in OWA. I believe I've spotted a pattern though, and it's related to the 404 to the /.well-known/ url that was mentioned before. I'm seeing something of a race condition occurring. And it's worth noting that our onMessageCompose method is fairly simple, no SSO API usage etc.
My process to reproduce this is to:
And the above step is key, the two requests are made in a seemingly random order, which is where the race condition comes in. IF the .well-known request is made first, then I see the problem with the "couldn't access [addin]"
message in subsequent new messages. But if the request for the onMessageCompose js file comes in first, then everything seems to work ok for subsequent messages. You need to close the first email which triggered the request for the file in the first place, the second time of asking will reveal whether it's going to work or not.
See screenshot below:
You can see that I've grouped the requests into 4 pairs according to my theory above.
pair 1 - call to onMessageCompose.js came first, works OK pair 2 - call to .well-known first, no good pair 3 - no good pair 4 - OK
I've tried this quite a few times and the result is pretty consistent. The 404 call does seem to be at fault.
I don't recall these .well-known calls being made until recently so I'm assuming this is a new thing.
@barclayadam I wonder whether you're able to set up a test similar to the above and see if you get similar results?
My next step will be to add the .well-known file to our application in order to satisfy the 404 error and see if this resolves the problem. There are some docs that discuss that here: https://docs.microsoft.com/en-us/office/dev/add-ins/outlook/use-sso-in-event-based-activation although these have only been added in the past few days by the looks of things. I'll feed back with the result of this when I can.
The sandbox team is looking into the logs to find the root cause of the issue you are observing. PS : Any 404 errors to /.well-known path is ignorable. That is for additional resources in case your add-in supports our Single Sign On APIs. We are actively working on documentation for this.
Further to my last comment I can confirm that for us, adding a /.well-known/microsoft-officeaddins-allowed.json
file to the server so that a 404 response is avoided, does resolve the problem. See below screenshot:
All of the above tries, using the same strategy as in my last post, resulted in a working onMessageCompose
file retrieval with the functionality working, and no error message.
Further to this, the content of the file does not seem to matter, the same result was observed using both a file containing the add-in's origin domain, as per the docs, and an empty file. It seems as long as the file is present, preventing a 404 response. The outcome is the same. That document also states that we can use a custom http response header, but having tested that it does not seem to have any effect at all.
@exextoc are you able to advise on this please, what is the status with this functionality and how should we proceed?
Also, how can we protect ourselves from these breaking changes? Does the office.js library provide version control via the URL we reference it from so that we can access a reliable copy of it every time, only choosing to get new features when we are ready for them? Having these unpredictable behaviours activated without any warning is not ideal when we have applications in production environments.
Thank you for the detailed analysis. We are looking into the issue with the additional information.
We had ignored the .well-known JSON file returning 404 until now. Adding that to return a simple empty file containing {}
only does not help to improve our situation.
We have got to a point of being able to run our test script to see this working for hundreds of times (typically > 600), but it will still eventually fail in the ways described above.
@exextoc we have seen the process msoadfsb.exe
crash some times, but could not correlate that process disappearing directly with the failures we are seeing. We saw it crash, but our test was able to continue. I'm not sure if that is helpful, but perhaps point to the when the crash happens in the lifecycle of the add-in being important to final outcome too
How about having the .well-known call return a file with the launch event js URL as per the docs? I'm still seeing this issue and can reliably reproduce fixing it by serving this file. It's important to clear that 'Wef' folder on the machine with Outlook closed to force Outlook to re-attempt to retrieve your js files, as it's doing some internal caching which can mask the problem
@carlosb1504, thanks for your input here.
@barclayadam when msoadfsb.exe crashes, can you check the Windows Event Viewer for crash reports to confirm this?
@exextoc We have a number of customers in production that, for a handful of users, see a crash of the msoadfsb
executable every time they create a new message, with the result being no event-based activation and "We're sorry, we couldn't access [add-in name]. Make sure you have a network connection. If the problem continues, please try again later" message bar is shown.
The add-in works fine for many other users in the same tenant, and in OWA, but causes the crash consistently for at least one user on multiple machines.
I have added to the private repo some additional details and logs. Update in README at https://github.com/barclayadam/office-js-launch-repro/blob/main/README.md#update-05-01-2022---instant-crash
@exextoc As above we continue to have numerous customers that experience the issue of the add-in not loading. Typically we are seeing just one, or perhaps two users that have the issue out of the whole M365 tenant. We have:
msoadfsb.exe
process crash in most of these instances. The error, once it has manifested itself will be shown on subsequent message compose attempts immediatelyWe are running out of steam on what to try with our customers as there is zero information given about what the problem could be. We know the JS is being loaded on Outlook launch as we can watch the network traffic. And we know it's not running any of our code as there is nothing in the runtime logs.
We really need assistance directly from somebody in the team to help to diagnose this issue and why it happens to only a small handful of our customers
@barclayadam thanks for the update. We have addressed some bugs in msoadfsb.exe that could be the reason why the issue is fixed for some users. And for the .well-known issue, please don't use an empty file. Having the file will help users on older builds that have the bug that is addressed by adding this file. I have alerted the sandbox team to look into the crash in msoadfsb.exe. Thanks for adding more information regarding this to the private repo. Since you have multiple users having multiple different problems, it is likely that these users have different buckets of issues. Drop your contact information in the private repository and I will contact you via email so that we can setup further communication and then circle back to this thread with our findings.
@exextoc I have updated the readme with my email address, I look forward to hearing from you.
We do not return an empty .well-known file in production, I was only testing with different variants before.
@exextoc we are continuing to experience new users hitting this issue, and it is becoming pressing now with many customers having a handful of users with errors. We have one customer that, from around 400 users has 5 that do not work.
They have updated their Outlook (we are not yet sure what release channel they are on, but we do have customers on the current channel with the same behaviour) and nothing changes.
This is becoming more of a problem every day and we would love to get this sorted. It is becoming business-critical
FYI to all our community we are following up directly with @barclayadam and his team. Turns out its been tough for our engineering team to repro this issue, however we have a customer who has shared an environment and we are investigating. thanks for the patience.
@JuaneloJuanelo Any update on this? Working on a critical Outlook add-in, and I'm getting the "We're sorry, we couldn't access [add-in name]. Make sure you have a network connection. If the problem continues, please try again later" once I added LaunchEvents
to the manifest. Works as expected in web Outlook client.
@jbrookins13 Can you create a new issue with details about your own scenario, configuration, etc.?
Thanks.
Hello, I want to provide an update for this issue. Thanks to a close collaboration with a few of you (@barclayadam team specifically) we were able to find the root cause issue [BTW although is affecting a small % of users of this feature, the behavior is unacceptable]. The good news is that the issue is fixed! We are working to roll it out to production, and it will make it into the next "Patch Tuesday" event which happens on May 10th. We will back port this fix to the previous semiannual channel as well.
If your development is blocked or some of your customers trying your add-in are failing because of this, please email me at juanbl@microsoft.com to work on a potential workaround.
I am trying to use the preview of event-based activation (https://docs.microsoft.com/en-us/office/dev/add-ins/outlook/autolaunch) but it is proving to be a massively frustrating experience.
I did have it working, I think, at one point using v16.0.14026.20138 of Outlook 365 but I simply cannot get it working again. I have stripped code back to an almost bare minimum to just add a notification message to ensure it's not the code itself, but nothing seems to work. Have tried following the setup instructions and used the yeoman generated solution but that fails too.
The same add-in declares a task pane and that loads absolutely fine. Also, see the event-based activation working absolutely fine in OWA (
OnNewMessageCompose
).Expected Behavior
Event-based activation to a) work or b) give an actionable error message
Current Behavior
Two scenarios seem to happen, but I have no idea what triggers one vs the other:
The second error seems ideal as it point to soemthing not being right. I cannot find anywhere where this issue would actually be logged though. I tried using the runtime logging, but that is pretty sparse of details, the only thing that seems half-related is:
I did once see a message related to running the function I had declared, but unfortunately, I do not have that line to hand and cannot reproduce. That appeared to happen whilst I was not looking (i.e. I opened compose window and nothing happened, but when coming back to it later it had run the command)
Steps to Reproduce, or Live Example
I can replicate on multiple machines using our deployed add-in, but would prefer to not share link publically.
Note that this is happening with a hosted add-in, added via. it's manifest URL, and is therefore NOT a localhost problem.
Your Environment
Below is our current manifest with text removed and link addresses changed. I can confirm all of those URLs can be loaded.
Anonymised Manifest