shermp / Kobo-UNCaGED

UNCaGED, for Kobo devices
GNU Affero General Public License v3.0
95 stars 7 forks source link

Doesn't connect to Calibre #35

Closed pizidavi closed 3 years ago

pizidavi commented 3 years ago

I successfully installed KU v0.5.0 with NickelMenu, and at startup the browser opens, but when I press the button 'Start' the 'Finished' dialog box show up and KU closes. I also tried to enable 'Force Wifi On' in dev mode options. I have Kobo Aura Edition 2, version 4.25.15875 and use Calibre 5.7.2 (but I have tried also with Calibre 4.X)

What could be the problem?

NiLuJe commented 3 years ago

We'll have to poke at the system logs to see what's really happening.

If you have shell access to the device, it's as easy as running logread. (In which case, you'll probably want to do it the other way around, e.g., open a shell, run logread -F, then start KU).

If you don't, c.f., https://www.mobileread.com/forums/showpost.php?p=3955736&postcount=19

(You might have to explicitly enable logging in the dev settings since FW 4.25).

shermp commented 3 years ago

I don't think wifi is the issue. The Kobo web browser forces it to stay connected.

I assume you have enabled the wireless connection in calibre? KU would remind you about that, so I don't think it that far based on the symptoms.

It sounds like KU is crashing/erroring out before it even attempts to search out connect to calibre.

As @NiLuJe said, I'm going to need logs to know where the problem might be.

pizidavi commented 3 years ago

This is the logs: syslog_uncaged.log

@shermp Yes... I have enabled the wireless connection in calibre

shermp commented 3 years ago

This is the logs: syslog_uncaged.log

@shermp Yes... I have enabled the wireless connection in calibre

Thanks for the log. It tells me exactly what's wrong. Problem is a bit of a whoopsie on my end

I recently changed the way the zip file was created, and the new method doesn't include the config directory. I meant to fix that before release, but forgot about it. 😊

(Also, there appears to be something ELSE wrong with the archive in Windows 10 explorer. Sigh...)

shermp commented 3 years ago

@pizidavi can you try the installing the attached KU? It should fix the issue.

pizidavi commented 3 years ago

There's another problem now 😪 It fails to read the json file from Calibre Logs: syslog_uncaged_2.log

NiLuJe commented 3 years ago

That's... interesting. Which calibre version is that, and how old is the relationship between this device and calibre?

@shermp: I just double-checked, and every one of those is a pure int on my H2O.

jq '.[] | select(.rating) | { Title: .title, Rating: .rating }' < /mnt/onboard/metadata.calibre 
shermp commented 3 years ago

Yeah, I thought the rating was always an int as well. It was always a value from 0 to 10, with even numbers being whole stars, and odd numbers half stars.

My only thinking is that Calibre is very old, or something changed in Calibre 5 (I'm still running calibre 4.x, for 'reasons')

pizidavi commented 3 years ago

@NiLuJe I use Calibre v5.7.2, the last version. About "how old is the relationship between my Kobo and Calibre": I think... years? But I also re-installed Calibre some times @shermp Now I tried with Calibre 4 and there was the same problem. PS: none of my ebooks have a rating. I've deteled them.

shermp commented 3 years ago

Ahh Calibre, always with the surprises...

I've updated UNCaGED to allow floats in the rating field.

@pizidavi here's another test zip. Kobo-UNCaGED.zip

shermp commented 3 years ago

Part of the problem is that Go is a statically typed language, whereas Python is not. This can lead to unpleasant surprises, where you're never entirely sure what Python is going to give you.

NiLuJe commented 3 years ago

Yeah, I thought the rating was always an int as well. It was always a value from 0 to 10, with even numbers being whole stars, and odd numbers half stars.

That's been my experience as well, but it is apparently a double in the actual database, so, who knows ;).

My only thinking is that Calibre is very old, or something changed in Calibre 5 (I'm still running calibre 4.x, for 'reasons')

Would those reasons involve the letters R, M and D (in no particular order ;p)? ^^.

NiLuJe commented 3 years ago

@NiLuJe I use Calibre v5.7.2, the last version. About "how old is the relationship between my Kobo and Calibre": I think... years? But I also re-installed Calibre some times @shermp Now I tried with Calibre 4 and there was the same problem. PS: none of my ebooks have a rating. I've deteled them.

That won't necessarily change much. It's been my experience that content in the metadata cache is very sticky, so, this might actually only affect a very few books sent a few years ago, or something ;).

I'd join the fray with an old cache, too, but, err, I, mysteriously (;p) have had to rebuild it from scratch quite a few times while testing stuff ^^.

pizidavi commented 3 years ago

It works now! Thanks a lot

shermp commented 3 years ago

It works now! Thanks a lot

Great to hear.

These fixes have been released as v0.5.1

Would those reasons involve the letters R, M and D (in no particular order ;p)? ^^.

No comment 😉