burnt1ce
burnt1ce

Reputation: 14877

Office 365 Web Add-in: Office.initialize() is not being called

I have assigned Office.initialize a function to initialize my outlook add-in however it's never called and I verified this by using console.log() statements. When I opened my developer console, I got this error 'Uncaught TypeError: Cannot redefine property: context" (refer to screenshot). This runtime error happens 75% of the time but this never happened a week ago.

Could this be a transient error?

I'm using Chrome 51.0.2704.106 and Office 365's Outlook (web app).

enter image description here

Upvotes: 0

Views: 1373

Answers (1)

burnt1ce
burnt1ce

Reputation: 14877

This error was completely my fault. I accidentally referenced Outlook's Javascript file (ie: <script src="https://appsforoffice.microsoft.com/lib/1/hosted/Office.js" type="text/javascript"></script>) twice. After removing one of the references, the error disappeared.

Upvotes: 3

Related Questions