• Resolved corvy

    (@corvy)


    I have tried to get the plugin to work but I do not know why it fails. How do I get the JSON response debug to do more analysis?

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 20 total)
  • Thread Starter corvy

    (@corvy)

    My config is as follows:

    api_permissions:
      "rest api":
        who:
          - user: "[email protected]"
        what:
          - ban_account
          - change_password
          - check_account
          - check_password
          - get_presence
          - get_vcard
          - kick_user
          - private_get
          - private_set
          - register
          - registered_vhosts
          - send_message
          - unregister

    My port listen is set up as follows:

      -
        port: 5285
        ip: "::"
        module: ejabberd_http
        request_handlers:
          api: mod_http_api

    I can connect to the api with a web-browser but I cannot find why it fails in the logs.

    • This reply was modified 4 years, 6 months ago by corvy.
    • This reply was modified 4 years, 6 months ago by corvy.
    Thread Starter corvy

    (@corvy)

    The API address in the plugin is currently: https://jabber.no:5285/api but I have also tried https://localhost:5285/api and also https://jabber.no:5443/api because in the default config there is api plugin with TLS on port 5443. None of them work.

    Plugin Author Beherit

    (@beherit)

    Hello! You must open the browser console on the page where you added the form. Then filter XHR response on the network tab. There you should see the plugin request and response with additional debug information from ejabberd server.

    Thread Starter corvy

    (@corvy)

    Thank you for the response!

    https://pasteboard.co/JmUj5iI.png

    This is what I get. It seems the plugin does not work at all, or?

    • This reply was modified 4 years, 6 months ago by corvy.
    Plugin Author Beherit

    (@beherit)

    The plugin doesn’t correctly handle your site’s permalink settings. I just released a fix, please download and install development version: https://downloads.www.ads-software.com/plugin/ejabberd-account-tools.zip It should be working right now ??

    Thread Starter corvy

    (@corvy)

    Thanks alot! ?? That worked better. Now the plugin checks for free usernames and discovers corrrectly if a JID is taken or free. When I try to register the registration fails again. Now I get a 400 Bad Request error.

    https://pasteboard.co/JmVVBBY.png

    Is this related to the same issue?

    Plugin Author Beherit

    (@beherit)

    No, it’s something else. Check what it is on the Response tab. Try to enable errors in PHP, maybe there is some bug in code.

    Okay I know what is going on, I working on fix.

    • This reply was modified 4 years, 6 months ago by Beherit.
    Plugin Author Beherit

    (@beherit)

    Ok, I fixed it. Please reinstall development version: https://downloads.www.ads-software.com/plugin/ejabberd-account-tools.zip

    Thread Starter corvy

    (@corvy)

    Thanks again ?? I now get message that the user ID is taken.

    https://pasteboard.co/JmXhmsZ.png

    https://pasteboard.co/JmXhxQa.png

    Plugin Author Beherit

    (@beherit)

    I checked your registration form and now it is something wrong with your ejabberd configuration. Are you have vhost jabber.no properly configured?

    Plugin Author Beherit

    (@beherit)

    Do you have mod_register enabled?

    Thread Starter corvy

    (@corvy)

    Yes I have, but there is something wrong with my database it seems. I think there was an error during one of the schema updates. This seems to be causing the troubles (I have not been adding users for months due to a spam attack).

    2020-08-18 22:19:29.802644+02:00 [error] <0.457.0>@ejabberd_sql:check_error/2:1236 SQL query 'INSERT INTO users(username, password) VALUES ('proact6', '6b8a3278a4b4ac1d');' failed: "#HY000Field 'serverkey' doesn't have a default value"

    Or could it be due to the fact I use plain passwords in the DB still? I should move to encrypted ones… if so then this will be my next step.

    Thread Starter corvy

    (@corvy)

    Just created a few tables missing the MySQL database and also enabled SCRAM for passwords and now it seems to be working. Thanks!

    Thread Starter corvy

    (@corvy)

    Hello again @beherit, I have progressed quite a bit since yesterday. The accounts gets created and I also set up email sending from the server finally stopping the mails from getting caught in SPAM filters. But now I struggle with the activation emails and password reset emails. For instance I get this email link to press:

    https://www.jabber.no/?code=78df23486199ce303df23651dd693169

    But when I press it I get no confirmation or landing page. Is this expected?

    Plugin Author Beherit

    (@beherit)

    Again it is problem with your site’s permalink settings. I will try to fix it.

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘How to debug’ is closed to new replies.