-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Kobo Sync issue #1470
Comments
I also get an empty body, but syncing works fine. I just can't download anything. |
I think I found an explanation and a workaround, at least in my case. In short, for now, the workaround is to run
Why this is happening? I used WireShark to look at the transactions and one of the JSON returned by calibre-web for the following request (a book): http://calibre.lan/kobo/69e9a753a4f12e53d2f65a28122f53eb/v1/library/85e0af05-bd73-4dbd-b46b-d6d67f201cd1/metadata The response contains a download URL with the port number 8083 which is the default port that Calibre is running on. Note that even though internally in my docker container the app is running on port 8083, from outside, the port is 80. So Kobo was getting a URL that was not accessible: ...
"DownloadUrls":[
{
"Format":"EPUB3",
"Platform":"Generic",
"Size":2685019,
"Url":"http://calibre.lan:80/download/622/epub"
},
{
"Format":"EPUB",
"Platform":"Generic",
"Size":2685019,
"Url":"http://calibre.lan:80/download/622/epub"
}
]
... Changing port to 80 still exposes the port in JSON but at least now the port is accessible. The problematic code is here: Line 277 in 8608ff1
@OzzieIsaacs if you give me a direction on how you want this fixed going forward, I can try my hand at submitting a patch. Looks like #1227 is related. |
@jef I'm not happy with the additional setting: |
Thanks for looking into this @OzzieIsaacs. I just wanted to say that my setup is proxied and using default 443 port (as it's https there's no need to specify a port). |
Thanks @OzzieIsaacs! Didn't realize that self accessed this object! A lot easier approach. |
It‘s working for you? |
Haven't pulled it down yet. I'm on vacation. I can try when back home if no one hasn't yet. |
I'm using the linuxserver docker image, so I'll have to update the image to grab master instead of releases. Once I update that, I can test! |
This is also related for those using the Docker image from LinuxServer linuxserver/docker-calibre-web#90 since we are not pulling from a release, but rather I've got to pull down and build locally to actually test. I'll confirm this when I get back from vacation. I'll keep this issue updated. |
Hey @OzzieIsaacs, that didn't seem to work. I deleted my old sync token and got a new one and put it on my Kobo Forma. I went to go look at the settings after syncing and it still set it to the |
I used my branch as well for testing. It set up the URLs correctly, but it still didn't download. Not sure what the issue is. |
Im not sure if that's relevant to the issue, but whenever i update api_endpoint in Kobo eReader.conf, image_host, image_url_quality_template and image_url_template variables also get updated with incorrect address - it adds port :8083, but calibre-web is behind a reverse proxy and runs on standard https port - 443. |
I merged It also gave me a |
i have just tried using internal ip address, together with http:// and 8083 port, but it still doesnt work - im getting error about my network connection |
Any pointers on this, I am trying to get this to work. I setup sync according to the wiki. I've changed my setup so that it uses port 8086. http://[]en.nl:8086/kobo/308388dbf9ef860057[]/v1/initialization Seems to give the right URLs with the correct port. I am not getting an error, it seems to sync, but it didn't pull my books. calibre-web.log doesn't say a word. Did I miss something? |
Dear friends I have had been searching all the issues regarding Kobo sync, as I particularly bought a Kobo Libra H2O to sync with my wonderful calibre-web library. I've had the same problems as others: No covers, just metadata and cannot download the epub/pdf files (filetypes ARE supported). The issue is not resolved by changing ports or not a biggie; I use a reverse proxy to enter my own calibreweb install and now have got this to work as following: Quick heads up: I just rolled back from latest nightly to stable, see if that helps... Url you might get from pop-up: Now here's the easy solution I've found to get working covers and sync and downloads on my H20 Libra... I've had to remove the "https" protocol and change it to standard http, then add the port as :9696 (or whichever your install uses). api_endpoint=http://urlblala/kobo/1111apihereofcourse11111:PORTHERE Now go into your ./Kobo/Kobo and change the ereader conf file as following: Now here comes the catch: I noticed as soon as I restarted my H2O it changed the image urls and multiple other endpoints to my api url. I had to go back in the file and do a search & replace to make sure those urls did not use the HTTPS protocol and had the correct port appended. Now the magic: DC your device properly and restart, hit the sync button and watch magic happen ! I think my problem arises mostly because I'm using a reverse nginx proxy with SSL protocol, the url my Kobo auto makes is with appended port but OVER HTTPS. This causes a protocol error and thus the e-reader sync will not connect. I truly hope this helps other investigate this issue, for now, thank you all so much for your wonderful work on this amazing project ! 👍 Edit: Appending the calibre-end point underneath my kobo store api endpoint seems to work for downloading, syncing covers and books from calibre-web , but still makes the kobo store non-functional. The config file is edited as soon as the device is disconnected and it removes either one of the api_endpoints to keep only one. Edit: Edit: Truly hope there's a way to still proxy the unknown requests back to the store API as else half of the functionality of the e-reader is gone when using the calibre-web endpoint (for me only?). Edit: Edit:
|
I'm going to try and follow your steps this evening and get back with success or not! Thanks for posting. I find it quite odd that the port would go at the end of the URI... |
In all honesty I don't think it's necessary to have the port behind the URL when using a reverse proxy and it can even bring inconveniences as not all reverse proxies handle that well. You'd basically tell the port twice, as the reverse proxy already goes toward a address:port combination. Adding an extra port behind it can cause issues like I've mentioned above with SSL protocol errors. But that asides , thanks once again for the amazing work on the project to everyone. |
I used this in the past and seemed to fail. Are you hosting calibre-web in a Docker container btw? Or just behind a proxy? |
Not a docker install, nope. I do run it behind a reverse nginx proxy. But as mentioned above I can confirm this also works with a blunt http://IPV4:port/koboapi , as I have tried that. It's important to change the API url to the proper formatted url and save the kobo conf file. Then, disconnect the e-reader and restart it. It will have automatically adjusted the urls in the file corresponding to your endpoint. Now attach the e-reader again and do a find and replace on your links. Make sure you remove the https protocol and make sure all ports/urls are correct. (In api_endooint, image cover, and image format etc). Then do a save, disconnect e-reader and voila ! Hit sync. |
It works like a charm for me with default port 8083. Even synchronised my shelves, as long as there's at least one new book in them. It would be a shame to lose this functionality if you opted for a special shelve to sync in #1276 |
#1516 got merged. I will test tonight to see if this works now. |
Today i have tried it again on version 0.6.9.
When I do: telnet 10.10.1.12 8083
When I do: openssl s_client -connect calibre.<my_domain>:443
Although when I do open https://calibre./kobo/238c0c41c29eb171eb06bbee7867bd1b in my browser I do get a website with a single {} same as when telneting directly to the internal port |
Are you trying to get reach from a domain? Try first with your local network. I've only been able to use my local network and proxying (docker). |
I have changed "Server external port" to 8083, modified api_endpoint to point http://10.10.1.12:8083/kobo/f8cbf3b752f0bd5c1d5e313a1902c45d and restarted Kobo. Unfortunately, the end result is the same, I cannot sync my Kobo nor access the shop |
Looking at the access logs, it seems that the Clara HD makes a GET request to |
@NotWoods This is a normal behavior, there are a lot of other route not implemented, calibre-web returns an empty list in this case, so there shouldn't be a problem (at least not for me and my kobo reader) |
In case it helps others, I was experiencing the same issue as described above using a calibre-web behind a Caddy HTTPS reverse proxy, with a config that includes a subdomain, a specific dir for calbire-web, and using port 443 externally. What solved API access through Caddy over HTTPS was making sure the following was in my caddyfile. Hope this helps others.
|
Another tip for others, for nginx reverse proxy, I needed to increase the buffer size, and Kobo sync works great. So adding the following to a typical proxy configuration should fix Kobo sync issues.
|
another solution for "no downloads" via HAproxy (problem was caused by X-Scheme) over here |
I had the same issue and finally fixed it by adding:
To my Nginx proxy manager custom location config. Then I did a "Force Full Kobo Sync" in calibre-web settings, and next sync on Kobo brought the covers and the actual books. Very happy! Thanks for the great software btw! :) I am using the same 8083 port, and http as the scheme in NPM, using SSL with Clara HD 2. Before adding the custom location part, I could sync my Kobo and would see the names of the books, but the images, and the actual books would not download (Clicking on the Download button would first show Pending and then Downloading, and then it would just go back to Download). I should also add that after adding my api_endpoint to |
Amazing. Thanks for sharing this @amirhomayoun. I'm yet to test it but it looks exactly like a solution I've been looking for. |
For HAProxy I used the following (do not know if it is overcomplete, but it works for me):
|
I use NGINX as proxy (on a synology NAS) with Calibre-web running in docker, and I needed to add these extra headers: X-Forwarded-Proto https (Yes, TWO forward slashes. Using only one broke my site (infinite redirect :-@) |
So the solution proposed above worked for me for a while. Obviously there's an issue with the amount of books ive got in my library (i promise, i paid the official distributor for every single one!), but maybe as a temporary workaround we could have an automatic shelf with books added in last 12 months or something like that? PS. Also now i cannot download any of the synced ebooks, unless i change the Calibre-web settings to only sync shelves and only then ebooks previously marked for download start downloading. |
This worked for me. |
Describe the bug/problem
Hey. I have set up Kobo Sync as per documentation. Whenever im trying to access the shop on the Kobo im getting "Network Error" message. When i copy and paste the link:
https://calibre.XXXXX.XX/kobo/XXXXXXXXXXXXXXXXXXeb06bbee7867bd1b to a normal internet browser, im only getting:
{}
content. Exactly same page appears when i replace my token with random letters. It's probably me doing something wrong (as calibre-web.log doesnt show any errors), but what i have done wrong?
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional context
Add any other context about the problem here. [e.g. access via reverse proxy]
The text was updated successfully, but these errors were encountered: