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] dotnet build does not override files #2069

Closed
mxschmitt opened this issue Mar 16, 2022 · 10 comments
Closed

[Bug] dotnet build does not override files #2069

mxschmitt opened this issue Mar 16, 2022 · 10 comments

Comments

@mxschmitt
Copy link
Member

This scenario is currently broken:

dotnet add package Microsoft.Playwright --version 1.19.1
dotnet build
./bin/Debug/net6.0/dotnet2
dotnet add package Microsoft.Playwright --version 1.20.1
dotnet build
./bin/Debug/net6.0/dotnet2

Actual: it does not override driver files -> driver won't start -> breaks Playwright
Expected: it works.

Relates:

cc @campersau do you know anything that could be the cause of this? Otherwise, I would dig into it.

@campersau
Copy link
Contributor

I think the problem is that the files under the package folder in the driver zip files don't have the correct modified date.
https://playwright.azureedge.net/builds/driver/playwright-1.20.0-mac.zip
https://playwright.azureedge.net/builds/driver/playwright-1.20.0-linux.zip
https://playwright.azureedge.net/builds/driver/playwright-1.20.0-win32_x64.zip

And these incorrect modified dates are also present in the nuget package as you can see here version 1.19.1 vs 1.20.1:
image

Only the protocol.yml has a correct modified date which is the only file which gets copied by a normal dotnet build. Here a screenshot after following your steps:
image

After manually touching (find . -type f -exec touch {} +) all files in the nuget download folder for version 1.20.1 %userprofile%\.nuget\packages\microsoft.playwright\1.20.1\.playwright\package these files get correctly copied by dotnet build.

@campersau
Copy link
Contributor

Looks like it is an intentional npm pack behavior: npm/npm#20027 (comment)

@mxschmitt
Copy link
Member Author

Yup! I created a fix for it: microsoft/playwright#12864

Thank you very much for your input and good finding! 💯

@mxschmitt mxschmitt added v1.20 and removed P2-bug labels Mar 18, 2022
@mxschmitt
Copy link
Member Author

Note: We'll publish on Monday evening a fix with it. In the meantime dotnet clean is a workaround.

@rsantosdev
Copy link

The fix was supposed to go out yesterday, but nothing up to know. Even clean and restore are working anymore for me.
Any new dates?

@mxschmitt
Copy link
Member Author

Sorry for the delay, it's live now. 1.20.2

@rsantosdev
Copy link

One last thing ... what about the docker image?

@mxschmitt
Copy link
Member Author

@rsantosdev see here #1611 (comment)

@Joe118
Copy link

Joe118 commented Jun 12, 2022

I am still hitting the issue mentioned in issue #2071 with playwright.dll from microsoft.playwright.1.22.0.nupkg\lib\netstandard2.0

The line at which the NPE happens is:
214: ctx = await browser.NewContextAsync(options);

The stack trace is not very informative, including it for whatever its worth:

06/11/2022 21:48:34:574: INFO : T9: Sys: GC
06/11/2022 21:48:46:240: WARN: T15: DBD: BrowserNewContext failed: Object reference not set to an instance of an object.
06/11/2022 21:48:46:240: INFO : T15: DBD: at Microsoft.Playwright.Core.Browser.d__33.MoveNext()

06/11/2022 21:48:46:240: INFO : T15: DBD: --- End of stack trace from previous location where exception was thrown ---
06/11/2022 21:48:46:240: INFO : T15: DBD: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
06/11/2022 21:48:46:240: INFO : T15: DBD: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
06/11/2022 21:48:46:240: INFO : T15: DBD: at DojoPlatform.DojoBrowserDriver.d__63.MoveNext() in D:\dojodev\Dojo\DojoBrowserDriver\DojoBrowserObject.cs:line 214

Please help, this is a total blocker for my use of microsoft.playwright 1.22.0 from nuget.org

Thanks, --Joe

@mxschmitt
Copy link
Member Author

I am still hitting the issue mentioned in issue #2071 with playwright.dll from microsoft.playwright.1.22.0.nupkg\lib\netstandard2.0

The line at which the NPE happens is:
214: ctx = await browser.NewContextAsync(options);

The stack trace is not very informative, including it for whatever its worth:

06/11/2022 21:48:34:574: INFO : T9: Sys: GC
06/11/2022 21:48:46:240: WARN: T15: DBD: BrowserNewContext failed: Object reference not set to an instance of an object.
06/11/2022 21:48:46:240: INFO : T15: DBD: at Microsoft.Playwright.Core.Browser.d__33.MoveNext()

06/11/2022 21:48:46:240: INFO : T15: DBD: --- End of stack trace from previous location where exception was thrown ---
06/11/2022 21:48:46:240: INFO : T15: DBD: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
06/11/2022 21:48:46:240: INFO : T15: DBD: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
06/11/2022 21:48:46:240: INFO : T15: DBD: at DojoPlatform.DojoBrowserDriver.d__63.MoveNext() in D:\dojodev\Dojo\DojoBrowserDriver\DojoBrowserObject.cs:line 214

Please help, this is a total blocker for my use of microsoft.playwright 1.22.0 from nuget.org

Thanks, --Joe

Please file a new issue.

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

4 participants