-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kobo reader browser not working #62
Comments
Can you check to see if anything is rendered if you add If the checkconfig page displays, what does it say under Please confirm if the page is completely blank - or if you are seeing the title text at the top of the page (as opposed to what might be displayed in the app title bar). |
I only see the library title on the app title bar, not on top of the actual page, which is completely blank. It's not scrollable and nothing is selectable, so it is empty, not just "white". Rendering is done client side, according to the configuration check. checkconfig.php loads and renders without problems. The rest of the configuration checks are ok for all libraries (I do use multiple libraries, is that perhaps a possible source of a problem?). I do see the footer credits of the kindle theme at the bottom of the checks, which don't show on the frontpage. Edit: it's not a problem with multiple libraries, just checked now. |
Those credits are added by the CSS for the Kindle theme. So we can see that PHP is working fine and at least the code for getting the theme from your cookie is also working. Unfortunately I don't have a Kobo to check with - just a 10 year old Kindle Paperwhite. For me the container is working fine, but the Kindle is forced to use server side rendering. As far as I know, the Kobo's worked with client side rendering fine, and I'd be surprised if that had changed. However, you could force server side rendering just to check - to do this add the following line to your config_local.php file: $config['cops_server_side_render'] = "."; This should take effect immediately - no need to restart the container or anything. The checkconfig.php page should show Server side rendering after making the change and refreshing the page. If you do this does the home page of the library work? |
Just looking at the container - If you edit You can edit |
With server-side rendering it works, woohoo. :) |
Some recent code changes didn't work great with older browsers (those supporting ES5) so it could be that, in which case there may be a fix in the next release as we resolved some issues with Kindle which is really out of date! No guarantees, as I'm not exactly sure what your issue is caused by. If you share your Kobo browser's user agent string I can let you know how to configure COPS to use server side with it in the meantime. Could you browse to https://whatmyuseragent.com/ with your Kobo browser and share what it shows here? Or you could just run server side on every platform, which is what the config line I shared does. If you are running in a container that probably isn't the worst. |
No problem with running it server-side, it's for family use only. User agent: |
Thanks. The Kindle browser on my old Paperwhite reports AppleWebKit/531.2, so I expect the level of support for JavaScript is similar. @mikespub maybe we should be checking for support for ES6 and above to enable client side rendering, rather than an increasingly complex preg of the user agent string. Maybe something like this: https://www.bram.us/2016/10/31/checking-if-a-browser-supports-es6/ |
@peroksid5 if you update your config file to replace the line I gave you with this -it will force server-side rendering on your Kobo, and use client side elsewhere:
Would appreciate if you could confirm this works. Probably needs a little finesse since newer Kobo readers may support client side rendering and users might want it, but it should fix things for you without forcing everything server side. |
@dunxd It works. COPS now does server-side rendering on my Kobo and client-side on phone and computer. Apropos Kobo versions: Kobos are (with the exception of the mini model, and even that one can be upgraded manually) all on the same software version - even the oldest models can be upgraded to the latest firmware, with just some specific features available only in newer models (and those can often be turned on for older ones too - it's super easy to access system files and configs, so you don't have to be an expert to "hack" it). So my guess would be none of them currently support client-side rendering with the latest COPS updates (but someone with a latest model can confirm/deny this probably, I'm on a Libra H2O). |
Thanks - that is super helpful. None of these browsers are particularly popular (in the grand scheme of the WWW) and not particularly well documented so your input is valuable. @mikespub what do you think to keeping things simple and just adding "Kobo" to the default regex check for server side? I've spent a ton of time looking for a smarter method to detect what should be server side and it feels like less effort overall might be spent just adding device names to the regex as people report problems. Update see PR #64 |
Thanks for picking this up @dunxd - I'm glad that @peroksid5 can at least continue working with the latest version for now... PR #64 has been merged along with #61 but I haven't had the time to try it out myself - no Kobo, Kindle or other e-reader here except an Android tablet with recent Chrome version :-) |
Thank you for the help @dunxd, this improves the WAF of my homelab by a lot. :) |
My pleasure. I've submitted a pull request to make Kobo default to server side, which should make it into the next release, which should in turn make it into the docker container version. At that point you can remove the custom setting if you want. |
Hi.
Since upgrading to this version of COPS, I cannot browse my library from my Kobo Libra H2O.
The Kobo is upgraded to the latest software, and I am using the latest version of Linuxserver's Docker container for COPS.
When trying to load the page, the browser shows the title of the page, but no content is rendered (I get a blank page). Opening the same page on a phone or desktop works flawlessly.
I've set my default template to default/kindle and deleted cookies on the Kobo to force the default view, but that doesn't help.
Has anyone managed to open the COPS website on a Kobo?
The text was updated successfully, but these errors were encountered: