Menu

#10 Login error

closed-fixed
Loki
core (8)
8
2010-04-18
2010-04-08
ilalex
No

When do I start the bot message appears:
SEVERE: null
net.sourceforge.jwbf.actions.mw.util.ActionException: Please login first
at net.sourceforge.jwbf.bots.MediaWikiBotImpl.writeContent(Unknown Source)
at net.sourceforge.jwbf.contentRep.mw.Article.save(Unknown Source)
at wikirc.IrcBot.hello(IrcBot.java:124)
at wikirc.HelloThread.run(HelloThread.java:23)
I think this is due to recent changes in the engine mediawiki. https://bugzilla.wikimedia.org/show_bug.cgi?id=23076
Are you plan to fix it?
Can you suggest hotfix for this?

Discussion

  • ilalex

    ilalex - 2010-04-08
    • priority: 5 --> 8
    • assigned_to: nobody --> eldurloki
     
  • Loki

    Loki - 2010-04-08
    • status: open --> pending
     
  • Loki

    Loki - 2010-04-08

    problem is already known. But no time to fix it in the next days because of "real live" ;-) ... sorry. Can you help ?

     
  • ilalex

    ilalex - 2010-04-08

    Patch for this bug.

     
  • ilalex

    ilalex - 2010-04-08

    Yes of course. I created patch for this bug (see in attached files)

    PS. This is my first patch. Please tell me if something is wrong.

     
  • Loki

    Loki - 2010-04-09

    there will be a NPE because msg is not set, have you test if your patch works with e.g. Wikipedia ?

     
  • ilalex

    ilalex - 2010-04-09

    Of course, I tested it on my bot in wikipedia.
    So strange bug, because msg is never used in PostLogin.java, I replaced it by function
    public Post createMessage()

     
  • Loki

    Loki - 2010-04-09

    sounds intersting, how do you test the login ? My common testcase starts like the following:

    bot = new MediaWikiBot(getValue("login_wikipedia1_url"));
    bot.login(getValue("login_wikipedia1_user_valid"), getValue("login_wikipedia1_pass_valid"));
    ...

    how is yours ?

     
  • ilalex

    ilalex - 2010-04-09

    MediaWikiBot bot = new MediaWikiBot("http://ru.wikipedia.org/w/api.php");
    bot.login("user","pass");
    System.out.println(bot.isLoggedIn());

    Result is true.

     
  • Loki

    Loki - 2010-04-10

    okay I have applied a patch to last snapshot version, can you send me some feedback if it's ok or not ?

     
  • ilalex

    ilalex - 2010-04-11

    It's worked for me.

     
  • ilalex

    ilalex - 2010-04-11

    s/worked/work/

    Sorry, for my English. :)

     
  • Loki

    Loki - 2010-04-18
    • status: pending --> closed-fixed
     

Log in to post a comment.