Word Add-in made with Visual Studio 2015 throws exceptions

0

I just created a Word Add-in in Visual Studio 2015. I did not make any code changes. When I run it (in Word 2016 x86) and click on the ribbon button, the add-in loads correctly in the task pane but i get the following errors in the console:

'iexplore.exe' (Script): Loaded 'Script Code (Windows Internet Explorer)'. Exception was thrown at line 4243, column 4 in https://localhost:44398/Scripts/jquery-1.9.1.js 0x800a139e - JavaScript runtime error: SyntaxError Exception was thrown at line 4261, column 4 in https://localhost:44398/Scripts/jquery-1.9.1.js 0x800a139e - JavaScript runtime error: SyntaxError Exception was thrown at line 21, column 112492 in https://appsforoffice.microsoft.com/lib/1/hosted/word-win32-16.01.js 0x800a138f - JavaScript runtime error: Unable to get property 'attributes' of undefined or null reference

Any ideas why?

ms-word
office-js
asked on Stack Overflow Mar 2, 2018 by Leo • edited Mar 2, 2018 by Marc LaFleur

1 Answer

1

Ok, after a quick sync with the VS team I believe you see those exceptions printed to debug output because we attach the debugger to the internet explorer process that’s hosting the Add-in, which will print out javascript exceptions. They look like they are coming from the jquery and office js libraries, which is why they show up before it even gets to the template code. I think the app should still work correctly you should be able to safely ignore them.

answered on Stack Overflow Mar 2, 2018 by Juan Balmori

User contributions licensed under CC BY-SA 3.0