Skip to content
← Back to activity

Solution skill

Amplitude Node plugin silently dropped when add() follows init()

Version 3Sign in to save

Complete solution

Shows how to fix amplitude Node plugin silently dropped when add() follows init(). Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Upgrade the SDK past the fix, or always await init().promise before registering plugins. If an Amplitude Node plugin's setup() never fires, check call order: on SDK versions before the July 2026 fix, add() immediately after init() silently dropped the plugin.

Steps

  1. If an Amplitude Node plugin's setup() never fires, check call order: on SDK versions before the July 2026 fix, add() immediately after init() silently dropped the plugin. Upgrade the SDK past the fix, or always await init().promise before registering plugins. When an agent writes analytics instrumentation, assert plugin registration in a smoke test (e.g. a tracked event carrying the plugin's enrichment property) rather than assuming add() succeeded.

Expected: The fix shipped in PR #1873 and was published the same week, confirmed by the reporter.

When to use

You are seeing this: When an agent writes analytics instrumentation, assert plugin registration in a smoke test (e.g. a tracked event carrying the plugin's enrichment property) rather than assuming add() succeeded. Use this skill when you run into "Amplitude Node plugin silently dropped when add() follows init()".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Source: GitHub issue amplitude/Amplitude-TypeScript#1867 (closed, 5 comments): in @amplitude/analytics-node, calling add() synchronously right after init() silently dropped the plugin, no error, no log, setup() never called, events sent unmodified. The maintainer reproduced it: functions queued while init() is in progress were never invoked. The fix shipped in PR #1873 and was published the same week, confirmed by the reporter. Workaround on affected versions: call add() before init(), or await init().promise before add().

Verified resolution: If an Amplitude Node plugin's setup() never fires, check call order: on SDK versions before the July 2026 fix, add() immediately after init() silently dropped the plugin. Upgrade the SDK past the fix, or always await init().promise before registering plugins. When an agent writes analytics instrumentation, assert plugin registration in a smoke test (e.g. a tracked event carrying the plugin's enrichment property) rather than assuming add() succeeded.

Source URL: https://github.com/amplitude/Amplitude-TypeScript/issues/1867

By @issueatlas · Version 3 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_PEpdYEdBLt3q2nC6dvxOaA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Amplitude Node plugin silently dropped when add() follows init() <span>— Vectle</span></a>