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] MSB3073 error with Microsoft.Playwright 1.41.0 on Ubuntu #2827

Closed
1 task done
martincostello opened this issue Jan 17, 2024 · 6 comments · Fixed by #2829
Closed
1 task done

[BUG] MSB3073 error with Microsoft.Playwright 1.41.0 on Ubuntu #2827

martincostello opened this issue Jan 17, 2024 · 6 comments · Fixed by #2829

Comments

@martincostello
Copy link
Contributor

martincostello commented Jan 17, 2024

System info

  • Playwright Version: v1.41.0
  • Operating System: Ubuntu, macOS
  • Browser: N/A
  • Other info:

Source code

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

Link to the GitHub repository with the repro

martincostello/dotnet-patch-automation-sample@a415907 in martincostello/dotnet-patch-automation-sample#419

Steps

  • Run build.ps1

Expected

Code compiles and tests pass.

Actual

Build fails with error MSB3073:

/home/runner/.nuget/packages/microsoft.playwright/1.41.0/buildTransitive/Microsoft.Playwright.targets(65,5): error MSB3073: The command "chmod +x """ exited with code 1. [/home/runner/work/dotnet-patch-automation-sample/dotnet-patch-automation-sample/tests/TodoApp.Tests/TodoApp.Tests.csproj]

It appears that something is going wrong here:

<Exec Command="chmod +x &quot;%(_PlaywrightChmodItems.FullPath)&quot;" />

@johnboygit
Copy link

I've also just run into this issue on my build pipeline

@mxschmitt
Copy link
Member

The issue seems that we are using OutputPath which concatenates the paths incorrectly (no trailing slash). In the example from @martincostello:

https://github.com/microsoft/playwright-dotnet/blob/e015d04439845ce7ad12d8bdad7c15a36a74465a/src/Playwright/build/Microsoft.Playwright.targets#L62C41-L62C51

OutDir = /workspaces/dotnet-patch-automation-sample/artifacts/
OutputPath = /workspaces/dotnet-patch-automation-sample/artifacts

I think we should just use OutDir and it should work. cc @campersau

As a workaround add a trailing slash at the end of --output.

@martincostello
Copy link
Contributor Author

You could also use EnsureTrailingSlash.

@campersau
Copy link
Contributor

OutDir OutputPath PublishDir
dotnet build bin/Debug/net8.0/ bin/Debug/net8.0/ bin/Debug/net8.0/publish/
dotnet build --output bin/Custom bin/Custom/ bin/Custom ⁉️ bin/Custompublish/
dotnet publish bin/Release/net8.0/ bin/Release/net8.0/ bin/Release/net8.0/publish/
dotnet publish --output bin/Custom bin/Release/net8.0/ bin/Release/net8.0/ bin/Custom

So we could use OutDir instead of OutputPath but PublishDir would always require $([MSBuild]::EnsureTrailingSlash('$(PublishDir)')).

@mxschmitt
Copy link
Member

I tried using OutDir and it broke some of the tests. Wasn't reproducible locally tho, maybe some stray files: https://github.com/microsoft/playwright-dotnet/actions/runs/7557081073/job/20575513392

@martincostello
Copy link
Contributor Author

If it helps, most of my repos use the new .NET 8 artifacts output which may have contributed to the issue, though this issue has only affected some of them.

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

Successfully merging a pull request may close this issue.

4 participants