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

[bug?] Android OTA updates do not seem to work #4599

Closed
arooni opened this issue Feb 16, 2019 · 14 comments

Comments

@arooni
Copy link

commented Feb 16, 2019

  • KOReader version: 2019.02.01 stable
  • Device: pixel XL and fire tablet 10

Issue

I wanted to grab the latest bits for Android so I could get the dictionary working. When I selected development and asked to update it found version 201902000032 so I click update ..

Get "failed to update Koreader" and even after clicking retry and restarting the app there is no difference...

Normally id just download the apk but it looks like there isn't a new release and I'm not up for compiling it right now

Steps to reproduce

@Frenzie

This comment has been minimized.

Copy link
Member

commented Feb 16, 2019

Fixed by #4598, in fact. ;-)

@Frenzie

This comment has been minimized.

Copy link
Member

commented Feb 16, 2019

Or possibly fixed, anyway. I don't know if the post-zsync part of it works.

To get the dictionary working you can just extract the dictionaries into /sdcard/koreader/data/dict

See https://github.com/koreader/koreader/wiki/Dictionary-support

All "download dictionaries" does is that is has a list of known free dictionaries that it downloads & extracts. The extraction part is where it went off course.

Nightlies are built around 6 AM CET, in this case meaning the latest nightly predates the fix by about ten hours.

@arooni

This comment has been minimized.

Copy link
Author

commented Feb 16, 2019

Vaugely related. When I ran the update on my Kindle it said "error Koreader failed to update and may not work properly " yet I still see the highlight adjustment feature that was just added

@Frenzie

This comment has been minimized.

Copy link
Member

commented Feb 16, 2019

Very vaguely related. Android is quite different from other systems. :-)

I've never seen such a message. Do you have enough disk space available? Pinging @NiLuJe

@arooni

This comment has been minimized.

Copy link
Author

commented Feb 16, 2019

I can open a new issue for it if you'd rather

I have 2gb free. Ran into it on the previous ota update and again on this one.

The only thing I can think of is I modified the footer file to be a 12 hour clock. But it looks like that change was overwritten sometime and now I'm back to the 24 hour clock

@Frenzie

This comment has been minimized.

Copy link
Member

commented Feb 16, 2019

Yes, please open a new issue. Twice in a row is most peculiar. Did you perhaps open one of the Lua files in a text editor via SSH or some such? Mark a file as read-only?

The only thing I can think of is I modified the footer file to be a 12 hour clock. But it looks like that change was overwritten sometime and now I'm back to the 24 hour clock

Core files will be overwritten by the OTA update, so modifications like that would not persist. I personally actually use OTA updates for that purpose quite deliberately when I'm testing something on my H2O. But as far as the update knows it's just the old file that's being replaced, nothing out of the ordinary.

For example, that's why defaults.lua says this:

koreader/defaults.lua

Lines 1 to 2 in 333f865

-- To make configuration changes that persists between (nightly) releases,
-- copy defaults.lua to defaults.persistent.lua and make the changes there.

@NiLuJe

This comment has been minimized.

Copy link
Member

commented Feb 16, 2019

IIRC, that's the error from the KUAL extension (or something :D) on Kindle, and it's exactly what it says on the tin: tar/unzip returned an error code.

In any case, checking the crash.log might be worth it, as stderr gets dumped there.

@arooni

This comment has been minimized.

Copy link
Author

commented Feb 16, 2019

Yes, please open a new issue. Twice in a row is most peculiar. Did you perhaps open one of the Lua files in a text editor via SSH or some such? Mark a file as read-only?

The only thing I can think of is I modified the footer file to be a 12 hour clock. But it looks like that change was overwritten sometime and now I'm back to the 24 hour clock

Core files will be overwritten by the OTA update, so modifications like that would not persist. I personally actually use OTA updates for that purpose quite deliberately when I'm testing something on my H2O. But as far as the update knows it's just the old file that's being replaced, nothing out of the ordinary.

For example, that's why defaults.lua says this:
koreader/defaults.lua

Lines 1 to 2 in 333f865

-- To make configuration changes that persists between (nightly) releases,
-- copy defaults.lua to defaults.persistent.lua and make the changes there.

This is well worth reading; I didn't know that my settings were gone unless I saved that.

Is that the case for the plugins too? I just noticed that my wallabag, dropbox, and other settings seem to be overwritten?.

i.e. feed_config.persistent.lua ?

@Frenzie

This comment has been minimized.

Copy link
Member

commented Feb 16, 2019

Not generally, but it's possible that one of the plugins has a bug in that regard. You don't need to know all the ins and outs of the program to write a plugin (which is quite intentional!). But I think it's not terribly strange that OTA updating would replace local changes to the source.

If you haven't had any problems with your feed config file, i assume it's fine. ;-)

This is well worth reading; I didn't know that my settings were gone unless I saved that.

Everything in /settings is safe, as well as settings.reader.lua. defaults.lua is just a bit of a special half-legacy case.

Iirc you're supposed to copy the sample feed_config file over to /settings. It could've been named a little clearer as far as that goes…

@arooni

This comment has been minimized.

Copy link
Author

commented Feb 16, 2019

I understand the rationale. Makes sense.

Upon further investigation the only thing that seemed like it lost track of itself was having to log into evernote again (that and the whipsersync position syncing). I didn't see an evernote config file in /settings/ ... Did I miss something?

And... if I have defaults.persistent.lua, will I be able to make changes via the UI and have them written to defaults.persistent.lua, or will changes via the UI only be written to defaults.lua (and subject to being overwritten on OTA dev channel updates)?

@arooni

This comment has been minimized.

Copy link
Author

commented Feb 16, 2019

Or possibly fixed, anyway. I don't know if the post-zsync part of it works.

To get the dictionary working you can just extract the dictionaries into /sdcard/koreader/data/dict

See https://github.com/koreader/koreader/wiki/Dictionary-support

All "download dictionaries" does is that is has a list of known free dictionaries that it downloads & extracts. The extraction part is where it went off course.

Nightlies are built around 6 AM CET, in this case meaning the latest nightly predates the fix by about ten hours.

What a catch 22 :)

I actually don't see where the koreader directory is supposed to be located on Android. I'm sure it's installed but doesn't seem listed in /sdcard/koreader
screenshot 2019-02-16 17 02 14

Edit: weird; android file transfer on mac doesnt see it but a local file explorer app on android does.

@Frenzie

This comment has been minimized.

Copy link
Member

commented Feb 17, 2019

Upon further investigation the only thing that seemed like it lost track of itself was having to log into evernote again (that and the whipsersync position syncing). I didn't see an evernote config file in /settings/ ... Did I miss something?

There could also be certain assumptions in plugins that break down on Android (and AppImage/Ubuntu Touch/Debian package/Sailfish/etc.) that work on the original Kindle/Kobo/PocketBook code. Although at least on Android as long as it works it's debatable whether it's just a platform "feature" that you need to really dig around to find relevant stuff in /data/wherever.

And... if I have defaults.persistent.lua, will I be able to make changes via the UI and have them written to defaults.persistent.lua, or will changes via the UI only be written to defaults.lua (and subject to being overwritten on OTA dev channel updates)?

That depends on what you mean by "via the UI". If you mean using the "Advanced settings" editor, then naturally it'll create a defaults.persistent.lua. If you mean using the newer built-in text editor plugin, then surely not unless you specifically tell it to (meaning you edit it and then rename it, or the other way around).

@arooni

This comment has been minimized.

Copy link
Author

commented Feb 17, 2019

Upon further investigation the only thing that seemed like it lost track of itself was having to log into evernote again (that and the whipsersync position syncing). I didn't see an evernote config file in /settings/ ... Did I miss something?

There could also be certain assumptions in plugins that break down on Android (and AppImage/Ubuntu Touch/Debian package/Sailfish/etc.) that work on the original Kindle/Kobo/PocketBook code. Although at least on Android as long as it works it's debatable whether it's just a platform "feature" that you need to really dig around to find relevant stuff in /data/wherever.

And... if I have defaults.persistent.lua, will I be able to make changes via the UI and have them written to defaults.persistent.lua, or will changes via the UI only be written to defaults.lua (and subject to being overwritten on OTA dev channel updates)?

That depends on what you mean by "via the UI". If you mean using the "Advanced settings" editor, then naturally it'll create a defaults.persistent.lua. If you mean using the newer built-in text editor plugin, then surely not unless you specifically tell it to (meaning you edit it and then rename it, or the other way around).

I know these questions of mine are kind of all over the place, but when I was talking about things not persisting between updates it was regarding the Kindle. So not sure where the evernote stuff lived.

I did create a defaults.persistent.lua via ssh.

I guess I meant looking at the UI via setting default fonts, margins, evernote, etc...

@Frenzie

This comment has been minimized.

Copy link
Member

commented Feb 18, 2019

Advanced settings is a bit hidden. It's on the file manager under tools near the end (possibly page 2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.