User Creation Unknown Error Occured | Bookstack #2953

Closed
opened 2026-02-05 05:50:02 +03:00 by OVERLORD · 8 comments
Owner

Originally created by @SantisTraining on GitHub (Aug 11, 2022).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

Dear Bookstack Community

We have the problem that we cannot create any new users in our Bookstack website (wiki).
When I try to create the User with the Admin account and all credentials and the correct persmissions and press on create there
a new error message opens with the the message: An Error Occured (An unknown error occured).
I've checked the logs before and after user creation.
The New error message from the error Log that appears is the following when i try to create an account:
IP Hidden - - [11/Aug/2022:08:27:18 +0200] "POST /settings/users/create HTTP/1.1" 500 15562 "http://wiki.hiddenurl.local/settings/users/create" "Mozilla/5.0 (Windows NT 10.0; W>

image

Has somebody already had the same error before and if so, how did you find a solution for this problem?

Thanks in Advance for the Help

yours Sincerly
Santis

Exact BookStack Version

v22.04.2

Log Content

Accesslog after user creation.txt
accesslogbeforeusercreation.txt
errorlog.txt
errorlog1.txt

PHP Version

8.1.2

Hosting Environment

Ubuntu 22.04.1 LTS
Release 22.04

Originally created by @SantisTraining on GitHub (Aug 11, 2022). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario Dear Bookstack Community We have the problem that we cannot create any new users in our Bookstack website (wiki). When I try to create the User with the Admin account and all credentials and the correct persmissions and press on create there a new error message opens with the the message: An Error Occured (An unknown error occured). I've checked the logs before and after user creation. The New error message from the error Log that appears is the following when i try to create an account: IP Hidden - - [11/Aug/2022:08:27:18 +0200] "POST /settings/users/create HTTP/1.1" 500 15562 "http://wiki.hiddenurl.local/settings/users/create" "Mozilla/5.0 (Windows NT 10.0; W> ![image](https://user-images.githubusercontent.com/111039775/184078089-8dbcea38-7b4a-4ac5-a540-2b1ead59a7ce.png) Has somebody already had the same error before and if so, how did you find a solution for this problem? Thanks in Advance for the Help yours Sincerly Santis ### Exact BookStack Version v22.04.2 ### Log Content [Accesslog after user creation.txt](https://github.com/BookStackApp/BookStack/files/9306760/Accesslog.after.user.creation.txt) [accesslogbeforeusercreation.txt](https://github.com/BookStackApp/BookStack/files/9306761/accesslogbeforeusercreation.txt) [errorlog.txt](https://github.com/BookStackApp/BookStack/files/9306762/errorlog.txt) [errorlog1.txt](https://github.com/BookStackApp/BookStack/files/9306763/errorlog1.txt) ### PHP Version 8.1.2 ### Hosting Environment Ubuntu 22.04.1 LTS Release 22.04
OVERLORD added the 🐕 Support label 2026-02-05 05:50:02 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Aug 11, 2022):

Hi @SantisTraining,
None of the log files shared are relevant error log files, but are access and general service log files.
Please view the error log file, as described in our docs to gain details on this particular error.

@ssddanbrown commented on GitHub (Aug 11, 2022): Hi @SantisTraining, None of the log files shared are relevant error log files, but are access and general service log files. Please view the error log file, [as described in our docs](https://www.bookstackapp.com/docs/admin/debugging/#error-log-file) to gain details on this particular error.
Author
Owner

@SantisTraining commented on GitHub (Aug 11, 2022):

@ssddanbrown Hey Thx for the quick response.

Iwasn't sure if i sent you the right logs.

I got the Laravel log now you also have to know that im not the one who installed this application so its all kind of new form me and my workpartners. As i see in this log it tells me the mail cannont be sent because smtp.mailserver isnt configured correctly is this true ?
and thx for the help in advance
laravel.log

@SantisTraining commented on GitHub (Aug 11, 2022): @ssddanbrown Hey Thx for the quick response. Iwasn't sure if i sent you the right logs. I got the Laravel log now you also have to know that im not the one who installed this application so its all kind of new form me and my workpartners. As i see in this log it tells me the mail cannont be sent because smtp.mailserver isnt configured correctly is this true ? and thx for the help in advance [laravel.log](https://github.com/BookStackApp/BookStack/files/9307642/laravel.log)
Author
Owner

@ssddanbrown commented on GitHub (Aug 11, 2022):

Hi @SantisTraining,
That is correct, It looks like the system is having trouble sending email through the configured outlook-based SMTP provider.
In your /var/www/bookstack/.env file, what is the current value (If existing) of the MAIL_ENCRYPTION option?

If it helps, while testing & configuring things, you can send test emails via the "Settings > Maintenance" area within BookStack.

@ssddanbrown commented on GitHub (Aug 11, 2022): Hi @SantisTraining, That is correct, It looks like the system is having trouble sending email through the configured outlook-based SMTP provider. In your `/var/www/bookstack/.env` file, what is the current value (If existing) of the `MAIL_ENCRYPTION` option? If it helps, while testing & configuring things, you can send test emails via the "Settings > Maintenance" area within BookStack.
Author
Owner

@SantisTraining commented on GitHub (Aug 11, 2022):

Hello @ssddanbrown

The Lines are listed as followed:
MAIL_HOST=smtp-mail.outlook.com
MAIL_PORT=587
MAIL_USERNAME=hiddenmail@mail.ch
MAIL_PASSWORD=null
MAIL_ENCRYPTION=STARTTLS

without quotation and closing marks

Greetings

Santis

@SantisTraining commented on GitHub (Aug 11, 2022): Hello @ssddanbrown The Lines are listed as followed: MAIL_HOST=smtp-mail.outlook.com MAIL_PORT=587 MAIL_USERNAME=hiddenmail@mail.ch MAIL_PASSWORD=null MAIL_ENCRYPTION=STARTTLS without quotation and closing marks Greetings Santis
Author
Owner

@ssddanbrown commented on GitHub (Aug 11, 2022):

Hi @SantisTraining,

You could try changing changing the MAIL_ENCRYPTION=STARTTLS to instead be MAIL_ENCRYPTION=tls.
Additionally, you might need to change your MAIL_HOST option to be MAIL_HOST=smtp.office365.com.
You may also need to provide a password, sometimes (Such as if MFA is enabled) you may need to generate a seperate "app password" for this kind of usage.

@ssddanbrown commented on GitHub (Aug 11, 2022): Hi @SantisTraining, You could try changing changing the `MAIL_ENCRYPTION=STARTTLS` to instead be `MAIL_ENCRYPTION=tls`. Additionally, you might need to change your `MAIL_HOST` option to be `MAIL_HOST=smtp.office365.com`. You may also need to provide a password, sometimes (Such as if MFA is enabled) you may need to generate a seperate "app password" for this kind of usage.
Author
Owner

@SantisTraining commented on GitHub (Aug 15, 2022):

@ssddanbrown

i get nnow 2 errors when i played arround with the config a bit.
I switched back to STARTLS and used port 465 gave me this error.

Error thrown when sending a test email: Connection could not be established with host smtp.office365.com :stream_socket_client(): Unable to connect to starttls://smtp.office365.com:465 (Unable to find the socket transport "starttls" - did you forget to enable it when you configured PHP?)

then i switched back to tls and got this one. its the same.

Error thrown when sending a test email: Connection could not be established with host smtp.office365.com :stream_socket_client(): Unable to connect to starttls://smtp.office365.com:465 (Unable to find the socket transport "starttls" - did you forget to enable it when you configured PHP?)

now i got these settings x is just the mail we use.

Mail sender details
MAIL_FROM_NAME="Proxmox-Team Santis-Wiki"
MAIL_FROM=x

SMTP mail options
These settings can be checked using the "Send a Test Email"
feature found in the "Settings > Maintenance" area of the system.
MAIL_HOST=smtp.office365.com
MAIL_PORT=587
MAIL_USERNAME=x
MAIL_PASSWORD=null (not set cause its an email without password probably the problem ?)
MAIL_ENCRYPTION=tls

Error thrown when sending a test email: Failed to authenticate on SMTP server with username "X" using 2 possible authenticators. Authenticator LOGIN returned Expected response code 235 but got code "535", with message "535 5.7.139 Authentication unsuccessful, the user credentials were incorrect. [ZR0P278CA0163.CHEP278.PROD.OUTLOOK.COM] ". Authenticator XOAUTH2 returned Expected response code 235 but got code "535", with message "535 5.7.3 Authentication unsuccessful [ZR0P278CA0163.CHEP278.PROD.OUTLOOK.COM] ".

So i guess it wont work with a Mail account that has no password ? is this correct so we need a Mail we can login to it ?
thx for the help.

also a little note im not the one who did install and setup this application. the one who setup the app left the company

@SantisTraining commented on GitHub (Aug 15, 2022): @ssddanbrown i get nnow 2 errors when i played arround with the config a bit. I switched back to STARTLS and used port 465 gave me this error. Error thrown when sending a test email: Connection could not be established with host smtp.office365.com :stream_socket_client(): Unable to connect to starttls://smtp.office365.com:465 (Unable to find the socket transport "starttls" - did you forget to enable it when you configured PHP?) then i switched back to tls and got this one. its the same. Error thrown when sending a test email: Connection could not be established with host smtp.office365.com :stream_socket_client(): Unable to connect to starttls://smtp.office365.com:465 (Unable to find the socket transport "starttls" - did you forget to enable it when you configured PHP?) now i got these settings x is just the mail we use. Mail sender details MAIL_FROM_NAME="Proxmox-Team Santis-Wiki" MAIL_FROM=x SMTP mail options These settings can be checked using the "Send a Test Email" feature found in the "Settings > Maintenance" area of the system. MAIL_HOST=smtp.office365.com MAIL_PORT=587 MAIL_USERNAME=x MAIL_PASSWORD=null (not set cause its an email without password probably the problem ?) MAIL_ENCRYPTION=tls Error thrown when sending a test email: Failed to authenticate on SMTP server with username "X" using 2 possible authenticators. Authenticator LOGIN returned Expected response code 235 but got code "535", with message "535 5.7.139 Authentication unsuccessful, the user credentials were incorrect. [ZR0P278CA0163.CHEP278.PROD.OUTLOOK.COM] ". Authenticator XOAUTH2 returned Expected response code 235 but got code "535", with message "535 5.7.3 Authentication unsuccessful [ZR0P278CA0163.CHEP278.PROD.OUTLOOK.COM] ". So i guess it wont work with a Mail account that has no password ? is this correct so we need a Mail we can login to it ? thx for the help. also a little note im not the one who did install and setup this application. the one who setup the app left the company
Author
Owner

@ssddanbrown commented on GitHub (Aug 15, 2022):

So i guess it wont work with a Mail account that has no password ? is this correct so we need a Mail we can login to it ?

I am not completely sure on the rules Microsoft imposes, but I'd be surprised if you could send mail through their SMTP server without a proper authenticated account. Since that error is explicitly failing authentication due to credentials, I would assume it's therefore required.

@ssddanbrown commented on GitHub (Aug 15, 2022): > So i guess it wont work with a Mail account that has no password ? is this correct so we need a Mail we can login to it ? I am not completely sure on the rules Microsoft imposes, but I'd be surprised if you could send mail through their SMTP server without a proper authenticated account. Since that error is explicitly failing authentication due to credentials, I would assume it's therefore required.
Author
Owner

@SantisTraining commented on GitHub (Aug 18, 2022):

@ssddanbrown
thx that is what i thought. im gonna check it out i guess we can close the ticket

@SantisTraining commented on GitHub (Aug 18, 2022): @ssddanbrown thx that is what i thought. im gonna check it out i guess we can close the ticket
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2953