How to debug
-
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]
-
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 - unregisterMy port listen is set up as follows:
- port: 5285 ip: "::" module: ejabberd_http request_handlers: api: mod_http_apiI can connect to the api with a web-browser but I cannot find why it fails in the logs.
The API address in the plugin is currently: http://jabber.no:5285/api but I have also tried http://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.
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.
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 5 years, 9 months ago by
corvy.
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 It should be working right now π
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?
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.
Ok, I fixed it. Please reinstall development version: https://downloads.wordpress.org/plugin/ejabberd-account-tools.zip
Thanks again π I now get message that the user ID is taken.
I checked your registration form and now it is something wrong with your ejabberd configuration. Are you have vhost jabber.no properly configured?
Do you have mod_register enabled?
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.
Just created a few tables missing the MySQL database and also enabled SCRAM for passwords and now it seems to be working. Thanks!
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?
Again it is problem with your siteβs permalink settings. I will try to fix it.
-
This reply was modified 5 years, 9 months ago by
The topic ‘How to debug’ is closed to new replies.