Open jtabox opened 7 months ago
Hey,
could potentially be caused by setting a (new) value for APP_KEY
after account creation.
You made me think about creating a second option to reset passwords as a command, which I'm going to implement in the future.
Regardless in your case access you should fix it with the following commands:
docker compose exec --user application app sh
php artisan tinker
User::first()->update(['password' => Hash::make('myNewSuperPassword')]);
(The second and third command have to be executed inside your container. The third one sets a new password for the first user in your database.)
This seems to have worked indeed. Though now I have another issue, all the thumbnails have disappeared (or some are there, but definitely not as many as it was before). I tried doing php artisan thumbnail:generate
and it asked me how many posts to "improve" (I guess it means to download thumbnail?), I replied all
but its reply was:
24 potential posts found. This could take several minutes.
Process post 180...
Shouldn't it start from 1 ? Not to mention I don't have only 24 posts.
Edit: this is the thumbnails folder, it contains only the ones it created now.
/var/www/public/storage/thumbnails $ ls -la
total 1424
drwxr-xr-x 2 applicat applicat 4096 Feb 6 20:12 .
drwxrwxr-x 3 www-data www-data 4096 Feb 6 20:08 ..
-rw-r--r-- 1 applicat applicat 85827 Feb 6 20:11 thumbnail_014f6f0205bc38df6a2de7b011b1fad3_197.jpg
-rw-r--r-- 1 applicat applicat 61343 Feb 6 20:10 thumbnail_07ed508b08438d774822b848fa1998c3_192.jpg
...snip...
-rw-r--r-- 1 applicat applicat 113936 Feb 6 20:12 thumbnail_f70299c7b5a1522d7b5994e525a8ef45_201.jpg
-rw-r--r-- 1 applicat applicat 90396 Feb 6 20:12 thumbnail_ff9f49cd22ea53f5c9708c38d5a147eb_202.jpg
The thumbnail command works differently. It visits every website with an actual browser and tries to make a screenshot of it. It only takes care of links that do not have a thumbnail in the database. All your old links have a thumbnail path stored in the database.
Just surprisingly your /var/www/public/storage/thumbnails
folder does not have them anymore, for some reason.
This never happend before, to my knowledge, and I can only speculate. Did you somehow change your volume ? Have you checked if there are multiple volumes for this application (that are not containing the database) ?
Edit: Your original problem could be related to that. Could it theoretically be possible that you used no volume at the beginning?
I did a fresh reinstall of Docker for a completely unrelated issue, but it was after the first issue appeared. Though my Docker has been bugging out before that, so it might have played a role.
In regards to the 2nd issue with the thumbnails, the original volume with the thumbnails was deleted altogether with the Docker fresh reinstall, which was expected. The links and various posts survived with the rest of Benotes' database because they're in a remote database.
So I was hoping that Benotes would recreate the missing thumbnails, either automatically or I could trigger it manually, but it seems like it thinks the thumbnails are already created so it won't bother. I guess it writes this info in its database (of which thumbnails are already done)? Is there some way to trigger the recreation of thumbnails? I mean other than just deleting the database altogether and reimporting every link, but it's well over 300+ at this point, and trying to mass import them previously as HTML has always lead to error 500.
docker compose exec --user application app sh php artisan tinker User::first()->update(['password', Hash::make('myNewSuperPassword')]);
I had to set an associative array. It returned true
but without updating the value.
User::first()->update(['password' => Hash::make('myNewSuperPassword')]);
It is not really designed for assuming the database still exists, yet all other files are lost. You can either try again to import them and open another issue if there's in issue arising. Otherwise you could manipulate the database by removing all thumbnail image paths from the database similar to how you changed your user's password:
docker compose exec --user application app sh
php artisan tinker
Post::whereNotNull('image_path')->update(['image_path' => null]);
Thanks @johnchristopher for pointing out my typo !
Hey,
I'm running Benotes via Docker compose and today after rebooting the host computer it suddenly stopped working. Or rather, it works fine, but won't accept my credentials (that were working an hour ago, before the reboot).
There's nothing out of the ordinary in the docker logs from what I can see:
Is there some way to reset the password or at least salvage my links? Or is everything lost? I'm using sqlite as the database.
Edit: I can't use the "Forgot password" link, because the email I used is non-existent, I'm the only user of the program and it runs on my 2nd PC at home.