06 May 2025 02:33 PM
our production application has issues with some functionalities.
after investigation, figured out it was related to oneagent.
relevant logs:
[29.04.2025 08:06.59.288] [ERROR] /opt/dynatrace/oneagent/agent/bin/1.311.72.20250423-112851/any/nodejs/nodejsagent.js:12700
[29.04.2025 08:06.59.292] [ERROR] e.runFunctionInContext(J, k.origFn, this, ...I).then(x, z);
[29.04.2025 08:06.59.292] [ERROR] ^
[29.04.2025 08:06.59.294] [ERROR] TypeError: Cannot read properties of undefined (reading 'then')
[29.04.2025 08:06.59.294] [ERROR] at <anonymous>
[29.04.2025 08:06.59.294] [ERROR] at AsyncLocalStorage.run (node:async_hooks:330:14)
[29.04.2025 08:06.59.294] [ERROR] at processTicksAndRejections (node:internal/process/task_queues:96:5)
Had to downgrade to previous stable version, to restore the service.
want to be sure this bug is known and handled and this version is not being automatically installed when the new release comes out.
thank you.
Solved! Go to Solution.
06 May 2025 03:37 PM
Hello. Can you please describe the symptom of the issue? What was the impact? Was the application able to start up properly?
BR
06 May 2025 03:47 PM
yes the application start, but some feature that allowing to uploads files was creating this issue.
the error indicates that the Dynatrace Node.js agent is trying to call .then() on something that's undefined.
06 May 2025 03:55 PM
Understood.
Suppose you have already opened a support ticket. If this is a bug, then Support must be engaged.
BR
06 May 2025 03:58 PM
ticket is this one: https://one.dynatrace.com/hc/en-us/requests/476502
can you please indicate if the RFE is accepted, planned, already implemented, not planned, etc.
06 May 2025 04:05 PM - edited 12 May 2025 10:34 AM
This looks like an issue fixed in OneAgent 313, OA-46324. It's due to be released soon, we're just waiting for Production Go.
EDIT: OneAgent 313 is being released to SaaS tenants on 12th May.
06 May 2025 04:12 PM
thank you very much.
08 May 2025 06:23 PM
we are also seeing the same issue .. is there a workaround until the fix is released
09 May 2025 09:48 AM
The only workaround currently is to roll back the OneAgent Image to 1.309.73.20250423-112845
1. Uninstall the Operator, see steps here: https://docs.dynatrace.com/docs/shortlink/guides-k8s-update-uninstall-operator
2. Retrieve the OneAgent Version or set the OneAgent Version in your tenant to image: "dynatrace/dynatrace-oneagent:1.309.73.20250423-112845"
There are a few ways to find or set the available OneAgent versions:
Method 2: Dynatrace API (Good for Automation)
You can use the Dynatrace API to query available OneAgent versions. The specific endpoint may vary slightly depending on your Dynatrace version and API generation used, but a common one (using API v1) is:
/api/v1/deployment/installer/agent/versions/{os-type}/{installer-type}
GET {your-environment-id}.live.dynatrace.com/api/v1/deployment/installer/agent/versions/unix/paas
(Replace {your-environment-id}
with your actual environment ID).settings.read
) permission.Alternatively, check the newer Settings API (/api/v2/settings/objects
) for schemas related to OneAgent updates if the above endpoint is deprecated in your version.
3. Redeploy the Operator to pull in the latest OneAgent versions defined in Global Settings.
Go to Updates > OneAgent, you can hardcode the specific version see below:
3.1 Hardcode the Specific OneAgent Version in dynakube.yaml
The dynakube.yaml
file defines the Custom Resource for the Dynatrace Operator. You specify the OneAgent version within the spec.oneAgent
section, under the specific deployment mode you are using (e.g., classicFullStack
, cloudNativeFullStack
).
Here are examples for common deployment modes:
Example for classicFullStack
:
apiVersion: dynatrace.com/v1beta1
kind: DynaKube
metadata:
name: dynakube # Your DynaKube instance name
namespace: dynatrace # Your Dynatrace namespace
spec:
apiUrl: https://your-environment-id.live.dynatrace.com/api # Replace with your API URL
oneAgent:
classicFullStack:
# >>> HARDCODE VERSION HERE <<<
version: "1.278.123.20240420-100000"
# Tolerations, node selectors, arguments etc. might also be here
# ...
# Other configurations like ActiveGate, routing, etc.
# ...
Example for cloudNativeFullStack
:
apiVersion: dynatrace.com/v1beta1
kind: DynaKube
metadata:
name: dynakube # Your DynaKube instance name
namespace: dynatrace # Your Dynatrace namespace
spec:
apiUrl: https://your-environment-id.live.dynatrace.com/api # Replace with your API URL
oneAgent:
cloudNativeFullStack:
# >>> HARDCODE VERSION HERE <<<
version: "1.278.123.20240420-100000"
# Tolerations, node selectors, arguments etc. might also be here
# ...
# Other configurations like ActiveGate, routing, etc.
# ...
If you have any questions, please start a chat or create a Support ticket and mention ticket OA-46324
12 May 2025 10:31 AM - edited 12 May 2025 10:31 AM
OneAgent 313 has now been released. 🎉
12 May 2025 09:43 PM
Can you share the release notes for oneAgent 313 . Thanks
13 May 2025 12:32 PM
I'm sorry, but they're not quite ready yet. Also, it looks like OneAgent 313 has only been released to internal tenants, but I'm hoping it will be ready soon.