Error page is displayed twice #4909

Open
opened 2026-02-05 09:25:30 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @Zverik on GitHub (Aug 12, 2024).

Describe the Bug

I have set up an instance manually as per instructions, but I get the "An unknown error occurred" message. No error in the apache log. Looking into it.

What seems like a bug is that the error page is rendered twice, down to the <!doctype> header in the source. Looks like the case of nested errors, each of which is printing the error page.

Actually, I've turned the debug mode on and it seems the php artisan key:generate didn't work. Still, even with the debug info, the page is printed twice.

Steps to Reproduce

Install the BookStack and mangle the APP_KEY in the .env file.

Expected Behaviour

An error message, printed once.

Screenshots or Additional Context

bookstack-double

Browser Details

Firefox 128.0.3 on Fedora Linux 40

Exact BookStack Version

v24.05.3

Originally created by @Zverik on GitHub (Aug 12, 2024). ### Describe the Bug I have set up an instance manually as per instructions, but I get the "An unknown error occurred" message. No error in the apache log. Looking into it. What seems like a bug is that the error page is rendered twice, down to the `<!doctype>` header in the source. Looks like the case of nested errors, each of which is printing the error page. Actually, I've turned the debug mode on and it seems the `php artisan key:generate` didn't work. Still, even with the debug info, the page is printed twice. ### Steps to Reproduce Install the BookStack and mangle the `APP_KEY` in the `.env` file. ### Expected Behaviour An error message, printed once. ### Screenshots or Additional Context ![bookstack-double](https://github.com/user-attachments/assets/847c968f-bb48-4f9e-9966-a8a902a9ce8f) ### Browser Details Firefox 128.0.3 on Fedora Linux 40 ### Exact BookStack Version v24.05.3
OVERLORD added the 🐛 Bug label 2026-02-05 09:25:30 +03:00
Author
Owner

@Pheasey commented on GitHub (Jul 25, 2025):

This is a known "issue" of the Laravel framework https://github.com/laravel/framework/issues/34305#issuecomment-691537730.

if the framework can't resolve a middleware due to something like a missing APP_KEY the handle and terminate both throw an exception and it gets rendered twice

@Pheasey commented on GitHub (Jul 25, 2025): This is a known "issue" of the Laravel framework https://github.com/laravel/framework/issues/34305#issuecomment-691537730. > if the framework can't resolve a middleware due to something like a missing APP_KEY the handle and terminate both throw an exception and it gets rendered twice
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4909