Skip to content

[Bug]: netcore8.0 playwright1.57 can not run #3269

@jianzhichu

Description

@jianzhichu

Version

1.57

Steps to reproduce

Example steps (replace with your own):

  1. Clone my repo at https://github.com//example
  2. dotnet run Program.cs
  3. You should see the error come up

Expected behavior

May I ask, I used Playwright 1.57 in NetCore 8.0, and the controller wrote an interface. Then, when calling the interface in Docker to access the Baidu website, an error occurred. The error message is as follows:
"stackTrace": " at Microsoft.Playwright.Helpers.Driver.GetExecutablePath() in //src/Playwright/Helpers/Driver.cs:line 90\n at Microsoft.Playwright.Transport.StdIOTransport.GetProcess(String driverArgs) in //src/Playwright/Transport/StdIOTransport.cs:line 115\n at Microsoft.Playwright.Transport.StdIOTransport..ctor() in //src/Playwright/Transport/StdIOTransport.cs:line 45\n at Microsoft.Playwright.Playwright.CreateAsync() in //src/Playwright/Playwright.cs:line 42\n at dy.fetch.net.Controllers.PlayController.RunPlaywright()
It seems that the drive path was not found. My dockerfile is very simple.
FROM mcr.microsoft.com/playwright/dotnet:v1.57.0-jammy
WORKDIR /app
EXPOSE 8080
COPY . .
#Launch the application (core: enable. NET to automatically load Playwright driver)
ENTRYPOINT ["dotnet", "mypro.dll"]

Actual behavior

Image

Additional context

No response

Environment

- Operating System: [Ubuntu 22.04]
- CPU: [arm64]
- Browser: [All, Chromium, Firefox, WebKit]
- .NET Version (TFM): [net8.0]
- Other info:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions