sveltejs/kit · warning

Updates can only be sent once per command invocation. Ignori

Error message

Updates can only be sent once per command invocation. Ignoring additional updates.

What it means

Remote `command` functions return a promise with an `.updates(...)` method used to stream incremental updates to the client. The runtime warns and ignores subsequent calls if `.updates()` is invoked more than once for a single command invocation, since only one update payload per invocation is supported. The original promise is still returned.

Source

Thrown at packages/kit/src/runtime/client/remote-functions/command.svelte.js:87

							);
						}

						fail_unhandled_refreshes(refreshes);

						return response._;
					} finally {
						overrides?.forEach((fn) => fn());

						// Decrement pending count when command completes
						pending_count--;
					}
				})()
			);

		let updates_called = false;
		promise.updates = (...args) => {
			if (updates_called) {
				console.warn(
					'Updates can only be sent once per command invocation. Ignoring additional updates.'
				);
				return promise;
			}
			updates_called = true;

			try {
				({ refreshes, overrides } = categorize_updates(args));
			} catch (error) {
				updates_error = /** @type {Error} */ (error);
			}

			return promise;
		};

		return promise;
	};

View on GitHub (pinned to 03f1687fe6)

Solutions

  1. Call `.updates(...)` exactly once per command invocation, aggregating all data into that call
  2. If multiple updates are needed, restructure to one command per update or batch results
  3. Guard your own code so helper functions don't double-call `.updates`

Example fix

// before
const p = createItem();
p.updates({ step: 1 });
p.updates({ step: 2 }); // ignored + warning
// after
const p = createItem();
p.updates({ steps: [1, 2] }); // single update per invocation
Defensive patterns

Strategy: validation

Validate before calling

const sendUpdate = (p, data) => { if (p.__updateSent) throw new Error('updates already sent'); p.__updateSent = true; p.updates(data); };

Prevention

When it happens

Trigger: Calling `promise.updates(...)` two or more times on the promise returned by a single remote command invocation, e.g. calling it in a loop or in multiple code paths for the same command call.

Common situations: Attempting to send progress updates repeatedly inside a long-running command; refactored code where both a helper and the caller call `.updates()` for the same invocation.

Related errors


AI-assisted analysis of sveltejs/kit@03f1687fe6 (2026-09-02). Data as JSON: /api/errors/4ca487b7b3df8dc8. Report an issue: GitHub.