{"record":{"id":"9b931dda4eb946b1","repo":"angular/angular","slug":"force-gc-is-not-supported-on-ios","errorCode":null,"errorMessage":"Force GC is not supported on iOS","messagePattern":"Force GC is not supported on iOS","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/benchpress/src/webdriver/ios_driver_extension.ts","lineNumber":23,"sourceCode":" * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Injectable} from '@angular/core';\n\nimport {WebDriverAdapter} from '../web_driver_adapter';\nimport {PerfLogEvent, PerfLogFeatures, WebDriverExtension} from '../web_driver_extension';\n\n@Injectable()\nexport class IOsDriverExtension extends WebDriverExtension {\n  static PROVIDERS = [{provide: IOsDriverExtension, deps: [WebDriverAdapter]}];\n\n  constructor(private _driver: WebDriverAdapter) {\n    super();\n  }\n\n  override gc(): Promise<any> {\n    throw new Error('Force GC is not supported on iOS');\n  }\n\n  override timeBegin(name: string): Promise<any> {\n    return this._driver.executeScript(`console.time('${name}');`);\n  }\n\n  override timeEnd(name: string, restartName: string | null = null): Promise<any> {\n    let script = `console.timeEnd('${name}');`;\n    if (restartName != null) {\n      script += `console.time('${restartName}');`;\n    }\n    return this._driver.executeScript(script);\n  }\n\n  // See https://github.com/WebKit/webkit/tree/master/Source/WebInspectorUI/Versions\n  override readPerfLog() {\n    // TODO(tbosch): Bug in IOsDriver: Need to execute at least one command\n    // so that the browser logs can be read out!","sourceCodeStart":5,"sourceCodeEnd":41,"githubUrl":"https://github.com/angular/angular/blob/51cb07e98081ab7e4e84a9e0949266a8e19cca84/packages/benchpress/src/webdriver/ios_driver_extension.ts#L5-L41","documentation":"The cached variable's initializer must be the _taggedTemplateLiteral(cooked, raw) call. unwrapLazyLoadHelperCall() throws this error when the initializer is anything else (an identifier, object literal, conditional, ...), because the template object cannot be unwrapped.","triggerScenarios":"A custom transform replaces or wraps the initializer expression of the helper's cached variable before the localize plugin processes the file.","commonSituations":"Custom build plugins rewriting helper internals; emit shapes from incompatible compiler versions.","solutions":["Remove custom transforms that rewrite template-object helper internals, or apply the localize step before them","Rebuild the affected package from source","Align toolchain versions"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"function isBabelParseError(e: unknown): e is BabelParseError {\n  return e instanceof Error && (e as any).type === 'BabelParseError';\n}","tryCatchPattern":"try {\n  const result = await babelTransformAsync(code, {plugins: [localizePlugin]});\n} catch (e) {\n  if (isBabelParseError(e)) {\n    throw new Error(`Failed to translate ${filePath}: ${e.message}`);\n  }\n  throw e;\n}","preventionTips":["Do not apply custom transforms that rewrite template-object helper internals before the localize step","Translate compiler output directly","Align toolchain versions"],"tags":["angular","localize","babel","i18n","transform"],"backgroundTag":"angular-localize-babel-transform-error","analyzedSha":"51cb07e98081ab7e4e84a9e0949266a8e19cca84","analyzedAt":"2026-08-22T07:04:54.531Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}