janeczku / calibre-web

:books: Web app for browsing, reading and downloading eBooks stored in a Calibre database
GNU General Public License v3.0
12.96k stars 1.39k forks source link

Kobo Sync Fails Without Log #3206

Open jmahlers opened 3 days ago

jmahlers commented 3 days ago

Please also have a look at our Contributing Guidelines

Describe the bug/problem

I have tried to set up Kobo syncing using a Kobo Libra Colour. While I have calibre web working and am able to test it in the browser, the Kobo just says sync failed.

Any help would be greatly appreciated. If you point me in the right direction I should hopefully be able to debug this. If anyone is able to point out how to correctly get the kobo log then that would be immensely helpful

Logfile [2024-10-28 21:20:03,897] WARN {cps.config_sql:384} Log path not valid, falling back to default [2024-10-28 21:20:03,950] INFO {cps:166} "greenlet" version does not meet the requirements. Should: <3.1.0, Found: 3.1.1, please consider installing required version [2024-10-28 21:20:03,950] INFO {cps:175} Starting Calibre Web... [2024-10-28 21:20:03,957] DEBUG {cps.services:26} Cannot import goodreads, showing authors-metadata will not work: No module named 'goodreads' [2024-10-28 21:20:03,959] DEBUG {cps.services:34} Cannot import simpleldap, logging in with ldap will not work: No module named 'flask_simpleldap' [2024-10-28 21:20:04,038] DEBUG {cps.services:49} Cannot import gmail, sending books via Gmail Oauth2 Verification will not work: No module named 'google_auth_oauthlib' [2024-10-28 21:20:04,114] DEBUG {cps.gdriveutils:83} Cannot import pydrive, httplib2, using gdrive will not work: No module named 'pydrive' [2024-10-28 21:20:04,152] INFO {apscheduler.scheduler:181} Scheduler started [2024-10-28 21:20:04,153] INFO {apscheduler.scheduler:895} Added job "delete temp" to job store "default" [2024-10-28 21:20:04,153] INFO {apscheduler.scheduler:895} Added job "end scheduled task" to job store "default" [2024-10-28 21:20:04,154] INFO {apscheduler.scheduler:895} Added job "immediately delete temp" to job store "default" [2024-10-28 21:20:04,154] INFO {apscheduler.executors.default:123} Running job "immediately delete temp (trigger: date[2024-10-28 21:20:04 PDT], next run at: 2024-10-28 21:20:04 PDT)" (scheduled at 2024-10-28 21:20:04.154431-07:00) [2024-10-28 21:20:04,154] INFO {apscheduler.scheduler:641} Removed job 456669f0c2fa4596a49da61f8fc6ffde [2024-10-28 21:20:04,157] DEBUG {cps.services.worker:91} Add Task for user: System - Clean up [2024-10-28 21:20:04,157] INFO {apscheduler.executors.default:144} Job "immediately delete temp (trigger: date[2024-10-28 21:20:04 PDT], next run at: 2024-10-28 21:20:04 PDT)" executed successfully [2024-10-28 21:20:04,158] DEBUG {cps.tasks.clean:43} Deleted expired session_keys [2024-10-28 21:20:04,257] DEBUG {cps.comic:46} Cannot import comicapi, extracting comic metadata will not work: No module named 'comicapi' [2024-10-28 21:20:04,261] DEBUG {cps.comic:53} Cannot import rarfile, extracting cover files from rar files will not work: No module named 'rarfile' [2024-10-28 21:20:04,262] DEBUG {cps.comic:59} Cannot import py7zr, extracting cover files from CB7 files will not work: No module named 'py7zr' [2024-10-28 21:20:04,273] WARN {py.warnings:110} E:\venv_calibre\Lib\site-packages\pypdf_crypt_providers_cryptography.py:32: CryptographyDeprecationWarning: ARC4 has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.ARC4 and will be removed from this module in 48.0.0. from cryptography.hazmat.primitives.ciphers.algorithms import AES, ARC4 [2024-10-28 21:20:04,385] DEBUG {cps.admin:82} Cannot import Flask-Dance, login with Oauth will not work: No module named 'flask_dance' [2024-10-28 21:20:04,389] DEBUG {cps.gdrive:44} Cannot import googleapiclient, using GDrive will not work: No module named 'googleapiclient' [2024-10-28 21:20:04,439] DEBUG {cps.search_metadata:62} Import error for metadata source: amazon - No module named 'bs4' [2024-10-28 21:20:04,446] DEBUG {cps.search_metadata:62} Import error for metadata source: douban - No module named 'html2text' [2024-10-28 21:20:04,453] DEBUG {cps.search_metadata:62} Import error for metadata source: lubimyczytac - No module named 'dateutil' [2024-10-28 21:20:04,455] DEBUG {cps.search_metadata:62} Import error for metadata source: scholar - No module named 'scholarly' [2024-10-28 21:20:04,530] INFO {cps.server:268} Starting Tornado server on :8083 [2024-10-28 21:20:13,527] DEBUG {cps.updater:331} Stable version: {'version': '0.6.23'} [2024-10-28 21:21:56,109] DEBUG {cps.babel:27} Could not parse locale "": expected only letters, got '' [2024-10-28 21:21:56,137] DEBUG {cps.babel:27} Could not parse locale "": expected only letters, got '' [2024-10-28 21:22:56,174] DEBUG {cps.babel:27} Could not parse locale "": expected only letters, got '' [2024-10-28 21:22:56,198] DEBUG {cps.babel:27} Could not parse locale "": expected only letters, got '' [2024-10-28 21:22:56,213] DEBUG {cps.babel:27} Could not parse locale "": expected only letters, got '' [2024-10-28 21:22:56,228] DEBUG {cps.babel:27} Could not parse locale "": expected only letters, got '' [2024-10-28 21:22:56,248] DEBUG {cps.babel:27} Could not parse locale "": expected only letters, got '' [2024-10-28 21:22:56,267] DEBUG {cps.babel:27} Could not parse locale "": expected only letters, got ''

Access Log: [2024-10-28 21:20:05,757] 200 GET /admin/config (192.168.1.101) 75.99ms [2024-10-28 21:20:05,779] 304 GET /static/css/libs/bootstrap.min.css (192.168.1.101) 3.00ms [2024-10-28 21:20:05,783] 304 GET /static/css/style.css (192.168.1.101) 5.00ms [2024-10-28 21:20:05,783] 304 GET /static/css/upload.css (192.168.1.101) 5.00ms [2024-10-28 21:20:05,784] 304 GET /static/css/libs/images/loading-icon.gif (192.168.1.101) 6.00ms [2024-10-28 21:20:05,785] 304 GET /static/js/libs/jquery.min.js (192.168.1.101) 7.00ms [2024-10-28 21:20:05,920] 304 GET /static/js/libs/bootstrap.min.js (192.168.1.101) 3.00ms [2024-10-28 21:20:05,923] 304 GET /static/js/libs/underscore-umd-min.js (192.168.1.101) 5.00ms [2024-10-28 21:20:05,925] 304 GET /static/js/libs/intention.min.js (192.168.1.101) 5.00ms [2024-10-28 21:20:05,925] 304 GET /static/js/libs/context.min.js (192.168.1.101) 5.00ms [2024-10-28 21:20:05,926] 304 GET /static/js/libs/jquery.form.min.js (192.168.1.101) 6.00ms [2024-10-28 21:20:05,927] 304 GET /static/js/libs/plugins.js (192.168.1.101) 7.00ms [2024-10-28 21:20:05,927] 304 GET /static/js/uploadprogress.js (192.168.1.101) 3.00ms [2024-10-28 21:20:05,928] 304 GET /static/js/main.js (192.168.1.101) 4.00ms [2024-10-28 21:20:05,975] 304 GET /static/css/fonts/glyphicons-halflings-regular.woff2 (192.168.1.101) 2.00ms [2024-10-28 21:20:05,976] 304 GET /static/css/fonts/GrandHotel-Regular.ttf (192.168.1.101) 2.00ms [2024-10-28 21:20:05,989] 304 GET /static/favicon.ico (192.168.1.101) 1.00ms [2024-10-28 21:20:06,061] 304 GET /static/favicon.ico (192.168.1.101) 1.00ms [2024-10-28 21:20:13,556] 200 GET /admin/view (192.168.1.101) 31.00ms [2024-10-28 21:20:13,573] 304 GET /static/css/libs/bootstrap.min.css (192.168.1.101) 2.00ms [2024-10-28 21:20:13,576] 304 GET /static/css/style.css (192.168.1.101) 3.63ms [2024-10-28 21:20:13,577] 304 GET /static/css/upload.css (192.168.1.101) 3.71ms [2024-10-28 21:20:13,577] 304 GET /static/js/libs/jquery.min.js (192.168.1.101) 3.71ms [2024-10-28 21:20:13,578] 304 GET /static/css/libs/images/loading-icon.gif (192.168.1.101) 4.72ms [2024-10-28 21:20:13,667] 304 GET /static/js/libs/bootstrap.min.js (192.168.1.101) 4.00ms [2024-10-28 21:20:13,669] 304 GET /static/js/libs/intention.min.js (192.168.1.101) 4.00ms [2024-10-28 21:20:13,670] 304 GET /static/js/libs/underscore-umd-min.js (192.168.1.101) 5.00ms [2024-10-28 21:20:13,672] 304 GET /static/js/libs/jquery.form.min.js (192.168.1.101) 6.00ms [2024-10-28 21:20:13,672] 304 GET /static/js/libs/context.min.js (192.168.1.101) 6.00ms [2024-10-28 21:20:13,673] 304 GET /static/js/libs/plugins.js (192.168.1.101) 6.00ms [2024-10-28 21:20:13,674] 304 GET /static/js/uploadprogress.js (192.168.1.101) 5.00ms [2024-10-28 21:20:13,675] 304 GET /static/js/main.js (192.168.1.101) 4.07ms [2024-10-28 21:20:13,703] 304 GET /static/css/fonts/glyphicons-halflings-regular.woff2 (192.168.1.101) 2.00ms [2024-10-28 21:20:13,703] 304 GET /static/css/fonts/GrandHotel-Regular.ttf (192.168.1.101) 2.00ms [2024-10-28 21:20:13,710] 304 GET /static/favicon.ico (192.168.1.101) 1.00ms [2024-10-28 21:20:17,957] 200 GET /admin/config (192.168.1.101) 3.91ms [2024-10-28 21:20:17,980] 304 GET /static/css/libs/bootstrap.min.css (192.168.1.101) 3.00ms [2024-10-28 21:20:17,981] 304 GET /static/css/style.css (192.168.1.101) 4.00ms [2024-10-28 21:20:17,983] 304 GET /static/css/upload.css (192.168.1.101) 4.00ms [2024-10-28 21:20:17,984] 304 GET /static/js/libs/jquery.min.js (192.168.1.101) 4.00ms [2024-10-28 21:20:17,985] 304 GET /static/css/libs/images/loading-icon.gif (192.168.1.101) 5.00ms [2024-10-28 21:20:18,071] 304 GET /static/js/libs/bootstrap.min.js (192.168.1.101) 4.00ms [2024-10-28 21:20:18,072] 304 GET /static/js/libs/underscore-umd-min.js (192.168.1.101) 5.00ms [2024-10-28 21:20:18,073] 304 GET /static/js/libs/intention.min.js (192.168.1.101) 5.00ms [2024-10-28 21:20:18,073] 304 GET /static/js/libs/context.min.js (192.168.1.101) 4.00ms [2024-10-28 21:20:18,074] 304 GET /static/js/libs/plugins.js (192.168.1.101) 5.00ms [2024-10-28 21:20:18,075] 304 GET /static/js/libs/jquery.form.min.js (192.168.1.101) 5.00ms [2024-10-28 21:20:18,076] 304 GET /static/js/uploadprogress.js (192.168.1.101) 3.00ms [2024-10-28 21:20:18,077] 304 GET /static/js/main.js (192.168.1.101) 4.00ms [2024-10-28 21:20:18,106] 304 GET /static/favicon.ico (192.168.1.101) 1.00ms [2024-10-28 21:21:56,113] 404 DELETE /kobo/a416cc0ec53d408a5a64733846b9e5a4/v1/library/sync/v1/library/tags/2912efad-321f-4ef3-b437-45f1a377f5d5 (192.168.1.114) 11.00ms [2024-10-28 21:21:56,140] 404 GET /kobo/a416cc0ec53d408a5a64733846b9e5a4/v1/library/sync/v1/library/sync?Filter=ALL&DownloadUrlFilter=Generic,Android&PrioritizeRecentReads=true (192.168.1.114) 5.00ms [2024-10-28 21:22:45,019] 200 GET /admin/logfile (192.168.1.101) 7.00ms [2024-10-28 21:22:45,048] 304 GET /static/css/libs/bootstrap.min.css (192.168.1.101) 3.00ms [2024-10-28 21:22:45,052] 304 GET /static/css/style.css (192.168.1.101) 6.00ms [2024-10-28 21:22:45,054] 304 GET /static/css/upload.css (192.168.1.101) 7.00ms [2024-10-28 21:22:45,054] 304 GET /static/js/libs/bootstrap.min.js (192.168.1.101) 7.00ms [2024-10-28 21:22:45,055] 304 GET /static/js/libs/jquery.min.js (192.168.1.101) 8.00ms [2024-10-28 21:22:45,055] 304 GET /static/js/libs/underscore-umd-min.js (192.168.1.101) 7.00ms [2024-10-28 21:22:45,057] 304 GET /static/js/libs/intention.min.js (192.168.1.101) 6.00ms [2024-10-28 21:22:45,060] 304 GET /static/js/libs/context.min.js (192.168.1.101) 6.00ms [2024-10-28 21:22:45,062] 304 GET /static/js/libs/plugins.js (192.168.1.101) 5.00ms [2024-10-28 21:22:45,064] 304 GET /static/js/libs/jquery.form.min.js (192.168.1.101) 6.34ms [2024-10-28 21:22:45,064] 304 GET /static/js/uploadprogress.js (192.168.1.101) 7.00ms [2024-10-28 21:22:45,064] 304 GET /static/js/main.js (192.168.1.101) 7.00ms [2024-10-28 21:22:45,065] 304 GET /static/js/logviewer.js (192.168.1.101) 5.00ms [2024-10-28 21:22:45,136] 304 GET /static/favicon.ico (192.168.1.101) 2.00ms [2024-10-28 21:22:45,190] 200 GET /ajax/log/0?=1730175765128 (192.168.1.101) 10.00ms [2024-10-28 21:22:56,178] 404 GET /kobo/a416cc0ec53d408a5a64733846b9e5a4/v1/library/sync/v1/initialization (192.168.1.114) 6.00ms [2024-10-28 21:22:56,202] 404 GET /kobo/a416cc0ec53d408a5a64733846b9e5a4/v1/library/sync/v1/user/profile (192.168.1.114) 5.00ms [2024-10-28 21:22:56,216] 404 GET /kobo/a416cc0ec53d408a5a64733846b9e5a4/v1/library/sync/v1/user/loyalty/benefits (192.168.1.114) 4.00ms [2024-10-28 21:22:56,231] 404 GET /kobo/a416cc0ec53d408a5a64733846b9e5a4/v1/library/sync/v1/products/books/subscriptions (192.168.1.114) 4.00ms [2024-10-28 21:22:56,251] 404 GET /kobo/a416cc0ec53d408a5a64733846b9e5a4/v1/library/sync/v1/deals (192.168.1.114) 5.00ms [2024-10-28 21:22:56,270] 404 POST /kobo/a416cc0ec53d408a5a64733846b9e5a4/v1/library/sync/v1/analytics/gettests (192.168.1.114) 6.01ms [2024-10-28 21:24:11,607] 200 GET /admin/logfile (192.168.1.101) 5.00ms [2024-10-28 21:24:11,632] 304 GET /static/css/libs/bootstrap.min.css (192.168.1.101) 2.00ms [2024-10-28 21:24:11,637] 304 GET /static/css/upload.css (192.168.1.101) 3.70ms [2024-10-28 21:24:11,638] 304 GET /static/css/style.css (192.168.1.101) 4.70ms [2024-10-28 21:24:11,640] 304 GET /static/js/libs/jquery.min.js (192.168.1.101) 6.55ms [2024-10-28 21:24:11,640] 304 GET /static/js/libs/underscore-umd-min.js (192.168.1.101) 5.55ms [2024-10-28 21:24:11,641] 304 GET /static/js/libs/bootstrap.min.js (192.168.1.101) 6.55ms [2024-10-28 21:24:11,643] 304 GET /static/js/libs/intention.min.js (192.168.1.101) 6.16ms [2024-10-28 21:24:11,647] 304 GET /static/js/libs/context.min.js (192.168.1.101) 6.32ms [2024-10-28 21:24:11,647] 304 GET /static/js/libs/plugins.js (192.168.1.101) 7.32ms [2024-10-28 21:24:11,649] 304 GET /static/js/libs/jquery.form.min.js (192.168.1.101) 8.32ms [2024-10-28 21:24:11,649] 304 GET /static/js/uploadprogress.js (192.168.1.101) 6.00ms [2024-10-28 21:24:11,650] 304 GET /static/js/main.js (192.168.1.101) 7.00ms [2024-10-28 21:24:11,651] 304 GET /static/js/logviewer.js (192.168.1.101) 5.00ms [2024-10-28 21:24:11,717] 304 GET /static/favicon.ico (192.168.1.101) 2.00ms [2024-10-28 21:24:11,719] 304 GET /static/css/fonts/glyphicons-halflings-regular.woff2 (192.168.1.101) 3.00ms [2024-10-28 21:24:11,719] 304 GET /static/css/fonts/GrandHotel-Regular.ttf (192.168.1.101) 3.00ms [2024-10-28 21:24:11,748] 200 GET /ajax/log/0?=1730175851707 (192.168.1.101) 11.00ms [2024-10-28 21:24:11,786] 304 GET /static/favicon.ico (192.168.1.101) 1.00ms

I have been trying to view the kobo log via running

nc ip-address-here 5001 (running in wsl ubuntu) but I haven't been able to get this to work. I expect that this is some user error as I am not familiar with this tool.

I have enabled devmode and have the kobo set to log syncing. Expected behavior

A clear and concise description of what you expected to happen.

Screenshots image image image image image

If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Additional context I am running this all within the same wifi network locally.

jmahlers commented 3 days ago

Also one note, this is the part of the log from the sync attempt: [2024-10-28 21:21:56,109] DEBUG {cps.babel:27} Could not parse locale "": expected only letters, got '' [2024-10-28 21:21:56,137] DEBUG {cps.babel:27} Could not parse locale "": expected only letters, got '' [2024-10-28 21:22:56,174] DEBUG {cps.babel:27} Could not parse locale "": expected only letters, got '' [2024-10-28 21:22:56,198] DEBUG {cps.babel:27} Could not parse locale "": expected only letters, got '' [2024-10-28 21:22:56,213] DEBUG {cps.babel:27} Could not parse locale "": expected only letters, got '' [2024-10-28 21:22:56,228] DEBUG {cps.babel:27} Could not parse locale "": expected only letters, got '' [2024-10-28 21:22:56,248] DEBUG {cps.babel:27} Could not parse locale "": expected only letters, got '' [2024-10-28 21:22:56,267] DEBUG {cps.babel:27} Could not parse locale "": expected only letters, got ''

When I do so from the browser this is what I see: [2024-10-28 21:27:32,210] DEBUG {cps.updater:331} Stable version: {'version': '0.6.23'} [2024-10-28 21:27:43,005] DEBUG {cps.updater:331} Stable version: {'version': '0.6.23'} [2024-10-28 21:30:03,055] DEBUG {cps.ub:84} Login and store session : 8f5452c2e1b5e4bce6f7279ceb0ec336f030e9b4a28d94e82e4e2885c193a52554aed387155f50da4d6153d6db5dae9ca266e5e5f764f67c633c93f126a6bd39 [2024-10-28 21:30:03,056] INFO {cps.kobo:145} Kobo library sync request received [2024-10-28 21:30:03,057] DEBUG {cps.kobo:146} SyncToken: 0001-01-01 00:00:00,0001-01-01 00:00:00,0001-01-01 00:00:00,0001-01-01 00:00:00,0001-01-01 00:00:00, [2024-10-28 21:30:03,057] DEBUG {cps.kobo:147} Download link format http://192.168.1.101:8083/kobo/a416cc0ec53d408a5a64733846b9e5a4/download/[bookid]/[bookformat] [2024-10-28 21:30:03,057] DEBUG {cps.kobo:149} Kobo: Received unproxied request, changed request port to external server port [2024-10-28 21:30:03,259] WARN {py.warnings:110} E:\venv_calibre\Lib\site-packages\calibreweb\cps\db.py:585: SAWarning: This declarative base already contains a class with the same class name and module name as cps.db.custom_column_1, and will be replaced in the string-lookup table. cc_classes[row.id] = type(str('customcolumn' + str(row.id)), (Base,), ccdict) [2024-10-28 21:30:03,388] DEBUG {cps.kobo:206} Books to Sync: 1 [2024-10-28 21:30:03,391] DEBUG {cps.services.worker:91} Add Task for user: admin - Convert Book 260 [2024-10-28 21:30:03,393] INFO {cps.tasks.convert:161} Book id 260 - target format of .kepub does not exist. Moving forward with convert. [2024-10-28 21:30:03,828] ERROR {cps.embed_helper:47} Metadata embedder encountered an error: Another calibre program such as calibre-server.exe or the main calibre program is running. Having multiple programs that can make changes to a calibre library running at the same time is a bad idea. calibredb can connect directly to a running calibre Content server, to make changes through it, instead. See the documentation of the --with-library option for details. [2024-10-28 21:30:03,829] INFO {cps.tasks.convert:208} ebook converter failed with error while converting book [2024-10-28 21:30:03,830] ERROR {cps.tasks.convert:212} Kepubify-converter failed: [WinError 2] The system cannot find the file specified [2024-10-28 21:30:03,913] DEBUG {cps.kobo:260} Remaining books to Sync: 0

It seems like the browser is successfully triggering the sync process but that the Kobo is not triggering the same thing.

OzzieIsaacs commented 3 days ago

Kepubify-converter failed: [WinError 2] The system cannot find the file specified calibre-Web tries to convert the books to kepubs this fails, this could be a problem

2024-10-28 21:30:03,913] DEBUG {cps.kobo:260} Remaining books to Sync: 0

everything is synced, try to force a full sync in the admin settings

OzzieIsaacs commented 3 days ago

[2024-10-28 21:30:03,828] ERROR {cps.embed_helper:47} Metadata embedder encountered an error: Another calibre program such as calibre-server.exe or the main calibre program is running. Having multiple programs that can make changes to a calibre library running at the same time is a bad idea. calibredb can connect directly to a running calibre Content server, to make changes through it, instead. See the documentation of the --with-library option for details.

Calibre or the calibre server is running in parallel and accessing the library: don‘t do that, causes trouble

OzzieIsaacs commented 3 days ago

2024-10-28 21:22:56,267] DEBUG {cps.babel:27} Could not parse locale "": expected only letters, got '' this message is correct, kobo isn‘t sending a correct language string during sync, calibre-web is detecting it and ‚working around‘ it