microsoft / microsoft/playwright-java

[ISSUE] FileSystemNotFoundException: Provider "bundleresource" not installed

Ouverte
#495 8 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

P3-collecting-feedback
Langage dominant
Java
Étoiles
1.6k
Forks
298
Merge moyen
3 j 2 h
PR mergées (30 j)
14

Description

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?

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par DriverJar.extractDriverToTempDir et Driver.ensureDriverInstalled, puis utilisez la stack trace fournie pour suivre l’extraction du driver avec la configuration de Maven Bundle Plugin. Reproduisez le problème avec l’application embarquée et la dépendance Playwright, puis vérifiez que Playwright.create() peut créer le driver sans la bundleresource FileSystemNotFoundException.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java
Domaine
testing-qa
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.