pierobot / mangapie

This is a self-hosted server for archived manga.
BSD 3-Clause "New" or "Revised" License
64 stars 9 forks source link

Unable to update last read page #159

Open donotos opened 4 years ago

donotos commented 4 years ago

Hello.

I have this annoying pop up message every time i go away while reading a chapter. When i come back an hour or so after this message appear when i go to the next page and i need ti refresh the page to get rid of it.

Capture d’écran 2020-04-27 à 23 20 00

something must be timing out event through the "remember me" has been selected and work well but for this.

pierobot commented 4 years ago

I'll try to reproduce.

pierobot commented 4 years ago

I was not able to reproduce. The only thing I can think of is the session expiring. Could you try to enable debug mode and see if anything shows up in the log file?

Set APP_DEBUG to true in your env file then php artisan config:cache.
You will probably need the dev dependencies if you don't have them installed already.
composer install. Once you are done with debugging you can remove the dev dependencies using composer install --no-dev

donotos commented 4 years ago

i'll try to reproduce with another install. i would be surprised because it would be the only webapp that would do that, but maybe it's the reverse proxy...

donotos commented 4 years ago

I reinstalled from scratch and reimported my db. i commented APP_URL in .env i used a simplified nginx conf:

# Server config for Mangapie
server {
    listen 80;
    listen [::]:80;
    server_name mangapie;
    root /var/www/mangapie/public;
    index index.php;

    location / {
        try_files $uri $uri/ /index.php$is_args$args;
    }

    location ^~ /public {
        internal;
        alias /var/www/mangapie/storage/app/public/;
    }

    location ~ \.php$ {
        try_files $uri =404;

        include fastcgi.conf;
        fastcgi_index index.php;
        fastcgi_pass unix:/run/php/php7.3-fpm.sock;
    }
}

no reverse proxy.

same message after start reading a chapter, wait on the page for 3h then try to go next page.

I'll try to reproduce on firefox, maybe it's a browser thing.

donotos commented 4 years ago

same on firefox

kurim commented 4 years ago

I also have the issue with Apache, but only if i leave the manga open, close the browser and reopen it, it open last and switch to next page work fine and than you got the error message.

kurim commented 3 years ago

Ok i found the reason why this happens.

Debug shows "CSRF token mismatch"

Maybe this can help: https://github.com/GeneaLabs/laravel-caffeine

donotos commented 3 years ago

yes, that make sense, it must expire and need to be refreshed.