langgenius/dify · error · Error

Playwright page has not been initialized for this scenario.

Error message

Playwright page has not been initialized for this scenario.

What it means

Error "Playwright page has not been initialized for this scenario." thrown in langgenius/dify.

Source

Thrown at e2e/features/support/world.ts:166

    this.context.on('weberror', (webError) => {
      this.pageErrors.push(webError.error().message)
    })
    this.context.on('download', (dl) => {
      this.capturedDownloads.push(dl)
    })
    this.page = await this.context.newPage()
  }

  async startAuthenticatedSession(browser: Browser) {
    await this.startSession(browser, true)
  }

  async startUnauthenticatedSession(browser: Browser) {
    await this.startSession(browser, false)
  }

  getPage() {
    if (!this.page) throw new Error('Playwright page has not been initialized for this scenario.')

    return this.page
  }

  getConsoleClient() {
    if (!this.consoleClient)
      throw new Error('Console API client has not been initialized for this scenario.')

    return this.consoleClient
  }

  async getAuthSession() {
    this.session ??= await readAuthSessionMetadata()
    return this.session
  }

  registerCleanup(cleanup: ScenarioCleanup) {
    this.scenarioCleanups.push(cleanup)

View on GitHub (pinned to ef8544b173)

When it happens

Trigger: Thrown at e2e/features/support/world.ts:166 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of langgenius/dify@ef8544b173 (2026-08-12). Data as JSON: /api/errors/8654d15ce688a92c. Report an issue: GitHub.