Updated to latest 0.13, and using Lumen 5.6 latest. (Lumen - not Laravel.)
Setup has always worked. Now whenever we hit our /logs
endpoint, we get the following:
Class 'Crypt' not found (View: \/var\/www\/server\/vendor\/rap2hpoutre\/laravel-log-viewer\/src\/views\/log.blade.php
Our web.php
is as required:
$router->group(['namespace' => '\Rap2hpoutre\LaravelLogViewer'], function () use ($router) {
$router->get('logs', 'LogViewerController@index');
});
And yes we have the appropriate line in app.php
:
// Lumen.log viewer.
$app->register(\Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider::class);
Simply cannot get past this error. I don't know if it's related to the Lumen upgrade to 5.6, the upgrade to 0.13 for the log viewer itself, or a combination of the two.
Please help. Thanks.
Ok thanks!
It's not a problem about Lumen, it's something broken in Laravel Log Viewer, that uses Crypt
now (which is not accessible in Lumen). I fixed it via https://github.com/rap2hpoutre/laravel-log-viewer/commit/6789caf0ecfae14f7238b3d20832d961f503351f (thanks to you). Could you try to update to v0.14? Let me know if it's OK now!
On 0.14.1, now it's this error:
Call to undefined function Rap2hpoutre\\LaravelLogViewer\\config_path()
Woops. Ok fixed! Could you try with v0.14.2?
Thank you for your patience!
Hi @rap2hpoutre, I think this is where @mhousser's problem is: https://github.com/rap2hpoutre/laravel-log-viewer/blob/3ee40c9e4bf357de83f96d7b60672e17b3aa5e4a/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewerServiceProvider.php#L34
0.14.2 still gives me the same error:
Call to undefined function Rap2hpoutre\\LaravelLogViewer\\config_path()
Woops. I commit bugs in each commit today (because I don't take time to read and test, hum. I must be tired). Sorry.
Ok, @mikemand (the original creator of log viewer!): do you want to submit a PR? (I can try to fix it myself if you prefer!)
Hi @rap2hpoutre, I will attempt a fix shortly. :)
Lumen is great for some things, but it's so stripped down it's hard to support both Laravel and Lumen in the same package sometimes. :(
Thanks @mikemand !
@mhousser The fix is available in v0.14.3.
The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths. (View: \/var\/www\/server\/vendor\/rap2hpoutre\/laravel-log-viewer\/src\/views\/log.blade.php)
I'm not sure if this is still a bug or something that we haven't done in our upgrade to the latest Lumen 5.6.*..?
Nevermind. APP_KEY
needed to be 32 characters long, and it was not immediately obvious. There is no artisan key:generate
in Lumen, so most of the Google search results for this were also useless.
It's working now. Laravel/Lumen log viewer is back up and running it looks like. :)
What a day! Usually, the Log Viewer's life is a bit boring: today, it reached 1 million download and crashed much more than usual 🤔
Thank you so much for your help!
Most helpful comment
Nevermind.
APP_KEY
needed to be 32 characters long, and it was not immediately obvious. There is noartisan key:generate
in Lumen, so most of the Google search results for this were also useless.It's working now. Laravel/Lumen log viewer is back up and running it looks like. :)