Skip to content
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

NC21 - Not saving anything #33

Open
lemonlim3 opened this issue Apr 30, 2021 · 22 comments
Open

NC21 - Not saving anything #33

lemonlim3 opened this issue Apr 30, 2021 · 22 comments
Labels
bug Something isn't working

Comments

@lemonlim3
Copy link

Latest release opens books fine but does not save progress, bookmarks, settings etc.

@thangisme
Copy link

Same issue here, please fix it.

@sysadminstory
Copy link

sysadminstory commented May 10, 2021

I have the same issue in NC 20 with the version 1.4.6.

I reverted to the version 1.4.5 and it retains at least the last position !

EDIT : after switching to NextCloud 22 and the master branch, it saves the last position 👍

@thangisme
Copy link

Any update on this?

@russs95
Copy link

russs95 commented May 30, 2021

It would be reallly awesome to enable the saving of comments/annotations so that EPUBs can be reviewed by colleagues.

@maxnatamo
Copy link

maxnatamo commented Jul 11, 2021

Same issue here.

EDIT: Display settings (page width, custom colors, etc.) don't seem to save either.

@e-alfred e-alfred added the bug Something isn't working label Aug 7, 2021
@ghost
Copy link

ghost commented Jan 23, 2022

New and fresh install Nextcloud 23 with EPUB/CBZ/PDF ebook reader 1.4.7
Does not save anything,sadly.
I made a new One-Click-Install on a dedicated remote server. Everything works fine but this ebook reader.

@sysadminstory
Copy link

I think I discovered why it won't save anything on some instance :

  • the reader seems to uses url without the index.php in it (aka using mod_rewrite from apache) even if it is not activated by nextcloud
  • the reader seems to use the folder "apps" even if the apps is another folder than "apps", but this must be double checked

So as for now, if you can activated the URL using "mod_rewrite" (or check if there is no missing "RewriteBase /" in the .htaccess file) it should save everything.

@muffin-1
Copy link

muffin-1 commented Jan 24, 2022

muffin-1 = Mameka, sry.
I tried to figure it out but didn't get it working to save the preferences or read pages.
The app is installed in the default folder "app". I installed a default Nextcloud installation.
Rewriting is activated. I get a green button from Nextcloud check without one warning.
Rewriting for Caldav/Webdav works.
All other apps are working fine. I get no errors in my logs.
At the end I give up.

@sysadminstory
Copy link

muffin-1 = Mameka, sry. I tried to figure it out but didn't get it working to save the preferences or read pages. The app is installed in the default folder "app". I installed a default Nextcloud installation. Rewriting is activated. I get a green button from Nextcloud check without one warning. Rewriting for Caldav/Webdav works. All other apps are working fine. I get no errors in my logs. At the end I give up.

The issue is in the epubreader app, not in your nextcloud installation.

I tried to fix the saving for epub files in PR #42

Could other users try this fix and give me feedback ?

@ickam
Copy link

ickam commented Feb 27, 2022

I have the same issue in NC 20 with the version 1.4.6.

I reverted to the version 1.4.5 and it retains at least the last position !

EDIT : after switching to NextCloud 22 and the master branch, it saves the last position 👍

how did you manage to revert it? when I just copy untarred 1.4.5 release, it produces an internal server error.

@sysadminstory
Copy link

I "reverted" it by moving the app to the standard app folder "apps", instead of the customer one I created.

IMHO, to get the last position saving to work, you must have the latest version n the "apps" folder, and no other "epubreader" folder in any custom apps directory.

@ickam
Copy link

ickam commented Feb 27, 2022

I "reverted" it by moving the app to the standard app folder "apps", instead of the customer one I created.

IMHO, to get the last position saving to work, you must have the latest version n the "apps" folder, and no other "epubreader" folder in any custom apps directory.

I tried the latest version of epubreader on clean installs of NC 22 and 23 and it didn't work. Are you saying that by default the app is installed into the wrong folder?

@sysadminstory
Copy link

I "reverted" it by moving the app to the standard app folder "apps", instead of the customer one I created.
IMHO, to get the last position saving to work, you must have the latest version n the "apps" folder, and no other "epubreader" folder in any custom apps directory.

I tried the latest version of epubreader on clean installs of NC 22 and 23 and it didn't work. Are you saying that by default the app is installed into the wrong folder?

Does your install have URL rewriting activated ?
I think it's a needed condition too !

@ickam
Copy link

ickam commented Feb 27, 2022

do you mean mod_rewrtite? It was enabled on the .htaccess file, but I was running from docker and I am not very familiar with it.
I'm going to spin up a dietpi vm and I'll see how I get on on that

@sysadminstory
Copy link

do you mean mod_rewrtite? It was enabled on the .htaccess file, but I was running from docker and I am not very familiar with it. I'm going to spin up a dietpi vm and I'll see how I get on on that

The mod_rewrite needs to be activated on Apache side and on the next loud instance. The URL of your "apps" should not contain "index.php"

@ickam
Copy link

ickam commented Feb 27, 2022

It is enabled in both places

root@DietPi:~# a2enmod rewrite
Module rewrite already enabled

RewriteEngine on RewriteCond %{HTTP_USER_AGENT} DavClnt RewriteRule ^$ /remote.php/webdav/ [L,R=302] RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteRule ^\.well-known/carddav /remote.php/dav/ [R=301,L] RewriteRule ^\.well-known/caldav /remote.php/dav/ [R=301,L] RewriteRule ^remote/(.*) remote.php [QSA,L] RewriteRule ^(?:build|tests|config|lib|3rdparty|templates)/.* - [R=404,L] RewriteRule ^\.well-known/(?!acme-challenge|pki-validation) /index.php [QSA,L] RewriteRule ^(?:\.(?!well-known)|autotest|occ|issue|indie|db_|console).* - [R>

but it still doesn't make a difference :(

@ickam
Copy link

ickam commented Feb 27, 2022

HA!
Got it working after manually implementing your PR @sysadminstory
Thanks so much, man <3

@ickam
Copy link

ickam commented Feb 27, 2022

HA! Got it working after manually implementing your PR @sysadminstory Thanks so much, man <3

Having said that, it only remembers an approximate position, it's a couple pages off (for epub anyway, I haven't tested PDF yet). I wonder why that is.

@sysadminstory
Copy link

My PR is very experimental (and to be honest, it seems to break some other things ; I need to dig very deep to fix this IMHO).

You need to "force" Nextcloud to use the "Pretty URLs" to make it work in the actual version : https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#pretty-urls

@ickam
Copy link

ickam commented Feb 27, 2022

These lines

'overwrite.cli.url' => 'https://example.org/nextcloud',
'htaccess.RewriteBase' => '/nextcloud',

were already present in my config file and the progress sync didn't work until I implemented the PR

@sysadminstory
Copy link

The way the URLs are handled in nextcloud is very obscure to me ; it seems it's more complicated than I thought, because, for me this configuration works for me (outside docker).

@rounakdatta
Copy link

Hi, I found the issue really intrusive, and digged a bit to understand where it could be going wrong, here are my findings:

Why?

If you look at the Nextcloud custom apps design, all of them need to write a routes.php (e.g. https://github.com/e-alfred/epubreader/blob/master/appinfo/routes.php) and Nextcloud would serve it over the /apps/<appName> route.

Temporary workaround

Use a Chrome extension like Requestly. This can rewrite the requests on the fly. Example configuration:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants