yarl / pattypan

Upload files to Wikimedia Commons. The Spreadsheet Way.
https://commons.wikimedia.org/wiki/Commons:Pattypan
MIT License
56 stars 37 forks source link

"Login failed" error #138

Closed albertoleoncio closed 2 years ago

albertoleoncio commented 3 years ago

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
VinayarajVR commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

I've managed to make a .jar that runs with Java 11 and includes the required JavaFX components: https://github.com/sebastian-berlin-wmse/pattypan/commit/8fc329bb707a0d977457a3b3eb6faf96816c9652.

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

Dear Albin, Thanks for the experimental version! At Leiden University with Windows where pattypan19 still works

Abbe98 commented 2 years ago

@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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

Dear Yarl, Thanks for the new pattypan 22.02 !

"Java 11" at least was needed. However the latest Java for Windows version is called 8, which i have installed. https://java.com/en/download/windows_manual.jsp (https://java.com/en/download/windows_manual.jsp) "Java Downloads for Windows Recommended Version 8 Update 321 Release date: January 18, 2022" So pattypan 22.02 delivers an error message: "Java Virtual Machine Launcher: Error: a JNI error has occurred, please check your installation and try again"

Op ma., feb. 7, 2022 om 16:16, Albin Larsson schreef: Pattypan 22.02 is now available! https://github.com/yarl/pattypan/releases/tag/v22.02 (https://github.com/yarl/pattypan/releases/tag/v22.02) Again thank you, for your issue reports and testing! — Reply to this email directly, view it on GitHub (https://github.com/yarl/pattypan/issues/138#issuecomment-1031578729), or unsubscribe (https://github.com/notifications/unsubscribe-auth/ADTRB5JVTG27SGXOVMRYI2LUZ7O37ANCNFSM5FC3MPMA). Triage notifications on the go with GitHub Mobile for iOS (https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675) or Android (https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub). You are receiving this because you were mentioned.Message ID:

belett commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

@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 commented 2 years ago

PattyPan 22.02 need Java 11 or later to run.

VinayarajVR commented 2 years ago

PattyPan 22.02 need Java 11 or later to run.

Thanks, let me see