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

Crash when checking login data #444

Open
yagueto opened this issue Jul 23, 2023 · 1 comment
Open

Crash when checking login data #444

yagueto opened this issue Jul 23, 2023 · 1 comment
Labels
Bug Something isn't working Unverified Issue not yet confirmed/reproduced or feature requests not yet checked for plausibility

Comments

@yagueto
Copy link

yagueto commented Jul 23, 2023

Describe your problem!

When clicking the check login data after inputting the username and password, the app crashes with the error below. It is saved and the credentials work when loading a cartridge however

07-23 20:39:53.772 16609 16676 E AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
07-23 20:39:53.772 16609 16676 E AndroidRuntime: Process: menion.android.whereyougo, PID: 16609
07-23 20:39:53.772 16609 16676 E AndroidRuntime: java.lang.RuntimeException: An error occurred while executing doInBackground()
07-23 20:39:53.772 16609 16676 E AndroidRuntime: 	at android.os.AsyncTask$4.done(AsyncTask.java:415)
07-23 20:39:53.772 16609 16676 E AndroidRuntime: 	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:381)
07-23 20:39:53.772 16609 16676 E AndroidRuntime: 	at java.util.concurrent.FutureTask.setException(FutureTask.java:250)
07-23 20:39:53.772 16609 16676 E AndroidRuntime: 	at java.util.concurrent.FutureTask.run(FutureTask.java:269)
07-23 20:39:53.772 16609 16676 E AndroidRuntime: 	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
07-23 20:39:53.772 16609 16676 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
07-23 20:39:53.772 16609 16676 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
07-23 20:39:53.772 16609 16676 E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:1012)
07-23 20:39:53.772 16609 16676 E AndroidRuntime: Caused by: java.lang.IllegalStateException: Unable to extract the trust manager on Android10Platform, sslSocketFactory is class menion.android.whereyougo.network.TLSSocketFactory
07-23 20:39:53.772 16609 16676 E AndroidRuntime: 	at okhttp3.OkHttpClient$Builder.sslSocketFactory(OkHttpClient.kt:751)
07-23 20:39:53.772 16609 16676 E AndroidRuntime: 	at menion.android.whereyougo.network.LoginTask.init(LoginTask.java:120)
07-23 20:39:53.772 16609 16676 E AndroidRuntime: 	at menion.android.whereyougo.network.LoginTask.doInBackground(LoginTask.java:62)
07-23 20:39:53.772 16609 16676 E AndroidRuntime: 	at menion.android.whereyougo.network.LoginTask.doInBackground(LoginTask.java:25)
07-23 20:39:53.772 16609 16676 E AndroidRuntime: 	at android.os.AsyncTask$3.call(AsyncTask.java:394)
07-23 20:39:53.772 16609 16676 E AndroidRuntime: 	at java.util.concurrent.FutureTask.run(FutureTask.java:264)
07-23 20:39:53.772 16609 16676 E AndroidRuntime: 	... 4 more

How to reproduce?

  1. Click on settings > login credentials
  2. Input the login credentials
  3. Click on check login data

Actual result after these steps?

The app crashes, even though the credentials are correctly saved and work afterwards

Expected result after these steps?

The app doesn't crash

Reproducible

Yes

WhereYouGo Version

2023.02.22

System information

Android 12, Samsung A33

Additional Information

No response

@yagueto yagueto added Bug Something isn't working Unverified Issue not yet confirmed/reproduced or feature requests not yet checked for plausibility labels Jul 23, 2023
@yagueto
Copy link
Author

yagueto commented Jul 25, 2023

I think the issue is here:

.sslSocketFactory(new TLSSocketFactory())

According to this stackoverflow question, the SSLSocketFactory method with one argument has been deprecated in favour of providing a X509TrustManager as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Unverified Issue not yet confirmed/reproduced or feature requests not yet checked for plausibility
Projects
None yet
Development

No branches or pull requests

1 participant