Troubleshooting

The situations that actually happen on your server, and what to do about each.

Start with three addresses on your own site; they tell you which part to look at.

  1. https://your-site/opensolr-chat/widget.js must open as JavaScript. A 404 means the request never reaches the chat: the folder, the .htaccess or the nginx location.
  2. https://your-site/opensolr-chat/config must show a short JSON with your title. A server error means PHP reached the chat but the chat could not start: almost always the data folder.
  3. https://your-site/opensolr-chat/admin must open the admin.

The chat writes its own errors to the PHP error log of your site, each line starting with Opensolr Chat Bot:. That line usually names the problem.

01 · On your server
There is no chat button

Check the three addresses above first. If all three work, the page itself is missing the script tag, loads it from another host (example.com on a page of www.example.com counts), or a Content-Security-Policy of your site blocks it: the browser’s console says which. See Add the chat to your pages.

The widget.js address gives a 404

On Apache: mod_rewrite is off, or .htaccess is not read in that folder (AllowOverride). Check that the file is named .htaccess, with the dot, next to index.php. On nginx: the location blocks on Installing are missing or another location takes the path first.

A server error, or unable to open database file in the log

PHP cannot write the data folder. It must exist, be the folder named in data_dir, and be writable by the user PHP runs as, the folder itself as well as the files in it:

sudo chown -R www-data:www-data /opt/opensolr-chat

The most common cause is a password command run as root, which leaves a database owned by root. If PHP-FPM runs with systemd’s ProtectSystem, a folder under /etc or /usr is read-only to it whatever its permissions: move the data folder to /opt/opensolr-chat and change data_dir.

Run composer install first.

The password command did not find Composer’s autoloader. Run it from your project folder, the one that holds vendor/, as on Installing.

02 · In the admin
The admin says it has no password yet

Set one with the command on The admin, with the same data folder as the front controller, then reload the page.

Wrong password., with the password you just set

Most often the command and the front controller use different data folders, so the password went into another database: run the command again with the exact data_dir of index.php. Spaces around a pasted password are ignored, so they are not the cause.

Too many failed sign-ins. Please try again in 15 minutes.

Five wrong passwords from your address within 15 minutes. Wait, or set a new password with the command; the wait applies either way.

Test connection fails

What each message means is on Account and index. The connection failed is about your server’s outbound HTTPS, not about the key.

The logo is not saved

It must be a PNG, JPEG, GIF or WebP image of at most 1 MB and 4,096 pixels on each side. If PHP itself refuses the upload, its upload_max_filesize and post_max_size must be at least 1 MB.

03 · In the chat
This chat is not set up yet.

The email, the API key or the index is missing. Test the connection on the Account tab, choose the index and click Save settings.

This chat answers only on its own site.

The host name that reaches PHP is not the one in the visitor’s browser, almost always because a reverse proxy in front of the site replaces it. Make the proxy pass the visitor’s host on: proxy_set_header Host $host; in nginx, ProxyPreserveHost On in Apache.

The answer appears all at once, or The answer stopped coming.

Something between PHP and the browser buffers or compresses the answer. See Streaming through your server.

You have asked many questions in a short time., for every visitor at once

Your site is behind a proxy, a load balancer or a CDN and all visitors arrive with its address, so they share one limit. Set trusted_proxies in the front controller, as on Installing.

Please wait for the answer to your last question.

The visitor, or someone on the same IP address, has an answer still being written. One answer at a time is always the rule; it frees itself when that answer ends, or a few minutes later if the answer was cut off.

Sorry, I could not answer that right now.

The answer failed on the way. Asking again usually works. If it keeps happening, the Opensolr Chat Bot: line in your PHP error log has the reason. Check also that the AI requests of your plan are not used up for the month: see API Quota.

Captcha errors

The captcha was solved for another site, The captcha could not be checked and a captcha box that does not load are on Captcha.

The Opensolr Chat Bot Client is open source and MIT licensed. Questions about your Opensolr account, index or plan go to opensolr.com/contact; questions about the client itself belong on GitHub.

Opensolr Chat Bot Documentation