bettercap/bettercap · error · Error

Expected '${identifier}' to be an array, [start, end].

Error message

Expected '${identifier}' to be an array, [start, end].

What it means

assertInterpolationSymbols validates custom interpolation delimiters (CompilerOptions.interpolation). It fires when the option is non-null but not exactly a 2-element array: Angular needs a [start, end] pair such as ['{{', '}}'] to replace the defaults, and any other shape (wrong length, non-array) is rejected.

Source

Thrown at modules/ui/ui/vendor.js:23299

    if (!Array.isArray(value)) {
        throw new Error("Expected '" + identifier + "' to be an array of strings.");
    }
    for (var i = 0; i < value.length; i += 1) {
        if (typeof value[i] !== 'string') {
            throw new Error("Expected '" + identifier + "' to be an array of strings.");
        }
    }
}
var INTERPOLATION_BLACKLIST_REGEXPS = [
    /^\s*$/,
    /[<>]/,
    /^[{}]$/,
    /&(#|[a-z])/i,
    /^\/\//,
];
function assertInterpolationSymbols(identifier, value) {
    if (value != null && !(Array.isArray(value) && value.length == 2)) {
        throw new Error("Expected '" + identifier + "' to be an array, [start, end].");
    }
    else if (value != null) {
        var start_1 = value[0];
        var end_1 = value[1];
        // black list checking
        INTERPOLATION_BLACKLIST_REGEXPS.forEach(function (regexp) {
            if (regexp.test(start_1) || regexp.test(end_1)) {
                throw new Error("['" + start_1 + "', '" + end_1 + "'] contains unusable interpolation symbol.");
            }
        });
    }
}

/**
 * @license
 * Copyright Google Inc. All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be

View on GitHub (pinned to 8eca2820f3)

Solutions

  1. Set interpolation to a two-element array like ['{{','}}'] or leave it undefined to use defaults
  2. Check for accidental string assignment such as interpolation: '{{ }}'
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at modules/ui/ui/vendor.js:23299 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of bettercap/bettercap@8eca2820f3 (2026-09-02). Data as JSON: /api/errors/b4f70abce1973d36. Report an issue: GitHub.