异常 java.lang.UnsatisfiedLink尝试 webdriver.io 项目中打开诱惑报告时出错
我有一个小型 webdriver.io 项目,只是为了第一次尝试它。我现在想添加诱惑报告,但当我尝试运行时,我得到以下异常,我不知道我必须在哪里寻找解决这个问题:allure open
Starting web server...
2021-05-04 22:06:43.669:INFO::main: Logging initialized @349ms to org.eclipse.jetty.util.log.StdErrLog
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-11-openjdk-amd64/lib/libawt_xawt.so
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2630)
at java.base/java.lang.Runtime.load0(Runtime.java:768)
at java.base/java.lang.System.load(System.java:1837)
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442)
at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498)
at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2648)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
at java.base/java.lang.System.loadLibrary(System.java:1873)
at java.desktop/java.awt.Toolkit$3.run(Toolkit.java:1399)
at java.desktop/java.awt.Toolkit$3.run(Toolkit.java:1397)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.desktop/java.awt.Toolkit.loadLibraries(Toolkit.java:1396)
at java.desktop/java.awt.Toolkit.<clinit>(Toolkit.java:1429)
at java.desktop/java.awt.Desktop.isDesktopSupported(Desktop.java:328)
at io.qameta.allure.Commands.openBrowser(Commands.java:220)
at io.qameta.allure.Commands.open(Commands.java:152)
at io.qameta.allure.CommandLine.run(CommandLine.java:165)
at java.base/java.util.Optional.orElseGet(Optional.java:369)
at io.qameta.allure.CommandLine.main(CommandLine.java:88)
报告生成得很好。只有当我尝试打开它们时,我才会收到此错误。
我通过npm安装了allure-reporter和allure-commandline。我在 Debian WSL 中拥有我的项目,并使用 VcXsrv X Server 运行 chromedriver,以防万一这可能有所帮助。
有没有人知道如何解决这个错误,或者有提示要查找的内容?我希望我给了你足够的信息。如果没有,只需说出您的需求。提前感谢您的帮助!
编辑:我再次安装了openjdk-11-jdk,解决了原始错误。但现在我收到以下消息:
2021-05-04 23:33:34.871:INFO::main: Logging initialized @395ms to org.eclipse.jetty.util.log.StdErrLog
Browse operation is not supported on your platform.You can use the link below to open the report manually.
java.lang.UnsupportedOperationException: The BROWSE action is not supported on the current platform!
at java.desktop/java.awt.Desktop.checkActionSupport(Desktop.java:380)
at java.desktop/java.awt.Desktop.browse(Desktop.java:524)
at io.qameta.allure.Commands.openBrowser(Commands.java:222)
at io.qameta.allure.Commands.open(Commands.java:152)
at io.qameta.allure.CommandLine.run(CommandLine.java:165)
at java.base/java.util.Optional.orElseGet(Optional.java:369)
at io.qameta.allure.CommandLine.main(CommandLine.java:88)
Server started at <http://127.0.1.1:46223/>. Press <Ctrl+C> to exit
当我点击该链接时,它无法访问。