Kodehawa / imageboard-api

Simple asynchronous Java API wrapper around the most popular danbooru-compatible (Konachan, Yande.re, Danbooru, Gelbooru, etc) booru APIs.
Apache License 2.0
53 stars 10 forks source link

Safebooru error on linux #13

Closed Doomsdayrs closed 6 years ago

Doomsdayrs commented 6 years ago

https://pastebin.com/j3Gbac3g

 int limitGet = DefaultImageBoards.SAFEBOORU.search(combined).blocking().size();
            BoardImage SFWbooru = (BoardImage) ((List) DefaultImageBoards.SAFEBOORU.search(combined).blocking()).get(Others.gen.nextInt(limitGet) + 1);

This error only seems to occur on the Linux device that runs my program, i do not know when exactly it started, but it makes using the image board impossible on Linux. I've tested with a stand alone program as well to confirm my own program was not at fault, and it failed the same way.

Kodehawa commented 6 years ago

This doesn't seem to be an issue with the library itself. Cannot reproduce either, seems like a SSL certificate error on your end.

CC: Caused by: java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Doomsdayrs commented 6 years ago

How can it be fixed in a Linux environment?

Kodehawa commented 6 years ago

Depends on the case, just try googling "java rebuild ssl certificate storage"

Doomsdayrs commented 6 years ago

After a bit of looking at the problem, i solved it by uninstalling all of java installs and the ca-certificates-java package. And reinstalling it from scratch. Maybe it was simply an incorrect install, but that fixed it