-
-
Notifications
You must be signed in to change notification settings - Fork 443
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into protocol-using-webdriver-driver
- Loading branch information
Showing
55 changed files
with
254 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,8 +27,8 @@ | |
}, | ||
{ | ||
"files": [ | ||
"examples/**.yml", | ||
"examples/**.md" | ||
"docs/**.yml", | ||
"docs/**.md" | ||
] | ||
}, | ||
{ | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Issues generating PDF files | ||
_Contributors: [Dario Kondratiuk](https://github.com/kblok)_ | ||
|
||
## Symptoms | ||
|
||
When generating PDF files using `PdfAsync`, everything works fine in your development environment. However, once you deploy your application to a server, you get a timeout. | ||
|
||
## Problem | ||
|
||
Since Chromium version 125, generating PDF files requires sandbox permissions. [See chromium issue](https://issues.chromium.org/issues/338553158). | ||
PuppeteerSharp tries to apply these permissions after the browser is downloaded, but it will proceed if this step fails. We want to ensure your application does not break if it never reaches the point of generating a PDF file. | ||
|
||
## Solution | ||
|
||
Verify whether PuppeteerSharp successfully applied the sandbox permissions. This can be done by checking the `InstalledBrowser.PermissionsFixed` property. | ||
|
||
```csharp | ||
var browserFetcher = new BrowserFetcher(); | ||
var installedBrowser = await browserFetcher.DownloadAsync(BrowserFetcher.); | ||
|
||
if (!installedBrowser.PermissionsFixed) | ||
{ | ||
Console.WriteLine("Sandbox permissions were not applied. You need to run your application as an administrator."); | ||
return; | ||
} | ||
``` | ||
|
||
If PuppeteerSharp did not manage to apply the sandbox permissions, you can manually fix this by running the `setup.exe` file that was downloaded with the browser: | ||
|
||
```bash | ||
cd <path-to-browser> | ||
.\setup.exe --configure-browser-in-directory="<path-to-browser>" | ||
``` | ||
|
||
If that doesn't work. You can try by fixing the permissions manually. You can find the instructions [here](https://pptr.dev/troubleshooting#chrome-reports-sandbox-errors-on-windows). | ||
|
||
## Recommended approach | ||
|
||
Installing the browser during runtime is not recommended, as it takes time and can delay your application. It is advisable to install the browser beforehand and pass the path to the `LaunchAsync` method. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
- name: Api Documentation | ||
href: api/ | ||
homepage: api/index.md | ||
- name: Examples | ||
href: examples/ | ||
homepage: examples/index.md | ||
- name: Docs | ||
href: docs/ | ||
homepage: docs/index.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.