-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Method “telemetryClient.trackException(error);” is causing container crash #4672
Comments
Hi @Alassaneokp and @tracyboehrer, We were able to reproduce a similar issue by using this sample and executing the What we've noticed is that by passing the Error instance in the exception property as follows: Could this be related to the issue's case? If that isn't the case, what is the Thanks! |
Hi @sw-joelmut, The botFrameworkAdapter exception is no longer happening. |
Application use App Insights SDK for Nodejs in a Bot Service running on Azure App Services Node 16.20.2
----- Problem -----
Method “telemetryClient.trackException(error);” is causing container crash
------Library requirement in Package.json------:
"botbuilder-applicationinsights": "^4.10.4",
------Library installed at deployment time on Package-lock.json------:
"botbuilder-applicationinsights": {
"applicationinsights": {
------Code extract from Index.js------:
const { ApplicationInsightsTelemetryClient, TelemetryInitializerMiddleware } = require('botbuilder-applicationinsights');
function getTelemetryClient(instrumentationKey) {
}
var telemetryClient = getTelemetryClient(process.env.APPINSIGHTS_INSTRUMENTATIONKEY);
var telemetryLoggerMiddleware = new TelemetryLoggerMiddleware(telemetryClient, true);
var initializerMiddleware = new TelemetryInitializerMiddleware(telemetryLoggerMiddleware, true);
adapter.use(initializerMiddleware);
telemetryClient.trackException(error);
----- Workaround -----
App worked for days without issues after commenting the line 101: telemetryClient.trackException(error);,
----- Stack Trace -----
Method “telemetryClient.trackException(error);” is causing crash with following error:
2024-06-02T04:04:05.472628200Z Created new item using POST method
2024-06-02T04:04:05.472651000Z 9FOOB90Dwb7FBL7hbPhN8i-us
2024-06-02T04:04:05.478623676Z /home/site/wwwroot/node_modules/botbuilder/lib/botFrameworkAdapter.js:674
2024-06-02T04:04:05.478643876Z throw new Error(
BotFrameworkAdapter.processActivity(): ${status} ERROR\n ${processError.stack}
);2024-06-02T04:04:05.478649576Z ^
2024-06-02T04:04:05.478653676Z
2024-06-02T04:04:05.478657476Z Error: BotFrameworkAdapter.processActivity(): 500 ERROR
2024-06-02T04:04:05.478662376Z TypeError: Cannot read properties of undefined (reading 'stack')
2024-06-02T04:04:05.478681476Z at Function.EnvelopeFactory.createExceptionData (/home/site/wwwroot/node_modules/applicationinsights/out/Library/EnvelopeFactory.js:145:40)
2024-06-02T04:04:05.478695976Z at Function.EnvelopeFactory.createEnvelope (/home/site/wwwroot/node_modules/applicationinsights/out/Library/EnvelopeFactory.js:32:40)
2024-06-02T04:04:05.478700577Z at NodeClient.TelemetryClient.track (/home/site/wwwroot/node_modules/applicationinsights/out/Library/TelemetryClient.js:117:44)
2024-06-02T04:04:05.478704677Z at NodeClient.TelemetryClient.trackException (/home/site/wwwroot/node_modules/applicationinsights/out/Library/TelemetryClient.js:70:14)
2024-06-02T04:04:05.478717777Z at ApplicationInsightsTelemetryClient.trackException (/home/site/wwwroot/node_modules/botbuilder-applicationinsights/lib/applicationInsightsTelemetryClient.js:116:28)
2024-06-02T04:04:05.478721777Z at BotFrameworkAdapter.adapter.onTurnError [as turnError] (/home/site/wwwroot/index.js:101:22)
2024-06-02T04:04:05.478725477Z at runMicrotasks ()
2024-06-02T04:04:05.478729577Z at processTicksAndRejections (node:internal/process/task_queues:96:5)
2024-06-02T04:04:05.478733677Z at BotFrameworkAdapter. (/home/site/wwwroot/node_modules/botbuilder/lib/botFrameworkAdapter.js:674:27)
2024-06-02T04:04:05.478737877Z at Generator.tme/site/wwwroot/node_modules/botbuilder/lib/botFrameworkAdapter.js:12:65)
2024-06-02T04:04:05.478745677Z at runMicrotasks ()
2024-06-02T04:04:05.478750177Z at processTicksAndRejections (node:internal/process/task_queues:96:5)
The text was updated successfully, but these errors were encountered: