Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master token request failing #16

Closed
FelixGail opened this issue Nov 22, 2019 · 8 comments
Closed

Master token request failing #16

FelixGail opened this issue Nov 22, 2019 · 8 comments

Comments

@FelixGail
Copy link

It looks like the master token request stopped working.

Caused by: svarzee.gps.gpsoauth.Gpsoauth$TokenRequestFailed
	at svarzee.gps.gpsoauth.Gpsoauth.performMasterLoginForToken(Gpsoauth.java:104)
	at svarzee.gps.gpsoauth.Gpsoauth.performMasterLoginForToken(Gpsoauth.java:90)
	at svarzee.gps.gpsoauth.Gpsoauth.login(Gpsoauth.java:38)

It looks like https://github.com/simon-weber/gpsoauth only updated the request version used. Are you still maintining this library?

@svarzee
Copy link
Owner

svarzee commented Dec 10, 2019

@FelixGail It's been a long time since I last touched this code but I will have a look at this.

@svarzee svarzee closed this as completed Dec 10, 2019
@svarzee svarzee reopened this Dec 10, 2019
@svarzee
Copy link
Owner

svarzee commented Dec 10, 2019

@FelixGail I cannot replicate your problem. Does the problem still persist?

@umjammer
Copy link

i got the same problem with oracle jdk 8 and open jdk 13.
but with graal vm 8, it works fine.

$ java -version 
openjdk version "1.8.0_232"
OpenJDK Runtime Environment (build 1.8.0_232-20191009173705.graal.jdk8u-src-tar-gz-b07)
OpenJDK 64-Bit GraalVM CE 19.3.0 (build 25.232-b07-jvmci-19.3-b05, mixed mode)

🚫

$ java -version
openjdk version "13" 2019-09-17
OpenJDK Runtime Environment (build 13+33)
OpenJDK 64-Bit Server VM (build 13+33, mixed mode, sharing)

$ java -version                          
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)

enabling okhttp logging, i found the only difference is EncryptedPasswd. but it changes every time. so i could not determine what is wrong...

@svarzee
Copy link
Owner

svarzee commented Dec 27, 2019

I replicated the problem using hotspot 1.8.0_231. It works fine for openjdk 1.8.0_212.
I listened on localhost and seeded the random generator so that encrypted password remains the same and the requests are exactly the same for both openjdk and hotspot. The only difference is that I listen on http while google listens on https.

I also discovered that upgrading okhttp to 3.5.0 introduces the problem even on openjdk.
I found the changes that break compatibility: square/okhttp#2690

Replacing sun.security.ssl classes with openjdk implementation makes the problem disappear.

@svarzee
Copy link
Owner

svarzee commented Dec 27, 2019

#17

@svarzee svarzee mentioned this issue Dec 27, 2019
@svarzee
Copy link
Owner

svarzee commented Dec 27, 2019

Fix at 0.6.0, tested with:

  • 1.8.0_231, x86_64: "Java SE 8"
  • 1.8.0_212, x86_64: "AdoptOpenJDK 8"

@svarzee
Copy link
Owner

svarzee commented Jan 9, 2020

For the fix to work you must use the no parameters constructor of Gpsoauth. The trick is that OkHttpClient must be constructed with propert SSL implementation.

@ZPetrovich
Copy link

@svarzee It's still does not work. Checked with

java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

could you please take a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants