Crowdsourcing Project Firemind Duels
by ubeefx
Moderators: ubeefx, beholder, melvin, ShawnieBoy, Lodici, CCGHQ Admins
Re: Crowdsourcing Project Firemind Duels
by mike » 10 Sep 2014, 17:19
Yeah, I'm working on the google sign in problem. Apparently they don't like that I changed the url to https ...
Worker code is still the same. hg status shows no changes.
Edit: google, facebook and github are now fixed. Twitter is still a problem ...
Worker code is still the same. hg status shows no changes.
Edit: google, facebook and github are now fixed. Twitter is still a problem ...
Re: Crowdsourcing Project Firemind Duels
by ShawnieBoy » 10 Sep 2014, 17:41
Cool, thanks for that - found some error generation for you: Hopefully will shed some light
- Code: Select all
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
at sun.security.ssl.Handshaker.processLoop(Unknown Source)
at sun.security.ssl.Handshaker.process_record(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
at magic.firemind.FiremindClient.checkMagarenaVersion(FiremindClient.java:153)
at magic.ui.widget.firemind.FiremindWorkerPanel$1.actionPerformed(FiremindWorkerPanel.java:98)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$400(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.WaitDispatchSupport$2.run(Unknown Source)
at java.awt.WaitDispatchSupport$4.run(Unknown Source)
at java.awt.WaitDispatchSupport$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(Unknown Source)
at java.awt.Dialog.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at java.awt.Window.setVisible(Unknown Source)
at java.awt.Dialog.setVisible(Unknown Source)
at magic.ui.dialog.FiremindWorkerDialog.<init>(FiremindWorkerDialog.java:44)
at magic.ui.screen.SettingsMenuScreen$4.actionPerformed(SettingsMenuScreen.java:61)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$400(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
at sun.security.validator.Validator.validate(Unknown Source)
at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
... 97 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Source)
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
at java.security.cert.CertPathBuilder.build(Unknown Source)
... 103 more
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: Crowdsourcing Project Firemind Duels
by mike » 10 Sep 2014, 18:16
Great, more problems caused by my attempt to improve security
This is apparently caused by your system not having the necessary ca certificate installed that is needed for it to trust certificates signed by StartSSL.
Could you maybe tell me what OS and Java Versions you're using?
I will try finding a solution that does not require the user to install the cert.
This is apparently caused by your system not having the necessary ca certificate installed that is needed for it to trust certificates signed by StartSSL.
Could you maybe tell me what OS and Java Versions you're using?
I will try finding a solution that does not require the user to install the cert.
Re: Crowdsourcing Project Firemind Duels
by ShawnieBoy » 10 Sep 2014, 18:39
Security is good!mike wrote:Great, more problems caused by my attempt to improve security
This is apparently caused by your system not having the necessary ca certificate installed that is needed for it to trust certificates signed by StartSSL.
Could you maybe tell me what OS and Java Versions you're using?
I will try finding a solution that does not require the user to install the cert.
Win 7 (feel dirty)
Java 1.8.0_20 (mainly)
1.7.0_67 also installed
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: Crowdsourcing Project Firemind Duels
by mike » 12 Sep 2014, 10:38
I haven't been able to come up with a fully satisfying solution for this.
The options I currently see are these:
* drop https entirely (obviously bad)
* add the ca cert of startssl and an installer script to magarena (I feel this would clutter magarena with unnecessary files that in my opinion do not belong there)
* link the user to a guide/script on firemind.ch that explains how to install the certs (not convenient for the user)
* buy a better supported SSL cert (I guess this is what I have to go with. does anyone know a cert authority that is well supported over all java platforms magarena runs on?)
The options I currently see are these:
* drop https entirely (obviously bad)
* add the ca cert of startssl and an installer script to magarena (I feel this would clutter magarena with unnecessary files that in my opinion do not belong there)
* link the user to a guide/script on firemind.ch that explains how to install the certs (not convenient for the user)
* buy a better supported SSL cert (I guess this is what I have to go with. does anyone know a cert authority that is well supported over all java platforms magarena runs on?)
Re: Crowdsourcing Project Firemind Duels
by Lodici » 12 Sep 2014, 11:03
This is probably a stupid question (SSL certs - way over my head) but why would this be bad? It's not like you are transferring credit card or even any personal or identifying details? Or are you?mike wrote:I haven't been able to come up with a fully satisfying solution for this.
The options I currently see are these:
* drop https entirely (obviously bad)
...
Re: Crowdsourcing Project Firemind Duels
by mike » 12 Sep 2014, 16:40
Don't worry, I'm not.
I am transmitting the access token that is used to identify the user though. Right now the only thing this grants access to is posting game results but if I want to add more features to my API in the future I have to be careful not to compromise the users' accounts.
On the website itself it is even more crucial since a user can log in with email and password. Not securing this with TLS will eventually lead to compromised credentials and if the user entered the same password and email on another page it will to a whole other set of problems. So you see: it would be very reckless of me not to enforce SSL encryption because I can't count on everybody knowing the risks of insecure networks and password reuse.
The question wasn't stupid by the way. Unfortunately proper use of TLS is something that, even in the programming community, isn't known well enough.
I am transmitting the access token that is used to identify the user though. Right now the only thing this grants access to is posting game results but if I want to add more features to my API in the future I have to be careful not to compromise the users' accounts.
On the website itself it is even more crucial since a user can log in with email and password. Not securing this with TLS will eventually lead to compromised credentials and if the user entered the same password and email on another page it will to a whole other set of problems. So you see: it would be very reckless of me not to enforce SSL encryption because I can't count on everybody knowing the risks of insecure networks and password reuse.
The question wasn't stupid by the way. Unfortunately proper use of TLS is something that, even in the programming community, isn't known well enough.
Re: Crowdsourcing Project Firemind Duels
by mike » 06 Oct 2014, 14:22
I purchased a certificate from another cert authority and added that to firemind.ch
If someone who experienced the SSL errors with the Queue Worker previously could verify that it is working now I'd be thankful (don't have a win7 machine at hand right now).
If someone who experienced the SSL errors with the Queue Worker previously could verify that it is working now I'd be thankful (don't have a win7 machine at hand right now).
Re: Crowdsourcing Project Firemind Duels
by PalladiaMors » 06 Oct 2014, 19:31
I'm still getting "Version is outdated. Please update Magarena.". However, I'm still using my old access key, since I don't know how to get a new one?
- PalladiaMors
- Posts: 343
- Joined: 12 Jul 2014, 17:40
- Has thanked: 36 times
- Been thanked: 22 times
Re: Crowdsourcing Project Firemind Duels
by ShawnieBoy » 06 Oct 2014, 23:39
Looks like firemind is down at the moment, but will give it a look once it's back up
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: Crowdsourcing Project Firemind Duels
by mike » 07 Oct 2014, 14:03
Forgot to include an intermediate certificate. It's fixed now.
Firemind is up and also the Queue Worker should run now
Firemind is up and also the Queue Worker should run now
Re: Crowdsourcing Project Firemind Duels
by ShawnieBoy » 07 Oct 2014, 20:15
Looks like the worker is running properly now Though the logs may look strange as they will contain the users profile name.mike wrote:Forgot to include an intermediate certificate. It's fixed now.
Firemind is up and also the Queue Worker should run now
Will leave this running for a while and see what happens
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: Crowdsourcing Project Firemind Duels
by ShawnieBoy » 07 Oct 2014, 21:11
I've already found a few things that should help this further.
When a duel begins, it reloads lots of stuff for magarena that the queue worker doesn't really need, and pushes up the heap-space, even while not interacting with magarena at all (eg. random deck generators, cube lists, etc.)
First duel sits around 750MB, the second duel pushes this to 1,000MB (I don't know what the default heap space is for the Magarena.exe, I've set my build to use more when working on it) The third duel seizes up before it can start.
I'm also wondering if it's also loading all the images in the background as well. Are the duels being run in text mode?
Having an alternative load method in Magarena for the queue-worker should help with this.
When a duel begins, it reloads lots of stuff for magarena that the queue worker doesn't really need, and pushes up the heap-space, even while not interacting with magarena at all (eg. random deck generators, cube lists, etc.)
First duel sits around 750MB, the second duel pushes this to 1,000MB (I don't know what the default heap space is for the Magarena.exe, I've set my build to use more when working on it) The third duel seizes up before it can start.
I'm also wondering if it's also loading all the images in the background as well. Are the duels being run in text mode?
Having an alternative load method in Magarena for the queue-worker should help with this.
-
ShawnieBoy - Programmer
- Posts: 601
- Joined: 02 Apr 2012, 22:42
- Location: UK
- Has thanked: 80 times
- Been thanked: 50 times
Re: Crowdsourcing Project Firemind Duels
by PalladiaMors » 07 Oct 2014, 22:45
Good job, Mike & Co.! I see this as a big achievement, it will shorten queue times massively and allow a lot more players to use Firemind in the long run.
Only issue that caught my eye is that I can't choose Monte Carlo to run the duels - Firemind seems to switch the AI to MiniMax when I try to do that.
Only issue that caught my eye is that I can't choose Monte Carlo to run the duels - Firemind seems to switch the AI to MiniMax when I try to do that.
- PalladiaMors
- Posts: 343
- Joined: 12 Jul 2014, 17:40
- Has thanked: 36 times
- Been thanked: 22 times
Re: Crowdsourcing Project Firemind Duels
by mike » 10 Oct 2014, 20:17
Thanks for the feedback. I was able to replace MagicMain.initializeEngine() with CardDefinitions.loadCardDefinitions() which should fix some of the unnecessarily initialized stuff. Not sure what you mean by text mode but the game is set to artificial after initialization.I've already found a few things that should help this further.
When a duel begins, it reloads lots of stuff for magarena that the queue worker doesn't really need, and pushes up the heap-space, even while not interacting with magarena at all (eg. random deck generators, cube lists, etc.)
First duel sits around 750MB, the second duel pushes this to 1,000MB (I don't know what the default heap space is for the Magarena.exe, I've set my build to use more when working on it) The third duel seizes up before it can start.
I'm also wondering if it's also loading all the images in the background as well. Are the duels being run in text mode?
Having an alternative load method in Magarena for the queue-worker should help with this.
I pushed an updated version to https://code.google.com/r/projectfiremi ... dsourcing/
You shouldn't be able to change the AI since it is hard-coded. How do you figure Firemind switched to MiniMax?Only issue that caught my eye is that I can't choose Monte Carlo to run the duels - Firemind seems to switch the AI to MiniMax when I try to do that.
41 posts
• Page 2 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 31 guests