Outlook 1912 + OfficeJS Breaking Custom Outlook Add-in

0

I am working on a custom Outlook Add-in. It works perfectly fine on all Outlook versions below 1912, but 1912, it crashes. In all previous builds of Outlook (that I've seen) the officeJS library (even when pointing towards the cdn) only refers to the 16.02.js (and similar). Below is the error I get when I run the code locally

Exception was thrown at line 19, column 7926 in https://appsforoffice.microsoft.com/lib/1/hosted/outlook-win32-16.02.alpha.js 0x800a03ea - JavaScript runtime error: Syntax error Exception was thrown at line 19, column 141811 in https://appsforoffice.microsoft.com/lib/1/hosted/outlook-win32-16.02.alpha.js 0x800a138f - JavaScript runtime error: Unable to get property 'attributes' of undefined or null reference

Any idea what is going on here?/how to resolve this issue?

Edit: I've verified that other add-ins work. I've also looked at what is causing these errors, and these same issues do not occur on Outlook 1808. Outlook 1912 (and no other version) is looking for alpha.js files when using the officejs library.

When running off the CDN, 1912 is still calling for alpha.js files and these are the errors I get

Exception was thrown at line 421, column 17 in https://localhost:44348/Scripts/Office/1/outlook-win32-16.02.alpha.debug.js 0x800a03ea - JavaScript runtime error: Syntax error

This claims that the window is empty (which is true), but this error is thrown on previous versions and continues

Exception was thrown at line 6112, column 17 in https://localhost:44348/Scripts/Office/1/outlook-win32-16.02.alpha.debug.js 0x800a138f - JavaScript runtime error: Unable to get property 'attributes' of undefined or null reference

xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("cid"); This is null, but again, the project runs through this on lower versions of outlook

Exception was thrown at line 7884, column 17 in https://localhost:44348/Scripts/Office/1/outlook-win32-16.02.alpha.debug.js 0x800a138f - JavaScript runtime error: Unable to get property 'ExtensibilityStrings' of undefined or null reference

Lastly, this is yet another error that is run through (because extensbilitystrings are filled in later).

Is there a way to make 1912 not point towards/use alpha.debug.js files? In the production version of my add-in, a fiddler trace shows that it is failing because an alpha.debug.js file is not present. I can't say for sure, but I would like to think if Outlook 1912 was looking for regular office.debug.js files, the add-in would not crash immediately.

outlook
ms-office
office-js
outlook-addin
asked on Stack Overflow Feb 6, 2020 by adam.lawrence.gm • edited Feb 7, 2020 by adam.lawrence.gm

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0