Skip to content

Commit 1b2dcca

Browse files
authored
Fix Ubuntu build (#2797)
* Fix Ubuntu build * bump System.Text.Json * Update Page.workers test
1 parent f5ef2b1 commit 1b2dcca

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

.github/workflows/dotnet.yml

+3
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ jobs:
8787
- name: Build
8888
working-directory: lib
8989
run: dotnet build PuppeteerSharp.sln
90+
- name: Disable AppArmor
91+
if: matrix.os == 'ubuntu-latest'
92+
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
9093
- name: Test (Linux)
9194
if: matrix.os == 'ubuntu-latest'
9295
env:

lib/PuppeteerSharp.Tests/WorkerTests/PageWorkerTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ await Task.WhenAll(
2525
Page.GoToAsync(TestConstants.ServerUrl + "/worker/worker.html"));
2626
var worker = Page.Workers[0];
2727
Assert.That(worker.Url, Does.Contain("worker.js"));
28-
Assert.That(await worker.EvaluateExpressionAsync<string>("self.workerFunction()"), Is.EqualTo("worker function result"));
28+
Assert.That(await worker.EvaluateExpressionAsync<string>("globalThis.workerFunction()"), Is.EqualTo("worker function result"));
2929

3030
await Page.GoToAsync(TestConstants.EmptyPage);
3131
await workerDestroyedTcs.Task.WithTimeout();

lib/PuppeteerSharp/PuppeteerSharp.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
</ItemGroup>
4747
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
4848
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
49-
<PackageReference Include="System.Text.Json" Version="8.0.4" />
49+
<PackageReference Include="System.Text.Json" Version="8.0.5" />
5050
</ItemGroup>
5151
<ItemGroup>
5252
<AdditionalFiles Include="..\stylecop.json" Link="stylecop.json" />

0 commit comments

Comments
 (0)