microsoft / microsoft/playwright-java

[ISSUE] FileSystemNotFoundException: Provider "bundleresource" not installed

オープン
#495 コメント 8 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

P3-collecting-feedback
主要言語
Java
スター
1.6k
フォーク
298
平均マージ
3日 2時間
マージ済み PR(30日)
14

説明

Hi,
I am using playwright version 1.2.0 and getting the "Provider "bundleresource" not installed" exception.

Stacktrace -

Caused by: java.lang.RuntimeException: Failed to create driver
	at com.microsoft.playwright.impl.Driver.ensureDriverInstalled(Driver.java:46)
	at com.microsoft.playwright.impl.PlaywrightImpl.create(PlaywrightImpl.java:33)
	at com.microsoft.playwright.Playwright.create(Playwright.java:76)
	at printjob.browser.ChromiumBrowser.<init>(ChromiumBrowser.java:18)
	at printjob.browser.ChromiumBrowser.getInstance(ChromiumBrowser.java:35)
	at printjob.PrintJob.getBrowserContext(PrintJob.java:28)
	at printjob.PrintJob.execute(PrintJob.java:35)

Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)[:1.8.0_172]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)[:1.8.0_172]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)[:1.8.0_172]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)[:1.8.0_172]
	at com.microsoft.playwright.impl.Driver.createDriver(Driver.java:65)
	at com.microsoft.playwright.impl.Driver.ensureDriverInstalled(Driver.java:44)
	... 34 more
Caused by: java.nio.file.FileSystemNotFoundException: Provider "bundleresource" not installed
	at java.nio.file.Paths.get(Paths.java:147)[:1.8.0_172]
	at com.microsoft.playwright.impl.DriverJar.extractDriverToTempDir(DriverJar.java:68)
	at com.microsoft.playwright.impl.DriverJar.<init>(DriverJar.java:32)

POM snippet-
I used maven bundle plugin OSGI for bundling/creating jar of my project.

<plugin>
    
<groupId>org.apache.felix</groupId>
    
     <artifactId>maven-bundle-plugin</artifactId>
    
     <version>5.1.2</version>
    
     <extensions>true</extensions>
    
     <configuration>
        
            <unpackBundle>true</unpackBundle>
        
            <instructions>
            
                    <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
                     
                    <Export-Package>com.project.html2pdf</Export-Package>
           
                    <Embed-Dependency>*;scope=compile</Embed-Dependency>
            
                   <Import-Package>sun.misc.*;resolution:=optional,*</Import-Package>
            
                   <Embed-Transitive>true</Embed-Transitive>
        
             </instructions>
   
        </configuration>

</plugin>


<dependency>
   
        <groupId>com.microsoft.playwright</groupId>
    
       <artifactId>playwright</artifactId>
    
       <version>1.12.0</version>
    
       <scope>compile</scope>

</dependency>
```


Can anyone please help resolve this issue?

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

DriverJar.extractDriverToTempDir と Driver.ensureDriverInstalled から開始し、提供されたスタックトレースを使って Maven Bundle Plugin の設定下でのドライバー抽出を追跡します。バンドルされたアプリケーションと Playwright 依存関係を使って再現し、その後、bundleresource FileSystemNotFoundException なしで Playwright.create() がドライバーを作成できることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
testing-qa
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。