Skip to content
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

Unable to send to kindle #108

Closed
jbouzekri opened this issue Feb 21, 2024 · 4 comments
Closed

Unable to send to kindle #108

jbouzekri opened this issue Feb 21, 2024 · 4 comments
Labels
good first issue Good for newcomers

Comments

@jbouzekri
Copy link

I have an error when using the "send to kindle" functionnality with the epub version. Kindle does not provide the detail of the error. However, after processing the epub in an epub validator, it reports the following issues :

Validating using EPUB version 3.2 rules.
ERROR(RSC-012): epub/EPUB/text/ch001.xhtml(104,29): Fragment identifier is not defined.
ERROR(RSC-012): epub/EPUB/text/ch001.xhtml(118,59): Fragment identifier is not defined.
ERROR(RSC-012): epub/EPUB/text/ch001.xhtml(248,25): Fragment identifier is not defined.
ERROR(RSC-012): epub/EPUB/text/ch001.xhtml(319,26): Fragment identifier is not defined.
ERROR(RSC-012): epub/EPUB/text/ch001.xhtml(322,53): Fragment identifier is not defined.
ERROR(RSC-012): epub/EPUB/text/ch001.xhtml(325,45): Fragment identifier is not defined.
ERROR(RSC-012): epub/EPUB/text/ch001.xhtml(330,52): Fragment identifier is not defined.
Check finished with errors
Messages: 0 fatals / 7 errors / 0 warnings / 0 infos
EPUBCheck completed

After extracting the epub, indeed, in the file epub/EPUB/text/ch001.xhtml, you have a few links with fragment identifier which do not exist in the ch001.xhtml file.

For example : #typescript-configuration-file-tsconfigjson

<li><a href="ch001.xhtml#configuration">Configuration</a></li>
<li><a href="#typescript-configuration-file-tsconfigjson">TypeScript Configuration File ​​tsconfig.json</a>
<ul>
<li><a href="ch001.xhtml#target">target</a></li>

I think you used the README.md file to generate the epub. However between pandoc and Github, they don't process anchor the same way. So for example, the heading Get & Set in Github is generated as get--set but pandoc generates get-set. You have other cases with special chars like . too.

Note that there is no carriage return before the ## Introduction heading too so it is not process correctly by pandoc.

However I am not sure if all this is the cause of the error on kindle side.

@gibbok
Copy link
Owner

gibbok commented Feb 23, 2024

@jbouzekri Hi, thanks for reporting. Yes, I can confirm issues with the validation, but unfortunately, I do not have a Kindle to verify.

@gibbok gibbok added the good first issue Good for newcomers label Feb 23, 2024
@gibbok
Copy link
Owner

gibbok commented May 28, 2024

@jbouzekri Hi, this PR #111 should fix the issue; the EPUBs are now valid. If the issue persists, please let me know.
Thanks again!

@gibbok gibbok closed this as completed May 28, 2024
@jbouzekri
Copy link
Author

Sadly, the now valid epub is still rejected by the "send to kindle" function without any feedback on the reason of the error. Thank you very much for taking the time to fix these validation issues.

@gibbok
Copy link
Owner

gibbok commented May 29, 2024

Thanks for your message.
Do you face this problem inside your Amazon account?
If yes, please have a look into the network requests in dev tools of your browser, maybe there you can find the exact error details.

I was wondering if using a developer tools for kindle like an emulator would be possible to have more details of the error and reproduce it.
I found this resource
https://kdp.amazon.com/en_US/help/topic/G200735480

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants