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
Error "body.data.baseData.ver cannot be null or undefined." #1310
Comments
@jcbit Can I take a look at your package.json file and your code you use to initialize Application Insights? Also make sure that you're not calling |
Seeing the same issue when using Envelopes could not be exported and are not retriable. Error message: [
'Error "body.data.baseData.ver cannot be null or undefined." occurred in serializing the payload - "body".'
] My code is a simple: try {
// Running code...
} catch (e) {
appInsights.defaultClient.trackException({ exception: e, severity: appInsights.KnownSeverityLevel.Error });
} Even if I manually override - |
@prateekkathal @jcbit Thank you for raising this issue. A fix PR has already been merged and will be available in the next release: #1312. |
@JacksonWeber Thank you for the fix. I tested v3.0.1 and it works as expected. However, I finding these warning logs being emitted as well (also reported in #1316): @azure/opentelemetry-instrumentation-azure-sdk [
'Module @azure/core-tracing has been loaded before @azure/opentelemetry-instrumentation-azure-sdk so it might not work, please initialize it before requiring @azure/core-tracing'
]
Accessing resource attributes before async attributes settled [] My code looks like this: appInsights
.setup(connectionString)
.setAutoCollectRequests(false)
.setAutoCollectPerformance(false, false)
.setAutoCollectExceptions(false)
.setAutoCollectDependencies(false)
.setAutoCollectConsole(false)
.setUseDiskRetryCaching(false)
.setSendLiveMetrics(false)
.start();
this.client = appInsights.defaultClient;
this.client.setAutoPopulateAzureProperties(); Also, if I don't use the Invalid metric name: "\ASP.NET Applications(??APP_W3SVC_PROC??)\Request Execution Time". The metric name should be a ASCII string with a length no greater than 255 characters. []
Invalid metric name: "\ASP.NET Applications(??APP_W3SVC_PROC??)\Requests/Sec". The metric name should be a ASCII string with a length no greater than 255 characters. []
Invalid metric name: "\Process(??APP_WIN32_PROC??)\Private Bytes". The metric name should be a ASCII string with a length no greater than 255 characters. []
Invalid metric name: "\Memory\Available Bytes". The metric name should be a ASCII string with a length no greater than 255 characters. []
Invalid metric name: "\Processor(_Total)\% Processor Time". The metric name should be a ASCII string with a length no greater than 255 characters. []
Invalid metric name: "\Process(??APP_WIN32_PROC??)\% Processor Time". The metric name should be a ASCII string with a length no greater than 255 characters. []
Accessing resource attributes before async attributes settled []
Accessing resource attributes before async attributes settled [] Not sure if this requires a fix? Will be great if you can confirm though. Maybe something I am doing wrong? |
@prateekkathal To address each of these:
Please let me know if you have any other concerns. |
@JacksonWeber Thanks, that makes sense. I wish there was a way to just stop the package from emitting out these logs until a "DEBUG" flag was turned on for example. These extra logs are not useful for many developers directly using this SDK. Maybe something you can add in the release pipeline? As far as this issue is concerned though, you can mark it as resolved. Have a good one! |
I'm still facing this issue. I've audited my code for
And I appear to be using the app insights version with the patch (v3.0.1): I have also modified my config to match #1310 (comment). Yet I'm still getting the errors below... did I miss anything?
|
@chriskuech Please make sure to use version 3.0.1 of the Application Insights SDK as 3.0.0 has an issue with the manual track methods from incorrect serialization of the log body. Let me know if that version works for you. |
@JacksonWeber yes that package.json screenshot is from within my |
@chriskuech Not seeing any similar errors on my end with |
Interesting. I restarted the upgrade fresh and removed the |
@chriskuech No worries! Always appreciate folks reporting issues, thanks for taking the time to report! |
I just migrated to version 3 and I get this error message:
Envelopes could not be exported and are not retriable. Error message: [
'Error "body.data.baseData.ver cannot be null or undefined." occurred in serializing the payload - "body".'
]
{"stack":"Error: Error "body.data.baseData.ver cannot be null or undefined." occurred in serializing the payload - "body".\n at serializeRequestBody (/home//source//node_modules/@azure/core-client/dist/commonjs/serializationPolicy.js:119:19)\n at Object.sendRequest (/home//source//node_modules/@azure/core-client/dist/commonjs/serializationPolicy.js:28:17)\n at /home//source//node_modules/@azure/core-rest-pipeline/dist/index.js:96:31\n at HttpPipeline.sendRequest (/home//source//node_modules/@azure/core-rest-pipeline/dist/index.js:99:16)\n at ApplicationInsightsClient.sendRequest (/home//source//node_modules/@azure/core-client/dist/commonjs/serviceClient.js:48:30)\n at ApplicationInsightsClient.sendOperationRequest (/home//source//node_modules/@azure/core-client/dist/commonjs/serviceClient.js:110:44)\n at ApplicationInsightsClient.track (/home//source//node_modules/@azure/monitor-opentelemetry-exporter/dist/index.js:1834:21)\n at HttpSender.send (/home//source//node_modules/@azure/monitor-opentelemetry-exporter/dist/index.js:2800:38)\n at HttpSender.exportEnvelopes (/home//source//node_modules/@azure/monitor-opentelemetry-exporter/dist/index.js:2589:55)\n at /home//source//node_modules/@azure/monitor-opentelemetry-exporter/dist/index.js:3864:47\n at AsyncLocalStorage.run (node:async_hooks:338:14)\n at AsyncLocalStorageContextManager.with (/home//source//node_modules/@opentelemetry/context-async-hooks/build/src/AsyncLocalStorageContextManager.js:33:40)\n at ContextAPI.with (/home//source//node_modules/@opentelemetry/api/build/src/api/context.js:60:46)\n at AzureMonitorLogExporter.export (/home//source//node_modules/@azure/monitor-opentelemetry-exporter/dist/index.js:3863:31)\n at /home//source//node_modules/@opentelemetry/core/build/src/internal/exporter.js:29:28\n at AsyncLocalStorage.run (node:async_hooks:338:14)\n at AsyncLocalStorageContextManager.with (/home//source//node_modules/@opentelemetry/context-async-hooks/build/src/AsyncLocalStorageContextManager.js:33:40)\n at ContextAPI.with (/home//source//node_modules/@opentelemetry/api/build/src/api/context.js:60:46)\n at /home//source//node_modules/@opentelemetry/core/build/src/internal/exporter.js:28:27\n at new Promise ()\n at Object._export (/home//source//node_modules/@opentelemetry/core/build/src/internal/exporter.js:26:12)\n at doExport (/home//source//node_modules/@azure/monitor-opentelemetry/node_modules/@opentelemetry/sdk-logs/build/src/export/BatchLogRecordProcessorBase.js:124:14)","message":"Error "body.data.baseData.ver cannot be null or undefined." occurred in serializing the payload - "body".","name":"Error"} []
The text was updated successfully, but these errors were encountered: