Discussion:
[Wt-interest] Online hangman-high-scores example not working?
K. Frank
2016-05-16 13:08:31 UTC
Permalink
Hello List!

I am playing around with Wt and wish to experiment with Wt's
account / authentication features, so I am looking at the hangman
example, and running it on line.

https://www.webtoolkit.eu/wt/examples/hangman-game/hangman.wt

It seems that when I click on the high-scores link, I get stuck on
the login page.

I can play the game and I can register a username / password.
This seems to be recognized because the login page detects
both an unknown user and an invalid password when I purposely
give it that. But when I try to go to high scores and give the login
page the correct username and password, it just gives me a clean
login page when I click the Login button. (That is, I get the login
page with none of the fields filled in, highlighted, nor displaying a
validation error.)

This happens on windows 7 on both on a recent (probably latest)
version of chrome, and on a recently-updated ms internet explorer.

What should my expectations be?

I don't really care about playing hangman and seeing the high
scores, but my concern is that when I try to write my own account
registration code modelled on the hangman example, and it doesn't
work, I won't know whether:

1) I've done something wrong
2) there's a bug in the hangman example that I've copied
3) there's a bug in the underlying Wt library

Have I misunderstood how to use the online hangman's login page?
Should I be expecting it to work? Should I be comfortable modelling
my own code after the hangman example, or does it have some known
issues that I should be planning to correct?


Thanks for any advice.


K. Frank
Koen Deforche
2016-05-17 07:58:44 UTC
Permalink
Hey,
Post by K. Frank
Hello List!
I am playing around with Wt and wish to experiment with Wt's
account / authentication features, so I am looking at the hangman
example, and running it on line.
https://www.webtoolkit.eu/wt/examples/hangman-game/hangman.wt
It seems that when I click on the high-scores link, I get stuck on
the login page.
I just tried and indeed there was a database problem with the online
version, which caused registration of a new user to fail.

The cause is not in the software but in the database itself: the hangman
game was migrated (a few years ago) from it's own authentication system to
Wt::Auth / Wt::Dbo, but there was something not quite right in the migrated
user table. It's now been fixed.

1) I've done something wrong
Post by K. Frank
2) there's a bug in the hangman example that I've copied
3) there's a bug in the underlying Wt library
Have I misunderstood how to use the online hangman's login page?
Should I be expecting it to work? Should I be comfortable modelling
my own code after the hangman example, or does it have some known
issues that I should be planning to correct?
We understand the risk of using a library is being in the dark when
something goes wrong. Therefore we try to give clear errors and logging of
exceptions. In this case it seems you would get an error message in the log
file that hints at what's wrong (a SQL database exception)

Regards,
koen
K. Frank
2016-05-17 15:19:37 UTC
Permalink
Hi Koen!

Thanks for following up.
Post by Koen Deforche
Hey,
Post by K. Frank
Hello List!
I am playing around with Wt and wish to experiment with Wt's
account / authentication features, so I am looking at the hangman
example, and running it on line.
https://www.webtoolkit.eu/wt/examples/hangman-game/hangman.wt
It seems that when I click on the high-scores link, I get stuck on
the login page.
I just tried and indeed there was a database problem with the online
version, which caused registration of a new user to fail.
The cause is not in the software but in the database itself: the hangman
game was migrated (a few years ago) from it's own authentication system to
Wt::Auth / Wt::Dbo, but there was something not quite right in the migrated
user table. It's now been fixed.
Thank you. I can confirm that logging in and looking at the high scores
now works for me.

One detail: I was able to log in today using the username / password
that I registered yesterday, so the registration of a new user must have
been working at least partially -- at least enough to record the username
and password that I created yesterday. Well, no matter -- it works now..
Post by Koen Deforche
Post by K. Frank
1) I've done something wrong
2) there's a bug in the hangman example that I've copied
3) there's a bug in the underlying Wt library
Have I misunderstood how to use the online hangman's login page?
Should I be expecting it to work? Should I be comfortable modelling
my own code after the hangman example, or does it have some known
issues that I should be planning to correct?
We understand the risk of using a library is being in the dark when
something goes wrong. Therefore we try to give clear errors and logging of
exceptions. In this case it seems you would get an error message in the log
file that hints at what's wrong (a SQL database exception)
Thanks for the explanation.
Post by Koen Deforche
Regards,
koen
Best.


K. Frank

Loading...