Office-js: Excel - Settings Changed Event inconsistent experience

Created on 21 Feb 2018  路  17Comments  路  Source: OfficeDev/office-js

I'm experiencing the same issue as outlined by this stack overflow. https://stackoverflow.com/questions/45247447/how-to-register-handler-for-settingschanged-event-in-office-web-add-ins

First, is this still a known issue?

Issue

When trying to use this API in Excel Online with an add-in deployed via the O365 Admin portal I receive the Office General Exception error - "an internal error has occurred" which is pretty much impossible to debug.

Excel.run(async ctx => {
   // store the handler so I can remove it later on
   this.settingsChangedHandler = ctx.workbook.settings.onSettingsChanged.add(args => {
          console.log(args);
         // return blank promise to keep the typescript compiler happy
          return Promise.resolve();
        });

        await ctx.sync()
           .catch(err => {
                console.log('Error occurred registering to the Office Settings event!');
                console.log(err);
        });
      });

When running the same code in Excel for Mac or using the same add-in Side-Loaded within Excel Online it works as expected.

When I tried to replicate this in ScriptLab I was experiencing the same issue as outlined in the stack overflow above where it would provide no error and the even would not trigger.

Excel product bug

All 17 comments

@ShawnNiu Please take a look at this.

@ShawnNiu - Can you provide any information on this? Excel Online and the add-in deployed via O365 Portal is my main user group so the add-in currently isn't usable by my team.

What other information can I provide?

Thanks,
Lance

Hi Lance,

We'll look internally and get back to you asap.

Internal: the bug is 863868

Thanks for the update...is there any guidance on when we could expect a fix?

Note - I understand that it sometimes hard to give timeframes for issues when developing software but if it is days/weeks then we can probably get by but if it is months then I need to explore different options for distributing my add-in to my user base.

@LanceEa i would not expect a fix to go in in days/weeks on this case.

@JuaneloJuanelo - Thanks for the quick response. Just to clarify, you are saying you do NOT think this will be a fast fix? I should look at alternative methods to distribute the add-in to my user base?

@sumurthy @ShawnNiu @JuaneloJuanelo - I just wanted to check-in if there are any updates on this issue? At this time, we are no longer rolling out the add-in and are stuck in a holding pattern until we can come up with a resolution for this.

Does this same problem effect add-in's deployed to the Office Store or is it isolated to add-ins deployed via O365 Admin Portal? We had not planned on adding it to the Office Store yet but we might have re-consider that depending on your response.

Again appreciate any help or guidance and don't hesitate to reach out if you need more information from me.

Lance, our engineer already worked out a draft solution. I'll let you know once it was rolled out

@ShawnNiu - Thanks for the update. As soon as it is available I will give it a test.

Hi Lance, we checked-in our code to the latest fork of release. It could be rolled out in couple of weeks. But please notice the fix comes to windows client first, office online fix will come later.

ok thanks for the update. My user base is Excel Online at this time so please let me know when it has rolled out there and I will test.

@ShawnNiu - It looks like the issue has been resolved and I'm no longer getting the general exception. Can you confirm that this has been been deployed to Excel Online?

As of right now I'm showing Excel Online build # 16.0.9222.5051. I want to make sure it is fixed before I communicate it out to my user base.

Thanks,
Lance

Hey Lance, we are addressing some last mile issues. Give us a few days to make it more stablized.

Thanks,
Shiyuan

@ShawnNiu - Ok, thanks for the update!

@LanceEa Just give you a quick update, the fix is already rolled out on online. Feel free to check it out.

@ShawnNiu - Thanks...everything looks good. I did no code changes and it all seems to be working correctly now.

I will let my users know and report back if anything else comes up.

Thanks again for the help getting this fixed.

Was this page helpful?
0 / 5 - 0 ratings