Open beldin666 opened 6 years ago
Hi,
Thanks for creating an issue.
Can you tell me which Nextcloud Version you run?
Which browser do you use?
Can you please also post logs from Nextcloud?
Are any errors listed on this url: index.php/apps/calibre_opds/checkconfig.php
I have exactly the same issue on nextcloud 13.0.5 and the latest calibre-odps, tested with Firefox. I assume this is the reason why I can't connect with FBReader.
XML Parsing Error: not well-formed Location: https://nextcloudserver.com/index.php/apps/calibre_opds/ Line Number 23, Column 146:
---------------------------------------------------------------------------------------------------------------------------------------------------------------^
Ok, additional the log file info from nextcloud. I don't understand why it is using sqlite and /var/www, my install is using mariadb and the default webroot of Arch Linux, maybe that is an issue?
Error index September 04, 2018 10:18:45 PDOException: could not find driver
/usr/share/webapps/nextcloud/apps/calibre_opds/lib/Base.php - line 121: PDO->__construct('sqlite /var/www...')
/usr/share/webapps/nextcloud/apps/calibre_opds/lib/Base.php - line 149: OCA\Calibre_opds\Base getDb(NULL)
/usr/share/webapps/nextcloud/apps/calibre_opds/lib/Base.php - line 156: OCA\Calibre_opds\Base executeQuerySingle('select count(*)...')
/usr/share/webapps/nextcloud/apps/calibre_opds/lib/Author.php - line 46: OCA\Calibre_opds\Base getCountGeneric('authors', 'cops authors', '1')
/usr/share/webapps/nextcloud/apps/calibre_opds/lib/Page.php - line 105: OCA\Calibre_opds\Author getCount()
/usr/share/webapps/nextcloud/apps/calibre_opds/index.php - line 55: OCA\Calibre_opds\Page->InitializeContent()
/usr/share/webapps/nextcloud/lib/private/Route/Route.php - line 155: require_once('/usr/share/weba...')
[internal function] OC\Route\Route->OC\Route\{closure}(*** sensitive parameters replaced ***)
/usr/share/webapps/nextcloud/lib/private/Route/Router.php - line 297: call_user_func(Object(Closure), Array)
/usr/share/webapps/nextcloud/lib/base.php - line 999: OC\Route\Router->match('/apps/calibre_o...')
/usr/share/webapps/nextcloud/index.php - line 42: OC handleRequest()
{main}
Hi @raneon, thanks for the log. From the error I see that the php-sqlite package is probably not installed or not found . Don't know which version of php you are running but here a link to the arch php-sqlite. https://www.archlinux.org/packages/extra/x86_64/php-sqlite/
One issue I noticed might exist is that this app doesn't work with encryption enabled. I haven't tested it myself yet.
13.0.6, php-sqlite is there (according to checkconfig.php):
`COPS Configuration Check Check if PHP version is correct OK (5.6.30-pl0-gentoo) Check if GD is properly installed and loaded OK Check if Sqlite is properly installed and loaded OK Check if libxml is properly installed and loaded OK Check if Json is properly installed and loaded OK Check if mbstring is properly installed and loaded OK Check if intl is properly installed and loaded OK Check if Normalizer class is properly installed and loaded OK Check if Calibre database path is not an URL 0 OK Check if Calibre database file exists and is readable 0 OK Check if Calibre database file can be opened with PHP Nextcloud Internal Server Error The server was unable to complete your request.
If this happens again, please send the technical details below to the server administrator.
More details can be found in the server log.`
Server log
{"reqId":"JcG9dzgG7xAGb0yfck14","level":3,"time":"2018-09-04T22:22:58+00:00","remoteAddr":"10.1.2.4","user":"sdfg","app":"index","method":"GET","url":"\/index.php\/apps\/calibre_opds\/checkconfig.php","message":"Exception: {\"Exception\":\"PDOException\",\"Message\":\"SQLSTATE[HY000] [14] unable to open database file\",\"Code\":14,\"Trace\":\"#0 \\\/var\\\/www\\\/mydomain.com\\\/cloud\\\/apps\\\/calibre_opds\\\/checkconfig.php(153): PDO->__construct('sqlite:\\\/sdfg...')\\n#1 \\\/var\\\/www\\\/mydomain.com\\\/cloud\\\/lib\\\/private\\\/Route\\\/Route.php(155): require_once('\\\/var\\\/www\\\/mydoma...')\\n#2 [internal function]: OC\\\\Route\\\\Route->OC\\\\Route\\\\{closure}(*** sensitive parameters replaced ***)\\n#3 \\\/var\\\/www\\\/mydomain.com\\\/cloud\\\/lib\\\/private\\\/Route\\\/Router.php(297): call_user_func(Object(Closure), Array)\\n#4 \\\/var\\\/www\\\/mydomain.com\\\/cloud\\\/lib\\\/base.php(999): OC\\\\Route\\\\Router->match('\\\/apps\\\/calibre_o...')\\n#5 \\\/var\\\/www\\\/mydomain.com\\\/cloud\\\/index.php(42): OC::handleRequest()\\n#6 {main}\",\"File\":\"\\\/var\\\/www\\\/mydomain.com\\\/cloud\\\/apps\\\/calibre_opds\\\/checkconfig.php\",\"Line\":153}","userAgent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/68.0.3440.107 Safari\/537.36 Vivaldi\/1.97.1279.3","version":"13.0.6.1"}
I already have COPS working flawlessly (but like you I'd rather have it all in one place :-) )
Hi @sdfg2 ,
thanks for the logs.
Hi! I have the same issue.
<script nonce="WnJGSHRnU0FSY0V0TUJtWVcwN0p3L3JiS2U0UUZyRjdNK25zN1BhcGdPND06TjhkMWdUYTVOSVZPWFgzZmJDK0ZqSnVLYnNFblYvUk1jcGk4dkozZHhOOD0=" defer src="/core/vendor/core.js?v=75bfd60c-11"></script>
NC v13.0.6, php-fpm, PostgreSQL,
do you have encryption enabled in Nextcloud?
No
In the administrative settings there is one path to the nextcloud data directory, is that configured correctly?
Yes, I fixed it after installation.
In the user settings there is one path to the calibre libraray from the users persective in nextcloud, is that configured correctly?
Yes, I checked it twice
Check if PHP version is correct
OK (7.2.7)
Check if GD is properly installed and loaded
OK
Check if Sqlite is properly installed and loaded
OK
Check if libxml is properly installed and loaded
OK
Check if Json is properly installed and loaded
OK
Check if mbstring is properly installed and loaded
OK
Check if intl is properly installed and loaded
OK
Check if Normalizer class is properly installed and loaded
OK
Check if Calibre database path is not an URL
0 OK
Check if Calibre database file exists and is readable
0 OK
Check if Calibre database file can be opened with PHP
The server was unable to complete your request.
If this happens again, please send the technical details below to the server administrator.
{"reqId":"5LcE0Ghw9p03G6BBgyxC","level":3,"time":"2018-09-05 15:21:43","remoteAddr":"172.17.0.1","user":"testuser","app":"index","method":"GET","url":"\/index.php\/apps\/calibre_opds\/checkconfig.php","message":"Exception: {\"Exception\":\"PDOException\",\"Message\":\"SQLSTATE[HY000] [14] unable to open database file\",\"Code\":14,\"Trace\":\"#0 \\\/apps2\\\/calibre_opds\\\/checkconfig.php(153): PDO->__construct('sqlite:\\\/data\\\/\\\/d...')\\n#1 \\\/nextcloud\\\/lib\\\/private\\\/Route\\\/Route.php(155): require_once('\\\/apps2\\\/calibre_...')\\n#2 [internal function]: OC\\\\Route\\\\Route->OC\\\\Route\\\\{closure}(*** sensitive parameters replaced ***)\\n#3 \\\/nextcloud\\\/lib\\\/private\\\/Route\\\/Router.php(297): call_user_func(Object(Closure), Array)\\n#4 \\\/nextcloud\\\/lib\\\/base.php(999): OC\\\\Route\\\\Router->match('\\\/apps\\\/calibre_o...')\\n#5 \\\/nextcloud\\\/index.php(42): OC::handleRequest()\\n#6 {main}\",\"File\":\"\\\/apps2\\\/calibre_opds\\\/checkconfig.php\",\"Line\":153}","userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"13.0.6.1"}
{"reqId":"5LcE0Ghw9p03G6BBgyxC","level":3,"time":"2018-09-05 15:21:43","remoteAddr":"172.17.0.1","user":"testuser","app":"PHP","method":"GET","url":"\/index.php\/apps\/calibre_opds\/checkconfig.php","message":"Cannot modify header information - headers already sent by (output started at \/apps2\/calibre_opds\/checkconfig.php:29) at \/nextcloud\/lib\/private\/legacy\/response.php#108","userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"13.0.6.1"}
@blacs30
No encryption, nextcloud-data path is fine (or nothing would work!) and the calibre-path is correct. It is on external storage, though (local filesystem), but I can browse and view the ebooks through Files.
EDIT: I just updated to 0.9.2, same thing.
@raneon to answer your question why it's using sqlite: it reads the metadata.db (Calibre Database), which is a sqlite file. Based on that much information is gathered.
The path /var/www is the default physical path, which can be changed in the admin settings for calibre_opds.
However in case of the issues which appeared and also in light of Nextcloud 14 coming soon and no support for encryption on Nextcloud it might make sense to take the app from the store and rewrite it and better test it.
I am not a php developer not have developed any apps for Nextcloud before. So I don't know at the moment the answer to the issues.
I know the code doesn't look very good, doesn't have any tests and soon with version 14 it's not going to work at all without changes.
I really wished it would've worked out differently. Because of personal circumstances I don't have that much time anymore to work on this actively so until a working version is there it might be Nextcloud 15 I believe.
Hi, I just install your code but I have an error when i go on https://nextcloud.nilisa-mail.eu/index.php/apps/calibre_opds/index.php
"Erreur d’analyse XML : mal formé Emplacement : https://nextcloud.nilisa-mail.eu/index.php/apps/calibre_opds/index.php Numéro de ligne 22, Colonne 146 : ---------------------------------------------------------------------------------------------------------------------------------------------------------------^"