HENGSHI SENSE Other Frequently Asked Questions
Oauth2 Configuration Issues
Certificate Issue on Ubuntu 18.04 Causing OAuth2 Configuration Failure
This issue occurs with JDK version 1.8.
HttpCommunicationException: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at sun.security.ssl.Alerts.getSSLException(Alerts.java:214)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1958)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1915)
at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1898)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1419)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1396)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1282)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1257)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250)
at com.github.scribejava.core.httpclient.jdk.JDKHttpClient.prepareConnectionForBodyAndGetOutputStream(JDKHttpClient.java:224)
at com.github.scribejava.core.httpclient.jdk.JDKHttpClient.addBody(JDKHttpClient.java:211)
at com.github.scribejava.core.httpclient.jdk.JDKHttpClient.access$100(JDKHttpClient.java:24)
Execute the following commands to reinstall and check if the OAuth2 configuration is successful:
sudo apt-get install ca-certificates-java -y
sudo update-ca-certificates -f
Screenshot Tool Dependency Issues
All Screenshot Tools Execution Failed, Including PDF Export and PNG Export
The keywords are libplc4.so, libnss3, with logs similar to the following:
[2024-11-11T10:06:15.235+0800] [710760] [10.74.194.115] [10.74.194.115] [8081] [01JCCFHFE13MN9RWFT65F368AB] [11909] [DEBUG] [com.hengshi.nangaparbat.screenshot.JavaShellExecutor] [53] - CommandLine: /bin/bash /opt/hengshi/lib/hengshishot-1.1.31-linux-no-arch/bin/hengshi-shot.sh --shotType=png --shotPath=/opt/hengshi/temp_data/screenshot/83833603-4468-49c2-b80e-19e29b572a0b.png --shotUrl=http://localhost:8081/screenshot/app/E2310E8E94FC0BEA3C0E98092210BB83A/dashboard/E8787F9BA9F818810116C95BBA55D0411?activeClickQuerys=&activeTabs=&cacheId=01JCCFHFE13MN9RWFT65F368AB&haveBackground=1&haveTitle=true&height=960&locale=zh-CN&mode=pc&requestId=01JCCFHFE13MN9RWFT65F368AB&timeout=55000&totalHeight=960&type=png&width=2048 --skey=ca03fea5-5bfa-4c58-aa81-9da1e444677c-238b40fc-e5ba-4527-b938-2bfbe21fbba5 --uid=2 --tenantId=null --timeout=52000 exec time: 167 ms
[2024-11-11T10:06:15.235+0800] [710760] [10.74.194.115] [10.74.194.115] [8081] [01JCCFHFE13MN9RWFT65F368AB] [11909] [INFO] [com.hengshi.nangaparbat.screenshot.CommandHelper] [106] - CommandLine stdout: {"_":[],"shotType":"png","shotPath":"/opt/hengshi/temp_data/screenshot/83833603-4468-49c2-b80e-19e29b572a0b.png","shotUrl":"http://localhost:8081/screenshot/app/E2310E8E94FC0BEA3C0E98092210BB83A/dashboard/E8787F9BA9F818810116C95BBA55D0411?activeClickQuerys=&activeTabs=&cacheId=01JCCFHFE13MN9RWFT65F368AB&haveBackground=1&haveTitle=true&height=960&locale=zh-CN&mode=pc&requestId=01JCCFHFE13MN9RWFT65F368AB&timeout=55000&totalHeight=960&type=png&width=2048","skey":"ca03fea5-5bfa-4c58-aa81-9da1e444677c-238b40fc-e5ba-4527-b938-2bfbe21fbba5","uid":2,"tenantId":"null","timeout":52000}
Failed to launch the browser process!
/opt/hengshi/lib/hengshishot-1.1.31-linux-no-arch/node_modules/puppeteer/.local-chromium/linux-884014/chrome-linux/chrome: error while loading shared libraries: libplc4.so: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
Error: Failed to launch the browser process!
/opt/hengshi/lib/hengshishot-1.1.31-linux-no-arch/node_modules/puppeteer/.local-chromium/linux-884014/chrome-linux/chrome: error while loading shared libraries: libplc4.so: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
at onClose (/opt/hengshi/lib/hengshishot-1.1.31-linux-no-arch/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:194:20)
at Interface.helper_js_1.helper.addEventListener (/opt/hengshi/lib/hengshishot-1.1.31-linux-no-arch/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:184:68)
Install NSS Library: On most Linux distributions, you can install the required NSS library through the package manager. Depending on your distribution, use one of the following commands. For other systems, please refer to the operating system's dependency installation documentation:
Ubuntu/Debian:
bashsudo apt-get update sudo apt-get install libnss3
CentOS/RHEL:
bashsudo yum install nss
Fedora:
bashsudo dnf install nss
Check Library Files: After installing the dependency library, check if
libplc4.so
is in the system's library path. You can use thefind
command to locate this file:bashfind / -name libplc4.so
After performing the above operations, try running the PDF and PNG export operations again, and they should be successfully exported. If the problem persists, ensure compatibility between the system architecture and related software versions.