PokemonGoBot icon indicating copy to clipboard operation
PokemonGoBot copied to clipboard

0.4.2 PKIX path building failed (SSL issue?)

Open dan-bowerman opened this issue 10 years ago • 3 comments

Description: Earlier I was getting errors that SSL was coming back as plaintext and the app was crashing. Now I'm getting a different error message, still related to SSL but more confusing to me.

Steps to reproduce:

  1. Build 0.4.2 from source, modify config to include Google credentials, no token, default coordinates
  2. Enter the value provided to google.com/devices
  3. Run the application

Expected behavior: The bot should run

Actual behavior: The application crashes with a javax.net.ssl.SSLHandshakeException

Stacktrace (If it's a crash):

C:\PokemonGoBot>gradlew run
:PokeGOAPI-Java:extractIncludeProto UP-TO-DATE
:PokeGOAPI-Java:extractProto UP-TO-DATE
:PokeGOAPI-Java:generateProto UP-TO-DATE
:PokeGOAPI-Java:compileJava UP-TO-DATE
:PokeGOAPI-Java:processResources UP-TO-DATE
:PokeGOAPI-Java:classes UP-TO-DATE
:PokeGOAPI-Java:jar UP-TO-DATE
:compileKotlin UP-TO-DATE
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:run
Logging in to game server...
D/GoogleLogin: Get user to go to:https://www.google.com/device and enter code:XXXX-XXXX
D/GoogleLogin: Got token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Logged in as [email protected] with token xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Setting this token in your config
D/RequestHandler: Authenticated with static token
D/RequestHandler: Authenticated with static token
Exception in thread "main" com.pokegoapi.exceptions.RemoteServerException: 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
        at com.pokegoapi.main.RequestHandler.sendServerRequests(RequestHandler.java:173)
        at com.pokegoapi.api.player.PlayerProfile.updateProfile(PlayerProfile.java:79)
        at com.pokegoapi.api.player.PlayerProfile.<init>(PlayerProfile.java:67)
        at com.pokegoapi.api.PokemonGo.<init>(PokemonGo.java:66)
        at ink.abb.pogo.scraper.MainKt.main(Main.kt:71)
Caused by: 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

Version: 0.4.2

dan-bowerman avatar Jul 25 '16 18:07 dan-bowerman

Do you have a mitm proxy installed that is intercepting your connection?

Or a corporate firewall man in the middle-ing everything?

jabbink avatar Jul 25 '16 18:07 jabbink

This is what I get behind our corporate firewall. Might have something blocking you.

MASSV avatar Jul 25 '16 18:07 MASSV

Quite right, I'm home now and it's working like a charm. I expected it to be blocked at work, but figured my proxy would suffice and was receiving the same errors through both... thanks for your responses.

dan-bowerman avatar Jul 25 '16 20:07 dan-bowerman