Skip to content

Surface error for missing key or url. - #6179

Merged
michelinewu merged 1 commit into
masterfrom
mw_missing_stream_key_error
Sep 11, 2026
Merged

Surface error for missing key or url.#6179
michelinewu merged 1 commit into
masterfrom
mw_missing_stream_key_error

Conversation

@michelinewu

Copy link
Copy Markdown
Contributor

Surface a Specific Error When the Stream Key or Server URL Is Missing

Issues

Two separate paths in streaming.ts collapse a missing stream key or server URL into an unhelpful generic error, giving the user no indication of what's actually wrong or how to fix it.

Screenshot 2026-09-10 161020 Screenshot 2026-09-10 160532

Fixes

  • Added getMissingStreamSetting(context?) to StreamingService, which checks Stream or StreamSecond for missing key(s)/url(s).
  • Added error types STREAM_KEY_MISSING and STREAM_SERVER_MISSING.

Files changed: app/services/streaming/streaming.ts, app/services/streaming/stream-error.ts, app/i18n/en US/streaming.json

Performance Implications

None.

Copilot AI lite review requested due to automatic review settings September 10, 2026 23:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved startup error handling can misclassify failures and provide incorrect recovery guidance.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds specific errors for missing stream keys or server URLs during stream startup.

Changes:

  • Detects missing settings across stream output contexts.
  • Adds typed errors and English translations.
  • Surfaces more actionable startup diagnostics.

Review notes include unresolved context propagation, incorrect fallback classification for cancellations and non-streaming failures, and ineffective guidance for manual stream settings.

File summaries
File Summary
app/services/streaming/streaming.ts Detects and surfaces missing stream settings.
app/services/streaming/stream-error.ts Defines missing-setting error types and guidance.
app/i18n/en-US/streaming.json Adds English error translations.
Review details

Suppressed comments (7)

app/services/streaming/stream-error.ts:47

  • getMissingStreamSetting reaches STREAM_SERVER_MISSING only when streamType !== 'rtmp_common', i.e. for a custom/manual ingest. Re-login or remerging cannot populate a manually configured server URL, so this directs users to an ineffective remedy; use a stream-settings instruction or choose the action based on the stream type.
  STREAM_SERVER_MISSING: {
    get message() {
      return $t('Server url missing. Relogin or remerge to refresh it.');
    },

app/services/streaming/stream-error.ts:42

  • This type is also selected for rtmp_custom outputs, where the key is manually configured rather than refreshed by logging in or remerging. In that case the message sends the user down the wrong recovery path; tailor the action to the stream type or instruct them to edit Stream Settings.
  STREAM_KEY_MISSING: {
    get message() {
      return $t('Stream key missing. Relogin or remerge to refresh it.');
    },

app/services/streaming/streaming.ts:4473

  • This handler is shared by streaming, recording, and replay-buffer outputs, and BadPath is also the error used for invalid recording paths. If a recording path fails while the stream key is empty, this condition selects STREAM_KEY_MISSING and the recording error is reported as a stream-key problem, masking the actual path error. Restrict the missing-setting lookup to streaming outputs.
    const missingSetting =
      info.code === EOutputCode.InvalidStream || info.code === EOutputCode.BadPath
        ? this.getMissingStreamSetting(info.service)
        : null;

app/services/streaming/streaming.ts:4426

  • These values are read from the mutable global OBS settings, not from the settings used by the failing output instance. In the enhanced-broadcasting multistream path, Twitch settings are written, createStreaming starts the instance, and the previous custom settings are restored immediately afterward (lines 2619-2645). The later OBS error signal can therefore be checked against the restored settings and miss a missing Twitch key or report the wrong field. Keep the effective key/server/type with each output context or pass those values into this check.
    const settings =
      display === 'vertical'
        ? this.settingsService.views.values.StreamSecond
        : this.settingsService.views.values.Stream;

app/services/streaming/streaming.ts:788

  • finishStartStreaming also rejects with no error when the user cancels the confirmation dialog (lines 1956-1957). With this lookup, cancelling a start while the saved key is blank is treated as STREAM_KEY_MISSING and updates the stream error state even though no output was attempted. Only apply the missing-setting fallback after an actual output-start failure, while preserving the cancellation path.
      const missingSetting = this.getMissingStreamSetting();

app/services/streaming/streaming.ts:795

  • finishStartStreaming() rejects for any output-start failure, not only stream-output failures (handleFactoryOutputError calls rejectStartStreaming() for recording/replay-buffer and other errors too). This branch classifies all of those failures as a missing key/server whenever the current settings are blank, so an unrelated disk/path/encoder failure can be reported as STREAM_KEY_MISSING. Carry the failing output type/context through the rejection and only apply this fallback to a confirmed streaming-output error.
      } else if (missingSetting) {
        failureType = missingSetting === 'key' ? 'STREAM_KEY_MISSING' : 'STREAM_SERVER_MISSING';
      }

app/services/streaming/streaming.ts:4408

  • The new documentation has a subject–verb agreement error: “signals” is plural, so this should say “OBS signals return …”.
   * @remark OBS signals returns a generic `InvalidStream`/`BadPath` error when the stream failed to
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

: 'UNKNOWN_ERROR';
// A blank stream key or server url fails here as a bare `UNKNOWN_ERROR`, which tells the
// user nothing. Name the missing field instead when that is what went wrong.
const missingSetting = this.getMissingStreamSetting();
@bundlemon

bundlemon Bot commented Sep 10, 2026

Copy link
Copy Markdown

BundleMon

Files updated (1)
Status Path Size Limits
renderer.(hash).js
10.54MB (+1.38KB +0.01%) -
Unchanged files (3)
Status Path Size Limits
vendors~renderer.(hash).js
4.67MB -
updater.js
115.29KB -
guest-api.js
40.23KB -

Total files change +1.38KB +0.01%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@michelinewu
michelinewu merged commit 8c948d3 into master Sep 11, 2026
10 of 15 checks passed
@michelinewu
michelinewu deleted the mw_missing_stream_key_error branch September 11, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants