Office-Addin-Scripts: Application Insights errors
Prerequisites
Node: v12.16.3
Current behavior
When developing an Excel add-in, office-addin-debugging continuously throws the following exceptions:
ApplicationInsights:Sender [
'Ingestion endpoint could not be reached 20 consecutive times. There may be resulting telemetry loss. Most recent error:',
Error: socket hang up
at connResetException (internal/errors.js:608:14)
at Socket.socketOnEnd (_http_client.js:453:23)
at Socket.emit (events.js:322:22)
at endReadableNT (_stream_readable.js:1187:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
code: 'ECONNRESET'
}
]
ApplicationInsights:Sender [
'Not saving data due to max size limit being met. Directory size in bytes is: 50000175'
]
Is there any way to either disable Application Insights or squelch this error? In addition, what directory is the error message referring to? I have not been able to find any documentation on these issues.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 29 (14 by maintainers)
Commits related to this issue
- Fixes issue #290 - Application Insights errors - Customers with port 443 turned off for outgoing traffic, are hitting an AppInsights.Sender error even when usage data is set to "off". The reason for... — committed to TCourtneyOwen/Office-Addin-Scripts by TCourtneyOwen 4 years ago
- Merge pull request #304 from TCourtneyOwen/fix-appinsights-connection-issue Fixes issue #290 - Application Insights errors — committed to OfficeDev/Office-Addin-Scripts by TCourtneyOwen 4 years ago
I think our publishing process failed last night, although there were no conspicuous errors that indicated that. I just published a new version a few minutes ago - the latest version if 1.1.16. The 1.1.14 version of office-addin-usage-data does not contain the fix. Can you please try updating the version to 1.1.16 and see if that fixes it for you?
@tgoyer I published out a new version of office-addin-usage-data that has the fix. Can you please try running “npm ci” in your project directory to pick up the latest version and then try your scenario again?
@tgoyer I think I figured out the fix for this. The problem is this code in the constructor for office-addin-usage-data:
We call the setup method method for appInsights, which makes and https call, even if office-addin-usage-data is set to off.
This should fix the problem, I verified locally:
I will create a PR for this and add you to it
@tgoyer Sorry I haven’t had a chance to do further investigation on this. But tomorrow is our weekly bug fix day, so I will make this my top priority and keep you posted what I find.
Thanks,
Courtney
OK, I have a repro here that shows when blocking port 443 for outgoing traffic on my local machine I get a similar error that you get, so somewhere along the way we either aren’t respecting the “off” flag in office-addin-usage-data or an issue is occurring at the instantiation of the usage data object. This should be helpful in further debugging the issue
I am trying to figure out the ports AppInights uses to send data so I can block them myself locally to help get a repro. I will let you know what I find.
The behavior is opt-out, meaning you are opted in and have the option to opt out by running the aforementioned command npx office-addin-usage-data off You should have seen this message the first time you created a project with Yo Office. It’s possible you just skipped through it. We had quite a bit of discussion internally about the opt-in vs opt-out model. Looping in the PM for this @JuaneloJuanelo to provide his comments.
I am not sure why you are still encountering issues when collection of usage data is set to off. I will need to debug the code locally and see if I can figure out what the problem is. It’s possible that this flag is not getting respected for some reason or in some cases.
Are you confident this error is coming from the office-addin-debugging package? It could also perhaps be coming from office-addin-manifest office-addin-dev-settings.
@ChrisRomp Like it or not, Office is the toolkit for business, especially Excel (where I am getting this issue from). Businesses don’t like their trade secrets getting leaked. If Microsoft wants to continue to repair their relationship with business developers and security officers, they need to do better. Stuff like this is why no one likes Google.
Wishful thinking. 😉
(I’m agreeing with you.)