Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre Companion

Notices

Reply
 
Thread Tools Search this Thread
Old 08-20-2017, 03:25 PM   #1
Wryhder
Member
Wryhder began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Oct 2016
Device: Samsung Galaxy Note 10.1 (GT-N8013)
[Android] CC Log

Hello.
Can I have some help understanding what's going on in CC from the attached log?

I had a problem last year with CC. It wouldn't connect to Calibre.
For months now, it's been that way again. I haven't had time to do anything about it until now. I've had to resort to using the Content Server connection.
Today, I connected via USB. I sent a book to my device successfully but it wasn't showing up in CC. That's gonna make it hard to keep track of my books.
I don't want to have to go searching in my books folder for what isn't showing up. I might as well not use CC at all.
So far the wireless connection has proved to be the most ideal for me, but it constantly messes up.
Is the problem from my end? My connection? I mean, I can connect via USB and content server without any headache (other than the books not showing up in CC when it's USB).

I'd appreciate any help, please.
Attached Files
File Type: txt calibre_debug_error.txt (1.3 KB, 27 views)
Wryhder is offline   Reply With Quote
Advert
Old 08-21-2017, 05:39 AM   #2
chaley
CC Android & calibre dev
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 8,494
Karma: 2568044
Join Date: Jan 2010
Location: France
Device: Many android devices
It would help if you provided a complete debug log. If you don't want to post it here, send it to the email address that CC wants to use.

The fragment you provided says that calibre responded to an "Are you there?" query but did not respond to a connection request in the 1/2 second that CC is willing to wait. The reasons main reasons this can happen are:
  1. The anti-virus on the machine running calibre is refusing incoming connections.
  2. The firewall on the calibre machine is blocking port 9090.
  3. Another device is connected to calibre.
  4. calibre is connected to a "folder device".
  5. Another device is connected via cable to the computer running calibre and calibre is continuously attempting to connect to it. Or perhaps the same device that you are attempting to connect using the Wireless Device is already connected by cable.

As for USB connections, CC does not see books that arrive on the device "by magic" (USB, some reader app, etc). It sees only those books that it fetches over one of its connection types.
chaley is offline   Reply With Quote
Old 08-21-2017, 07:29 AM   #3
Wryhder
Member
Wryhder began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Oct 2016
Device: Samsung Galaxy Note 10.1 (GT-N8013)
Quote:
Originally Posted by chaley View Post
It would help if you provided a complete debug log. If you don't want to post it here, send it to the email address that CC wants to use.

The fragment you provided says that calibre responded to an "Are you there?" query but did not respond to a connection request in the 1/2 second that CC is willing to wait. The reasons main reasons this can happen are:
  1. The anti-virus on the machine running calibre is refusing incoming connections.
  2. The firewall on the calibre machine is blocking port 9090.
  3. Another device is connected to calibre.
  4. calibre is connected to a "folder device".
  5. Another device is connected via cable to the computer running calibre and calibre is continuously attempting to connect to it. Or perhaps the same device that you are attempting to connect using the Wireless Device is already connected by cable.
  1. I'm not using an antivirus.
  2. I completely turn off my firewall whenever I want to send via Content Server or Wireless connection so that I don't have to worry about that being an issue.
  3. No other device is connected.
  4. "Folder device" as in MTP connection? If so, no. In fact no other device is connected. I just have a laptop and my tablet. There's my blackberry which I charge via usb, but my system (Ubuntu Linux) doesn't recognize it in anyway. Besides, the problem began way before the blackberry was ever in the picture.
  5. Same as above. I find wireless connections more convenient, so unless I'm moving video or music files to or from my pc, I don't connect via USB.

I just dunno why I can't connect via Wireless. I mean, if CC can connect to the Content Server, there should be no problem, right?
Content server is on 8080, Wireless is 9090. But those are just the default. And changing them fixes nothing.

Quote:
As for USB connections, CC does not see books that arrive on the device "by magic" (USB, some reader app, etc). It sees only those books that it fetches over one of its connection types.
That's why connecting via USB doesn't cut it for me. And I need to keep details synced between Calibre and CC.
The content server works very well, but it's not quite what I need.
I have to remove books from CC, then re-add them, or manually set metadata in Calibre, to keep both synced.

Lest I forget, I've sent the full debug log through CC.

Thanks for the assist.
Wryhder is offline   Reply With Quote
Old 08-21-2017, 07:49 AM   #4
Wryhder
Member
Wryhder began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Oct 2016
Device: Samsung Galaxy Note 10.1 (GT-N8013)
By the way, after the recent update, if I minimize CC, or my screenlight (backlight, I think) goes off, while books are downloading to my device (via Content Server), they stop downloading.
I get this message that the books could not be stored in my device.
And then unless I re-connect, I could be there for hours trying to resend.
That little circly thing (the one that becomes a check mark once the book is on the device, I'm not very good with names) keeps turning and turning like it's sending, but it isn't.
Wryhder is offline   Reply With Quote
Old 08-21-2017, 07:57 AM   #5
chaley
CC Android & calibre dev
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 8,494
Karma: 2568044
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by Wryhder View Post
Lest I forget, I've sent the full debug log through CC.

Thanks for the assist.
I haven't received the debug log. Are you sure you sent it?
chaley is offline   Reply With Quote
Advert
Old 08-21-2017, 08:11 AM   #6
chaley
CC Android & calibre dev
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 8,494
Karma: 2568044
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by Wryhder View Post
I just dunno why I can't connect via Wireless. I mean, if CC can connect to the Content Server, there should be no problem, right?
Not right. There are reasons why one would behave differently from the other, mostly related to the fact that HTTP is a "known" and "blessed" protocol while CC's wireless device is not. Because you are using Linux I am not able to help much more than that.

The folder device isn't an MTP connection. It is a "special" device that uses a folder on the calibre computer as a device. You connect a folder device using the "Connect/Share" toolbar button.

It is worth noting that sometimes calibre attempts to connect to devices that it cannot use. We have seen cases where (for example) a webcam had the same USB id as a device, and calibre continuously tried to connect to it and failed because the webcam has no storage. It could that something like this is happening to you. One way to find out is to run calibre's Debug Device Detection (Preferences / Miscellaneous / Debug device detection) to see what devices calibre is attempting to process. Do this with no "real" devices attached to the computer. If you see calibre "seeing" a device that isn't really a device then you can fix it by disabling that device driver in calibre.

If the above doesn't help -- what seems clear is that the problem is on the calibre side. I suggest that you go through the steps to make a calibre debug log. See our FAQ How do I get help? for instructions. Start calibre in debug mode, let it stabilize, then attempt to connect. After it fails, close calibre and save the displayed debug log. There should be a lot of info there about what calibre saw and what it is doing.

Quote:
Thanks for the assist.
You are welcome.
chaley is offline   Reply With Quote
Old 08-21-2017, 08:17 AM   #7
chaley
CC Android & calibre dev
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 8,494
Karma: 2568044
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by Wryhder View Post
By the way, after the recent update, if I minimize CC, or my screenlight (backlight, I think) goes off, while books are downloading to my device (via Content Server), they stop downloading.
I get this message that the books could not be stored in my device.
And then unless I re-connect, I could be there for hours trying to resend.
That little circly thing (the one that becomes a check mark once the book is on the device, I'm not very good with names) keeps turning and turning like it's sending, but it isn't.
What recent update? Are you talking about an Android update?

What you describe sounds like CC being put to sleep when it is removed from the foreground. You need to find the setting in Android that controls what happens to an app when it is sleeping. You want to be sure that WiFi isn't shut off and that the app isn't stopped.

(BTW: I just received the debug log. If this failure is in there then I might be able to say more.)
chaley is offline   Reply With Quote
Old 08-21-2017, 08:33 AM   #8
chaley
CC Android & calibre dev
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 8,494
Karma: 2568044
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by Wryhder View Post
By the way, after the recent update, if I minimize CC, or my screenlight (backlight, I think) goes off, while books are downloading to my device (via Content Server), they stop downloading.
I get this message that the books could not be stored in my device.
And then unless I re-connect, I could be there for hours trying to resend.
That little circly thing (the one that becomes a check mark once the book is on the device, I'm not very good with names) keeps turning and turning like it's sending, but it isn't.
There are a few instances in the debug log where transferring a book is interrupted. All of these are for huge books. For example, calibre told CC that one book is 222,181,905 bytes long, but the network connection "went away" after transferring 9,565,134 bytes. I am not sure which side killed the connection. My guess is that it is the device shutting down network connections when it wants to go to sleep.

It also appears that CC gets confused when this happens. It attempts to download more books and gets stuck in a "failure loop". I need to look at why that might be. Don't hold your breath; reproducing and debugging network failures is very hard. There are some I have chased for years.
chaley is offline   Reply With Quote
Old 08-21-2017, 08:57 AM   #9
Wryhder
Member
Wryhder began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Oct 2016
Device: Samsung Galaxy Note 10.1 (GT-N8013)
Quote:
The folder device isn't an MTP connection. It is a "special" device that uses a folder on the calibre computer as a device. You connect a folder device using the "Connect/Share" toolbar button.
I've seen this option, but I've certainly never used it.

Quote:
One way to find out is to run calibre's Debug Device Detection (Preferences / Miscellaneous / Debug device detection) to see what devices calibre is attempting to process.
I did this a few days ago. If the logs aren't temporary, I should still have them.

Quote:
After it fails, close calibre and save the displayed debug log.
Oh, I did not save them. Just read through and closed it.
Well, thanks. I know to save it now.

Quote:
What recent update? Are you talking about an Android update?
Yes, an android update. Never had that problem until I updated.
Wryhder is offline   Reply With Quote
Old 08-21-2017, 09:14 AM   #10
chaley
CC Android & calibre dev
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 8,494
Karma: 2568044
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by Wryhder View Post
Yes, an android update. Never had that problem until I updated.
Check if there is an Android setting to keep WiFi on during sleep. I don't have an Android 4.1 device, but in Android 4.3 the setting is in Android Settings / WiFi / Advanced WiFi / Keep WiFi on ... . The Advanced Settings are under the three dots.

There is also (possibly) a setting for WiFi Optimization. I have no idea what it does, but you can try turning it off to see what happens.
chaley is offline   Reply With Quote
Old 08-21-2017, 09:24 AM   #11
Wryhder
Member
Wryhder began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Oct 2016
Device: Samsung Galaxy Note 10.1 (GT-N8013)
Quote:
There are a few instances in the debug log where transferring a book is interrupted. All of these are for huge books. For example, calibre told CC that one book is 222,181,905 bytes long, but the network connection "went away" after transferring 9,565,134 bytes. I am not sure which side killed the connection. My guess is that it is the device shutting down network connections when it wants to go to sleep.
The device, as in my tablet? I don't think so.

The first time this happened, I verified it wasn't a storage space issue. Then tried to reproduce the error.
I wanted to do something else on my device, so I couldn't stay in CC while it downloaded those huge files. But anytime I minimised, download stopped. Like I said, this only started happening after I updated the app.
With smaller-sized files, minimizing did nothing because they were done downloading by the time I minimized. And when the app was again in the foreground, I could go on downloading books. Just as long as no download was interrupted when I left it.

What I'm trying to say is even with me doing something on the device, using a different app (device not asleep in this scenario), the problem still occurs.

Quote:
Don't hold your breath; reproducing and debugging network failures is very hard. There are some I have chased for years.
That's alright. I'm able to work around it.
I just make sure not to leave the app, and set my backlight timeout to 30 minutes.
Wryhder is offline   Reply With Quote
Old 08-21-2017, 09:32 AM   #12
Wryhder
Member
Wryhder began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Oct 2016
Device: Samsung Galaxy Note 10.1 (GT-N8013)
Quote:
Originally Posted by chaley View Post
Check if there is an Android setting to keep WiFi on during sleep. I don't have an Android 4.1 device, but in Android 4.3 the setting is in Android Settings / WiFi / Advanced WiFi / Keep WiFi on ... . The Advanced Settings are under the three dots.

There is also (possibly) a setting for WiFi Optimization. I have no idea what it does, but you can try turning it off to see what happens.
Keep Wi-Fi on during sleep is set to Always.
No setting for optimization.
Wryhder is offline   Reply With Quote
Old 08-21-2017, 09:47 AM   #13
chaley
CC Android & calibre dev
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 8,494
Karma: 2568044
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by Wryhder View Post
What I'm trying to say is even with me doing something on the device, using a different app (device not asleep in this scenario), the problem still occurs.
When you move an Android app from the foreground to the background, that app is considered suitable to be "put to sleep". After all, it can't be doing anything useful when you aren't watching.

My guess: the update is being more aggressive about throttling background apps in order to save battery or to recover memory needed for the foreground app. I don't know if this new behavior can be tuned.

As an example, Android 7 (Nougat) has an option that controls "background processing" on an app-by-app basis, set in the Battery section of settings. It also has a "Battery Saver" option and the option to keep wifi on during sleep. It might be that the update has some of these features, but without a way to turn them off.
Quote:
Originally Posted by Wryhder View Post
Keep Wi-Fi on during sleep is set to Always.
No setting for optimization.
Well, so much for that idea.

Are you running a stock version of Android or some custom version? I ask because I can't find any update information less than 2 years old for your device.
chaley is offline   Reply With Quote
Old 08-21-2017, 09:48 AM   #14
Wryhder
Member
Wryhder began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Oct 2016
Device: Samsung Galaxy Note 10.1 (GT-N8013)
Quote:
It also appears that CC gets confused when this happens. It attempts to download more books and gets stuck in a "failure loop".
I usually have multiple books queued for download. Perhaps CC attempts to download one, then moves to another when that fails. Maybe continues to retry, one book after another, and that causes the failure loop? I read a bit of the log, just don't understand as much as I'd like.
Wryhder is offline   Reply With Quote
Old 08-21-2017, 09:59 AM   #15
Wryhder
Member
Wryhder began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Oct 2016
Device: Samsung Galaxy Note 10.1 (GT-N8013)
Quote:
Originally Posted by chaley View Post
Are you running a stock version of Android or some custom version? I ask because I can't find any update information less than 2 years old for your device.
Stock version. There's no update available for my device.
Wryhder is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Android] Calibre companion debug log waldoB Calibre Companion 4 12-27-2016 09:35 AM
[Android] CC Change Log chaley Calibre Companion 2 01-25-2013 06:27 AM
Log in from Android Tablet Quelch Android Devices 5 01-14-2013 11:29 PM
Is there a log reader TonyP123 Calibre 4 03-09-2012 08:44 PM


All times are GMT -4. The time now is 11:15 AM.


MobileRead.com is a privately owned, operated and funded community.