Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] outputDir handling: unclear error message and the need to delete it #28289

Closed
1 task done
alexnb opened this issue Nov 22, 2023 · 2 comments
Closed
1 task done

Comments

@alexnb
Copy link

alexnb commented Nov 22, 2023

System info

  • Playwright Version: v1.40
  • Operating System: 22.04.1-Ubuntu or Docker
  • Browser: All
  • Other info:

Source code

  • I provided exact source code that allows reproducing the issue locally.

Config file

// playwright.config.ts
import type { PlaywrightTestConfig } from "@playwright/test";

const config: PlaywrightTestConfig = {
  outputDir: "/root/out",
};
export default config;

Test file (self-contained)

No test files required.

package.json

{
    "name": "test1",
    "private": true,
    "dependencies": {},
    "scripts": {
      "test:e2e-packaged": "playwright test .",
      "test:install": "playwright install firefox"
    },
    "devDependencies": {
      "@playwright/test": "^1.40.0"
    }
}

Steps

  • create a directory which can not be deleted by the user running playwright:
sudo mkdir /root/out
  • call playwright
yarn install && yarn test:install && yarn test:e2e-packaged

Expected

Clear error message about outputDir not being writable.
The best would be when playwright would just delete the contents of the outputDir and not the outputDir itself.

Actual

TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator))

It is really hard to understand what is wrong. Also the documentation says that the outputDir will be cleaned (and not deleted).

I noticed this issue in a docker environment, where a docker volume mount point was specified as an outputDir. Since a couple of days this does not work anymore, with the above error message. Although the directory specified was rwx for the user, playwright failed to run (because it probably tried to delete it and deleting volume mount point does not work withe the message device busy)

@yury-s

This comment was marked as resolved.

@yury-s
Copy link
Member

yury-s commented Nov 22, 2023

Scratch that, turns out it was fixed recently by #28239 but the fix is not published yet. It will be released in the next patch release of playwright.

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

No branches or pull requests

2 participants