readium / r2-testapp-js

NodeJS Readium2 "test app"
BSD 3-Clause "New" or "Revised" License
10 stars 1 forks source link

Linux: AppImage and Debian package fail to access files inside the Electron ASAR #17

Closed danielweck closed 5 years ago

danielweck commented 5 years ago

PATH_TO_ASAR/misc/epubs/ contains the shipped test publications https://github.com/readium/r2-testapp-js/tree/develop/misc/epubs

Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'forEach' of undefined

Maybe:

https://github.com/readium/r2-testapp-js/blob/a127b83ba12b4418cfe3be07cbe163062d9e92ec/src/electron/main/index.ts#L112-L121

?

danielweck commented 5 years ago

CC @brettins

danielweck commented 5 years ago

1) Download Readium2_desktop_testapp.1.0.6-0.AppImage from https://github.com/readium/r2-testapp-js/releases/tag/latest-linux 2) chmod a+x ./Readium2_desktop_testapp.1.0.6-0.AppImage 3) ./Readium2_desktop_testapp.1.0.6-0.AppImage

danielweck commented 5 years ago

Related issue: https://github.com/readium/r2-testapp-js/issues/18

danielweck commented 5 years ago

The Debian package can be started, but choosing a file from the filesystem defaults to the built-in misc/epubs folder which is inaccessible.

Thank you @Scarsniik for the bug report. I am able to reproduce on my Lubuntu Virtual Machine as well (I am primarily on MacOS).

image

The screenshot says that the misc/epub/ folder inside the ASAR is not a folder (which kind of makes sense from the file explorer's perspective, although Electron itself treats ASAR archives as exploded folders via a filesystem abstraction).

Note: this may or may not be problematic when we the integrate LCP native lib ... to be determined.

danielweck commented 5 years ago

Fixed. We don't load these built-in EPUBs anymore. https://github.com/readium/r2-testapp-js/commit/6f2cac62419c1371018265c93416abc0c6e692a6 In fact, they are not "built-in" anymore: https://github.com/readium/r2-testapp-js/commit/a1b076883e90de2e2dc2f4ab701fb28ad0d197f4