Title: How to debug
Last modified: August 18, 2020

---

# How to debug

 *  Resolved [corvy](https://wordpress.org/support/users/corvy/)
 * (@corvy)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/how-to-debug-4/)
 * 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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fhow-to-debug-4%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 20 total)

1 [2](https://wordpress.org/support/topic/how-to-debug-4/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/how-to-debug-4/page/2/?output_format=md)

 *  Thread Starter [corvy](https://wordpress.org/support/users/corvy/)
 * (@corvy)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/how-to-debug-4/#post-13272914)
 * My config is as follows:
 *     ```
       api_permissions:
         "rest api":
           who:
             - user: "scrambled_user_name_not_the_real_one@jabber.no"
           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 5 years, 9 months ago by [corvy](https://wordpress.org/support/users/corvy/).
    -  This reply was modified 5 years, 9 months ago by [corvy](https://wordpress.org/support/users/corvy/).
 *  Thread Starter [corvy](https://wordpress.org/support/users/corvy/)
 * (@corvy)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/how-to-debug-4/#post-13272939)
 * The API address in the plugin is currently: [http://jabber.no:5285/api](http://jabber.no:5285/api)
   but I have also tried [http://localhost:5285/api](http://localhost:5285/api) 
   and also [https://jabber.no:5443/api](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](https://wordpress.org/support/users/beherit/)
 * (@beherit)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/how-to-debug-4/#post-13272950)
 * 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](https://wordpress.org/support/users/corvy/)
 * (@corvy)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/how-to-debug-4/#post-13273206)
 * Thank you for the response!
 * [https://pasteboard.co/JmUj5iI.png](https://pasteboard.co/JmUj5iI.png)
 * This is what I get. It seems the plugin does not work at all, or?
    -  This reply was modified 5 years, 9 months ago by [corvy](https://wordpress.org/support/users/corvy/).
 *  Plugin Author [Beherit](https://wordpress.org/support/users/beherit/)
 * (@beherit)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/how-to-debug-4/#post-13273460)
 * The plugin doesn’t correctly handle your site’s permalink settings. I just released
   a fix, please download and install development version: [https://downloads.wordpress.org/plugin/ejabberd-account-tools.zip](https://downloads.wordpress.org/plugin/ejabberd-account-tools.zip)
   It should be working right now 🙂
 *  Thread Starter [corvy](https://wordpress.org/support/users/corvy/)
 * (@corvy)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/how-to-debug-4/#post-13274632)
 * 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](https://pasteboard.co/JmVVBBY.png)
 * Is this related to the same issue?
 *  Plugin Author [Beherit](https://wordpress.org/support/users/beherit/)
 * (@beherit)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/how-to-debug-4/#post-13274762)
 * 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 5 years, 9 months ago by [Beherit](https://wordpress.org/support/users/beherit/).
 *  Plugin Author [Beherit](https://wordpress.org/support/users/beherit/)
 * (@beherit)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/how-to-debug-4/#post-13275197)
 * Ok, I fixed it. Please reinstall development version: [https://downloads.wordpress.org/plugin/ejabberd-account-tools.zip](https://downloads.wordpress.org/plugin/ejabberd-account-tools.zip)
 *  Thread Starter [corvy](https://wordpress.org/support/users/corvy/)
 * (@corvy)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/how-to-debug-4/#post-13275974)
 * Thanks again 🙂 I now get message that the user ID is taken.
 * [https://pasteboard.co/JmXhmsZ.png](https://pasteboard.co/JmXhmsZ.png)
 * [https://pasteboard.co/JmXhxQa.png](https://pasteboard.co/JmXhxQa.png)
 *  Plugin Author [Beherit](https://wordpress.org/support/users/beherit/)
 * (@beherit)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/how-to-debug-4/#post-13276191)
 * 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](https://wordpress.org/support/users/beherit/)
 * (@beherit)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/how-to-debug-4/#post-13276224)
 * Do you have mod_register enabled?
 *  Thread Starter [corvy](https://wordpress.org/support/users/corvy/)
 * (@corvy)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/how-to-debug-4/#post-13277416)
 * 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](https://wordpress.org/support/users/corvy/)
 * (@corvy)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/how-to-debug-4/#post-13277662)
 * 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](https://wordpress.org/support/users/corvy/)
 * (@corvy)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/how-to-debug-4/#post-13278884)
 * Hello again [@beherit](https://wordpress.org/support/users/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](https://www.jabber.no/?code=78df23486199ce303df23651dd693169)
 * But when I press it I get no confirmation or landing page. Is this expected?
 *  Plugin Author [Beherit](https://wordpress.org/support/users/beherit/)
 * (@beherit)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/how-to-debug-4/#post-13278900)
 * 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)

1 [2](https://wordpress.org/support/topic/how-to-debug-4/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/how-to-debug-4/page/2/?output_format=md)

The topic ‘How to debug’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/ejabberd-account-tools.svg)
 * [Ejabberd Account Tools](https://wordpress.org/plugins/ejabberd-account-tools/)
 * [Support Threads](https://wordpress.org/support/plugin/ejabberd-account-tools/)
 * [Active Topics](https://wordpress.org/support/plugin/ejabberd-account-tools/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ejabberd-account-tools/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ejabberd-account-tools/reviews/)

 * 20 replies
 * 2 participants
 * Last reply from: [Beherit](https://wordpress.org/support/users/beherit/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/how-to-debug-4/page/2/#post-13282949)
 * Status: resolved