PokeGOAPI-Java icon indicating copy to clipboard operation
PokeGOAPI-Java copied to clipboard

LoginFailedExceptions UPDATE

Open ghost opened this issue 10 years ago • 17 comments

Please, update CatchPokemonAtAreaExample with cause to LoginFailedExceptions #220

ghost avatar Jul 26 '16 12:07 ghost

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

twostone avatar Jul 26 '16 12:07 twostone

Looks like PTC was down?

Grover-c13 avatar Jul 26 '16 12:07 Grover-c13

yes it was, but google login is still working.

FabianTerhorst avatar Jul 26 '16 12:07 FabianTerhorst

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

ghost avatar Jul 26 '16 12:07 ghost

@mpcom00 you maybe doesn´t have the latest build?

FabianTerhorst avatar Jul 26 '16 12:07 FabianTerhorst

I think so, i have followed this(https://jitpack.io/#Grover-c13/PokeGOAPI-Java/master-SNAPSHOT) one hour ago

ghost avatar Jul 26 '16 12:07 ghost

@mpcom00 you have to use the dev branch.

FabianTerhorst avatar Jul 26 '16 12:07 FabianTerhorst

Thanks, but how I insert the dev branch in gradle's dependencies?

ghost avatar Jul 26 '16 13:07 ghost

you can try https://jitpack.io/#Grover-c13/PokeGOAPI-Java/development-SNAPSHOT

FabianTerhorst avatar Jul 26 '16 13:07 FabianTerhorst

With that link I insert the SNAPSHOT relase, but how I insert the dev branch?

ghost avatar Jul 26 '16 13:07 ghost

com.github.Grover-c13:PokeGOAPI-Java:development-SNAPSHOT

FabianTerhorst avatar Jul 26 '16 13:07 FabianTerhorst

I have used that, but the cause to LoginFailedExceptions isn't visible, how can I fix?

ghost avatar Jul 26 '16 13:07 ghost

you posted a link with the master branch first

FabianTerhorst avatar Jul 26 '16 13:07 FabianTerhorst

Sorry, I made a mistake when reading the text, thanks for the answer

ghost avatar Jul 26 '16 13:07 ghost

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?

ghost avatar Jul 26 '16 13:07 ghost

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.

louisditzel avatar Jul 26 '16 14:07 louisditzel

Thanks it works now

ghost avatar Jul 26 '16 16:07 ghost