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

"Login failed" error #138

Closed
albertoleoncio opened this issue Sep 30, 2021 · 76 comments
Closed

"Login failed" error #138

albertoleoncio opened this issue Sep 30, 2021 · 76 comments

Comments

@albertoleoncio
Copy link

When I try to login, it doesn't work. Maybe is related to #115.

Log:

Sep 30, 2021 2:23:12 PM pattypan.Main main
INFO: Wiki set as: commons.wikimedia.org
Protocol set as: https://
Script path set as: /w
Sep 30, 2021 2:23:12 PM pattypan.Main main
INFO: Operating System: Windows 10
Pattypan Version: 20.04
Sep 30, 2021 2:23:55 PM Wiki getToken
INFO: Fetching URL https://commons.wikimedia.org/w/api.php?format=xml&maxlag=5&action=query&meta=tokens&type=login
Sep 30, 2021 2:24:06 PM Wiki getToken
INFO: Fetching URL https://commons.wikimedia.org/w/api.php?format=xml&maxlag=5&action=query&meta=tokens&type=login
Sep 30, 2021 2:29:17 PM Wiki getToken
INFO: Fetching URL https://commons.wikimedia.org/w/api.php?format=xml&maxlag=5&action=query&meta=tokens&type=login
Sep 30, 2021 2:29:27 PM Wiki getToken
INFO: Fetching URL https://commons.wikimedia.org/w/api.php?format=xml&maxlag=5&action=query&meta=tokens&type=login
@geagea1
Copy link

geagea1 commented Oct 6, 2021

Any progress?

@Aktron
Copy link
Collaborator

Aktron commented Oct 6, 2021

I've been watching this page couple of days with a hope of any progress here too :-)

@Abbe98
Copy link
Collaborator

Abbe98 commented Oct 6, 2021

Some people have reported that this has solved itself. If this is not the case feel free to share your Pattypan logs, nothing has changed on Pattypan's side, and "it works on my machine". 😕

Additionally, you can try using a bot password to sign in instead of your regular one.

@Battleofalma
Copy link

Same problem, I will try using a different account for now.

@geagea1
Copy link

geagea1 commented Oct 6, 2021

I have no other account. How I can share my log?

@Abbe98
Copy link
Collaborator

Abbe98 commented Oct 6, 2021

One can generate bot passwords at https://commons.wikimedia.org/wiki/Special:BotPasswords.

In the most recent version of Pattypan, one should be able to see a link to one's log at the start screen.

Repository owner deleted a comment from geagea1 Oct 6, 2021
@Battleofalma
Copy link

One can generate bot passwords at https://commons.wikimedia.org/wiki/Special:BotPasswords.

In the most recent version of Pattypan, one should be able to see a link to one's log at the start screen.

Thanks, I generated a bot password and have tried to use that but still face the same problem.

@Abbe98
Copy link
Collaborator

Abbe98 commented Oct 6, 2021

I have now been able to reproduce this error on a Windows computer. There is no indication of what could cause this in the logs.

Two ideas I will be investigating in the coming days:

  • Could the expiration of IdentTrust DST Root CA X3 have caused this?
  • Have there been changes on the Wikimedia side?

Two things that should be done/tested anyway and might contribute to a solution:

@belett
Copy link

belett commented Oct 6, 2021

Not sure if it's related but I couldn't login either today.

Here is the error log I had:

sept. 28, 2021 10:33:00 AM pattypan.Main main
INFOS: Wiki set as: http://commons.wikimedia.org
Protocol set as: https://
Script path set as: /w
sept. 28, 2021 10:33:00 AM pattypan.Main main
INFOS: Operating System: Windows 10
Pattypan Version: 20.04
sept. 28, 2021 10:33:00 AM pattypan.panes.StartPane checkVersion
GRAVE: null
http://javax.net.ssl.SSLHandshakeException: http://sun.security.validator.ValidatorException: PKIX path building failed: http://sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at http://sun.security.ssl.Alerts.getSSLException(Unknown Source)
at http://sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
at http://sun.security.ssl.Handshaker.fatalSE(Unknown Source)
at http://sun.security.ssl.Handshaker.fatalSE(Unknown Source)
at http://sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
at http://sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
at http://sun.security.ssl.Handshaker.processLoop(Unknown Source)
at http://sun.security.ssl.Handshaker.process_record(Unknown Source)
at http://sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at http://sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at http://sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at http://sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at http://sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at http://sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at http://sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at http://sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at http://sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
at http://java.net.URL.openStream(Unknown Source)
at pattypan.Util.readUrl(http://Util.java:261)
at pattypan.panes.StartPane.getVersions(http://StartPane.java:159)
at pattypan.panes.StartPane.checkVersion(http://StartPane.java:137)
at pattypan.panes.StartPane.<init>(http://StartPane.java:64)
at pattypan.Main.start(http://Main.java:40)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$161(http://LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(http://PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$172(http://PlatformImpl.java:295)
at http://java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(http://PlatformImpl.java:294)
at http://com.sun.glass.ui.InvokeLaterDispatcher$Future.run(https://t.co/559aStqlBy)
at http://com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at http://com.sun.glass.ui.win.WinApplication.lambda$null$147(https://t.co/7ksYaIPQaX)
at http://java.lang.Thread.run(Unknown Source)
Caused by: http://sun.security.validator.ValidatorException: PKIX path building failed: http://sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at http://sun.security.validator.PKIXValidator.doBuild(Unknown Source)
at http://sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
at http://sun.security.validator.Validator.validate(Unknown Source)
at http://sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)
at http://sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)
at http://sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
... 28 more
Caused by: http://sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at http://sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Source)
at http://sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
at http://java.security.cert.CertPathBuilder.build(Unknown Source)
... 34 more

It may come from the network of the organisation where I work.
And this is the error I've got last week, after closing and restarting Pattypan, it worked but today it didn't worked (with the same error) even after restart.

@albertoleoncio
Copy link
Author

  • Have there been changes on the Wikimedia side?

Probably not. There is a movement to deprecate old methods of requesting tokens on MediaWiki, but Pattypan already uses the current method to make these requests.

@Aktron
Copy link
Collaborator

Aktron commented Oct 6, 2021

Hi, since it would be a bit more useful to provide you guys with more data, here is from me:

OS: Ubuntu 20.04.

java version "1.8.0_301"
Java(TM) SE Runtime Environment (build 1.8.0_301-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.301-b09, mixed mode)

Log:

aktron@aktron-ntb:~/Stažené$ java -jar p20.jar
Říj 06, 2021 11:45:42 ODP. pattypan.Main main
INFO: Wiki set as: commons.wikimedia.org
Protocol set as: https://
Script path set as: /w
Říj 06, 2021 11:45:42 ODP. pattypan.Main main
INFO: Operating System: Linux
Pattypan Version: 20.04
Říj 06, 2021 11:45:56 ODP. Wiki getToken
INFO: Fetching URL https://commons.wikimedia.org/w/api.php?format=xml&maxlag=5&action=query&meta=tokens&type=login
Říj 06, 2021 11:46:07 ODP. Wiki getToken
INFO: Fetching URL https://commons.wikimedia.org/w/api.php?format=xml&maxlag=5&action=query&meta=tokens&type=login

@higa4
Copy link

higa4 commented Oct 7, 2021

My last upload using pattypan was on 28th/Sep and I encountered the same problem probably on 1st/Oct. Isn't something expired on 30th/Sep?

@Abbe98
Copy link
Collaborator

Abbe98 commented Oct 7, 2021

I have been able to track down a solution(#139) but not the exact cause. It seems to me like something changed on the Wikimedia side of things.

It will still take me an evening or two to get a release out as my Pattypan environment isn't made for Java 8 which releases are currently based on.

Aktron added a commit that referenced this issue Oct 8, 2021
@Abbe98 Abbe98 mentioned this issue Oct 9, 2021
Abbe98 added a commit that referenced this issue Oct 9, 2021
Abbe98 added a commit that referenced this issue Oct 9, 2021
@Abbe98
Copy link
Collaborator

Abbe98 commented Oct 9, 2021

Another update. The solution doesn't support Java 8 which is currently used to build Pattypan.

Two potential ways forward:

  • backport wiki.java with Java 8 support
  • figure out how to bundle openjfx with Pattypan and drop support for versions < Java 11

@Aktron
Copy link
Collaborator

Aktron commented Oct 11, 2021

Another update. The solution doesn't support Java 8 which is currently used to build Pattypan.

Two potential ways forward:

  • backport wiki.java with Java 8 support
  • figure out how to bundle openjfx with Pattypan and drop support for versions < Java 11

Is there any way how can I (as a non-programmer) help? I tried to compile the updated code but I failed (clearly well yes, but at least I tried ;-

@Aktron
Copy link
Collaborator

Aktron commented Oct 12, 2021

One question though: Given the similarity of Pattypan to other two uploaders (Vicuna and Commonist) and given the fact that their users reported difficulties with uploading (while logging in works just fine afaik) – shouldn't we be also affected by this? I am trying to foresee a new issue here (ritschwumm/commonist#26)

@hartman
Copy link

hartman commented Oct 14, 2021

Here is the error log I had:

http://javax.net.ssl.SSLHandshakeException: http://sun.security.validator.ValidatorException: PKIX path building failed: http://sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at http://sun.security.ssl.Alerts.getSSLException(Unknown Source)
at http://sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
at http://sun.security.ssl.Handshaker.fatalSE(Unknown Source)
at http://sun.security.ssl.Handshaker.fatalSE(Unknown Source)
at http://sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)

This is almost certainly the Letsencrypt issue indicating outdated Certificate Authority files being used by the Java environment of the person running the code (whom should probably just update their Java installation or possibly even their OS, as sometimes JAVA uses the CAs of the Operating System)

I'm not saying there might not also be a token issue, but PKIX path building failed means "cannot build and validate the certificate chain", which is exactly what you would expect in case of the Lets Encrypt problem.

@Abbe98
Copy link
Collaborator

Abbe98 commented Oct 14, 2021

There appear to be two behaviors reported here, one that results in an SSL error in the log and one which is completely silent. If it is caused by the Letsencrypt issue one should be able to resolve it by updating Java 8 to 8u141 or later. I however have similar issues with Java 11+.

I'm working on porting Pattypan to Java 11+ to resolve this but it includes several migrations(wiki-java, openjfx) and there are some major changes needed to deal with distubrations as Java 11 no longer supports JavaFX which Pattypan is built upon.

@Hansmuller2
Copy link

Hansmuller2 commented Oct 15, 2021

My Windows 10 Pattypan fails on login and simply logs this since two weeks:

Oct 15, 2021 6:39:22 AM pattypan.Main main
INFO: Wiki set as: commons.wikimedia.org
Protocol set as: https://
Script path set as: /w
Oct 15, 2021 6:39:22 AM pattypan.Main main
INFO: Operating System: Windows 10
Pattypan Version: 20.04
  • Throw out the failing login module and paste, call or mimic the official Mediawiki login code module ?

(Alternative to Pattypan is the cumbersome GlamWikiToolset? University etc. system managers resented it.)
Thanks !

@VinayarajVR
Copy link

A comment there:

The root cause of this is that a MediaWiki change broke my bot framework, which all three of these tools use a legacy version of. This was fixed three months ago but cannot be easily backported - I rewrote that part of the code to use the new HTTP client in Java 11 some time ago. The solution is to port all three tools to Java 11 (and 17) so that they can use the latest version. MER-C 20:37, 13 January 2022 (UTC)

@VinayarajVR
Copy link

Another comment there:

Please bring back Pattypan for Windows users! I work for Dumbarton Oaks and we have an established workflow that was functional with Pattypan but has been stalled out for months now. You cannot underestimate the lead time that it takes institutions like ours which don't have Wikimedians in residence to be able to start a process like this, and having that process stymied is causing us to lose a lot of momentum. I recognize that we owe a great debt of gratitude to the people who have the knowhow to build these tools, especially when they are doing it on their own free time, so I am not putting this on them, but if there is anything the Wikimedia Foundation can do to help, institutions like mine would be extremely grateful. Bettinche (talk) 03:33, 19 January 2022 (UTC)

@FluraFlu
Copy link

Also the Image Archive of the ETH-Library (who I work for) is very hugely depending on the functionality and functioning of Pattypan! We are planning to upload more than 100'000 Swissair areal images and other. We used to work with GWToolset but as it was communicated that this tool is no longer being maintained, we changed our whole workflow to work with Pattypan and also helped other GLAM-institutions to get used with it. We would be very greatful if the tool would work again soon!

@Abbe98
Copy link
Collaborator

Abbe98 commented Jan 23, 2022

There is now a third experimental release available aimed at resolving the upload issues reported in #144 and #133. Thank you @MER-C for the upstream fixes and your work on Wiki-java!

https://github.com/Kartkod/pattypan/releases/tag/v20.10-experimental-3

It's still as tricky to install as the former experimental releases for the time being. I might try to compile it for old versions of Java so that it once again will be easier to use for many of you, however, it's not a long-term solution so in case someone has experience in packaging/publishing of JavaFX applications on Java 11+ please let me know.

@Abbe98
Copy link
Collaborator

Abbe98 commented Jan 23, 2022

There is a common request for Windows installation instructions in case someone out there is able to test it successfully on Windows feel free to share how you did it here. On my end, I'm only available to refer you to the release page and official Java 11+ and OpenJFX documentation.

@sebastian-berlin-wmse
Copy link
Contributor

I've managed to make a .jar that runs with Java 11 and includes the required JavaFX components: sebastian-berlin-wmse@8fc329b.

I had no previous experience with the process so I took what I could find and put it together. As a result some things may not be done properly even if they work. There are also a few runtime errors that I haven't managed to fix yet (hence out commented code). As far as I can tell they are not critical (things like logging and a logo), though they should of course be fixed. Hopefully this is easy for someone familiar with the code.

The commit message contains step-by-step instruction to create the .jar. Most of it probably can and should be automated. I haven't figured out how to add the modules with Ant and there are a few steps that the documentation recommends should be automated.

It's only for Linux so far, but according to the documentation:

[...] it can be easily a multi-platform jar if the different native libraries from each platform were included.

I think it's just a matter of downloading and copying the libraries for the platform(s) you want. Not sure if it's best to have one .jar per platform or one big for all of them.

@Abbe98
Copy link
Collaborator

Abbe98 commented Jan 29, 2022

There is now a fourth experimental release available aimed at resolving the upload issues reported in #145. Again thank you @MER-C for the upstream fixes and your work on Wiki-java!

https://github.com/Kartkod/pattypan/releases/tag/pattypan-21-10-experimental-4

@sebastian-berlin-wmse
Copy link
Contributor

I managed to add Ant stuff for the file juggling required to create the .jar. Only Linux libraries so far. Also, I'm working on a separate branch to make things easier: https://github.com/sebastian-berlin-wmse/pattypan/tree/package-java-11.

@Abbe98
Copy link
Collaborator

Abbe98 commented Jan 31, 2022

@sebastian-berlin-wmse, that's neat, especially that it targets the zip files directly, maybe it could allow us to actually automate the entire thing because I think Ant can pull things from URLs. I will have a look at your work tomorrow.

@sebastian-berlin-wmse
Copy link
Contributor

Yep, it looks like https://ant.apache.org/manual/Tasks/get.html could download files, if we want to automate even more.

@sebastian-berlin-wmse
Copy link
Contributor

sebastian-berlin-wmse commented Jan 31, 2022

I managed to get rid of the errors that were introduced when packaging JavaFX. I'm not sure exactly what the issue was, something with threads :S Anyway, I made a .jar release based on the latest experimental release that includes libraries for Linux, Mac OS and Windows: https://github.com/sebastian-berlin-wmse/pattypan/releases/tag/pattypan-21-10-experimental-4-package

This means that you should be able to run by just downloading, giving permissions to execute and double clicking. I only have access to Linux myself, so if anyone can test on Mac OS and Windows that would be great.

@Abbe98
Copy link
Collaborator

Abbe98 commented Feb 1, 2022

@sebastian-berlin-wmse, that looks promising!

To get all of the OS-specific files, do you download each SDKs and merge them? (for the JAR task)

Would you be able to make a pull request to the kartkod branch? There are still some question marks regarding #143 and #145 but let's try to put this into the hands of as many testers as possible through an experimental release.

@Abbe98
Copy link
Collaborator

Abbe98 commented Feb 1, 2022

I wonder to what extent Windows users can run .jar files compiled with Java 11+ as it's not a very common way of publishing apps.

@sebastian-berlin-wmse
Copy link
Contributor

To get all of the OS-specific files, do you download each SDKs and merge them? (for the JAR task)

Yes, that was the way I did it. I thought that having the libraries for the different platforms in the .jar would be enough (Java being platform independent and all that :)). However, I finally managed to get a Virtualbox running Windows 10 up and it wasn't that simple. There are some extra classes in the Windows version of the .jar:s in JavaFX and more issues beyond that.

Would you be able to make a pull request to the kartkod branch? There are still some question marks regarding #143 and #145 but let's try to put this into the hands of as many testers as possible through an experimental release.

I'll make a pull request with just Linux support for now, since that actually works. Then I'll continue looking into Windows compatibility in a separate branch.

Would it be a good idea to split off this (packaging) into its own issue? It's not directly related to this issue and there will probably be a bit more discussion before it's done.

@Abbe98
Copy link
Collaborator

Abbe98 commented Feb 3, 2022

The fifth experimental release is here! Now Windows and Linux users should be able to run Pattypan the "good old way" without installing OpenJFX.

Thanks to all of you who test these releases, all your feedback is very valuable. Thanks also to @sebastian-berlin-wmse for your work on packaging Pattypan for Linux and Windows.

https://github.com/Kartkod/pattypan/releases/tag/pattypan-21-10-experimental-5

@Hansmuller2
Copy link

Hansmuller2 commented Feb 4, 2022 via email

@Abbe98
Copy link
Collaborator

Abbe98 commented Feb 4, 2022

@Hansmuller2, I think that error indicates that you need to update Java, Java 8 which Pattypan previously required will reach its end-of-life in less than two months so it won't be supported going forward.

If you are able to you can check your java version with the following terminal command: java -version. Java 11 or later is now required for Pattypan.

@Abbe98
Copy link
Collaborator

Abbe98 commented Feb 4, 2022

The sixth experimental release is here. This fixes an error with charters from non-English alphabets displaying as question marks and adds support for MacOS. This experimental release is expected to be promoted into a stable release.

https://github.com/Kartkod/pattypan/releases/tag/pattypan-21-10-experimental-6

@Abbe98 Abbe98 closed this as completed in 8b0085b Feb 7, 2022
@Abbe98
Copy link
Collaborator

Abbe98 commented Feb 7, 2022

Pattypan 22.02 is now available!

https://github.com/yarl/pattypan/releases/tag/v22.02

Again thank you, for your issue reports and testing!

@Hansmuller2
Copy link

Hansmuller2 commented Feb 17, 2022 via email

@belett
Copy link

belett commented Feb 17, 2022

Hi Hans,

The latest version of Java for Windows is Java 17. Java 8 is still recommended sometimes (including on the old java.com website) but it's not the lattest.

I use Java 11 (I asked the IT guy at the university where I do my residency to install it) and Pattypan 22.02 works fine with it on Windows.

Cheers,
Nicolas

@Eccenux
Copy link

Eccenux commented Feb 22, 2022

@Hansmuller2 What you saw is an old JRE page. JRE was a runtime package for Java, but was discontinued by Oracle. Hence the confusing message about its latest version.

If you want Java 11 or later you should install either OpenJDK (which only gets few updates per big Java version, but should be fine) or one of other free builds of Java. For example Adoptium is quite popular (previously known as AdoptOpenJDK). Adoptium is now an Eclipse project, so should be pretty stable and the installer is quite friendly. I would probably go with Adpotium if you are not sure.

@VinayarajVR
Copy link

Still not working for me, please tell me if it is resolved. I have been using Pattypan for uploading so many images, months have gone since I am not able to upload a single image. I raised this issue there.
https://meta.wikimedia.org/wiki/Community_Wishlist_Survey_2022/Multimedia_and_Commons/Mass_uploader

@belett
Copy link

belett commented Mar 6, 2022

@VinayarajVR : did you install PattyPan 22.02 and Java 11 (or more)?

Could you also tell us a bit more: what system do you use (Windows/Mac/Linux/Other, what version of Java, etc.)

@VinayarajVR
Copy link

@VinayarajVR : did you install PattyPan 22.02 and Java 11 (or more)?

Could you also tell us a bit more: what system do you use (Windows/Mac/Linux/Other, what version of Java, etc.)
Thanks inquiring


OS:Windows 11 Pro
Java: Version 8 Update 321 Release date: January 18, 2022
Pattypan: February 2022 Release
Error message: (A message box appears when Pattypan is clicked saying)
Error: A JNI error has occurred, please check your installation and try again
(when the message box is closed another message box appears saying)
A Java Exception has occurred


Vinayaraj

@belett
Copy link

belett commented Mar 6, 2022

PattyPan 22.02 need Java 11 or later to run.

@VinayarajVR
Copy link

PattyPan 22.02 need Java 11 or later to run.

Thanks, let me see

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

Successfully merging a pull request may close this issue.