LoginFailedExceptions UPDATE
Please, update CatchPokemonAtAreaExample with cause to LoginFailedExceptions #220
What is the problem with CatchPokemonAtAreaExample? The logger logs the cause of the exception successfully to the stdout.
See the output of my last test with CatchPokemonAtAreaExample:
E/Main: Failed to login or server issue:
com.pokegoapi.exceptions.LoginFailedException: java.net.SocketTimeoutException: connect timed out
at com.pokegoapi.auth.PtcLogin.login(PtcLogin.java:196)
at com.pokegoapi.examples.CatchPokemonAtAreaExample.main(CatchPokemonAtAreaExample.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at okhttp3.internal.platform.Platform.connectSocket(Platform.java:124)
at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:187)
at okhttp3.internal.connection.RealConnection.buildConnection(RealConnection.java:173)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:114)
at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:193)
at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:129)
at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:98)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:109)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:124)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at com.pokegoapi.auth.PtcLogin$2.intercept(PtcLogin.java:86)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:170)
at okhttp3.RealCall.execute(RealCall.java:60)
at com.pokegoapi.auth.PtcLogin.login(PtcLogin.java:122)
... 6 more
Looks like PTC was down?
yes it was, but google login is still working.
How did you see that output? I use this API in Android Studio and i read only: MainFailed to login or server issue: com.pokegoapi.exceptions.LoginFailedException
@mpcom00 you maybe doesn´t have the latest build?
I think so, i have followed this(https://jitpack.io/#Grover-c13/PokeGOAPI-Java/master-SNAPSHOT) one hour ago
@mpcom00 you have to use the dev branch.
Thanks, but how I insert the dev branch in gradle's dependencies?
you can try https://jitpack.io/#Grover-c13/PokeGOAPI-Java/development-SNAPSHOT
With that link I insert the SNAPSHOT relase, but how I insert the dev branch?
com.github.Grover-c13:PokeGOAPI-Java:development-SNAPSHOT
I have used that, but the cause to LoginFailedExceptions isn't visible, how can I fix?
you posted a link with the master branch first
Sorry, I made a mistake when reading the text, thanks for the answer
changing com.github.Grover-c13:PokeGOAPI-Java:master-SNAPSHOT TO com.github.Grover-c13:PokeGOAPI-Java:development-SNAPSHOT there is an error:
Error:(25, 13) Failed to resolve: com.github.Grover-c13:PokeGOAPI-Java:development-SNAPSHOT <a href="openFile:E:/Utenti/mpcom/Desktop/poke/Testapi2.0/app/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
WHY?
Have you tried changing development to Development? It looks like it can't find the dependency. The branch here on Github has a capital D, so that might be it.
Thanks it works now