seblucas / cops

Calibre OPDS (and HTML) PHP Server : web-based light alternative to Calibre content server / Calibre2OPDS to serve ebooks (epub, mobi, pdf, ...)
http://blog.slucas.fr/en/oss/calibre-opds-php-server
GNU General Public License v2.0
1.43k stars 229 forks source link

"Grey screen" when accessing via nginx reverse proxy #452

Open Cairxoxo opened 5 years ago

Cairxoxo commented 5 years ago

Up until a few months ago, I had a very simple reverse proxy set up via nginx subfolder that was working perfectly as follows:

location /cops {
    return 301 /cops/;
location /cops/ {
    rewrite /cops(.*) $1 break;
    proxy_pass http://192.168.1.5:8093;
    include /config/nginx/proxy.conf;
    }
}

It now loads nothing but a grey screen on any device that I access it on. Accessing locally via the IP:Port directly works perfectly. The following appears in chrome errors:

ERROR: LRUCache module not loaded!
/cops/getJSON.php?complete=1&_=1563933685005:1 Failed to load resource: the server responded with a status of 404 ()

Any help with a working reverse proxy configuration would be great - and perhaps insight as to why it stopped functioning also. I haven't tried it on a subdomain just yet, as I would prefer to use a subfolder but will switch over if I need to.

seblucas commented 5 years ago

I don't know what to tell you, did you update COPS at any point ?

Cairxoxo commented 5 years ago

Hi @seblucas , yes I did. Right now I'm on 1.1.3, but the issue has persisted for quite some time. I've just been letting the container update for a long time, I don't even remember exactly when the issue began. I'm using the Linuxserver IO container, by the way.

candrea21 commented 4 years ago

Same grey screen after updating Calibre to v5.1.0. I think they changed database structure:

Because of the support for library wide annotations, the database format was slightly changed.

https://calibre-ebook.com/new-in/fourteen

fbouwmeester commented 4 years ago

Hello,

I have the same problem. I am running Calibre 5.3 and COPS 1.1.3, the latter installed on a QNAP P112. COPS stopped working after upgrade to Calibre 5.x. In the browser console I see: "ERROR: LRUCache module not loaded!" and " util.js:13".

Kind regards

jvanderzande commented 3 years ago

I have the same problem. I am running Calibre 5.3 and COPS 1.1.3, the latter installed on a QNAP P112. COPS stopped working after upgrade to Calibre 5.x. In the browser console I see: "ERROR: LRUCache module not loaded!" and " util.js:13".

I have the same and posted my workaround in this issue: https://github.com/seblucas/cops/issues/487#issuecomment-723323073

grantbi commented 1 year ago

Screen Shot 2023-11-03 at 1 24 31 PM Although I have the same issue, this is the error for me. I'm not sure why the template isn't loading.

if (typeof LRUCache != 'undefined') {
    console.log('ERROR: LRUCache module not loaded!');
}

This code makes it seem like it will always show this 'error' as it will always load. Maybe it should be == instead?

Is this a CORS issue? is there something I need to provide in the proxy configuration?

horus68 commented 12 months ago

@grantbi this GIT project is no longer maintained. For Cops, please try this fork: https://github.com/mikespub-org/seblucas-cops