swift-toolkit
swift-toolkit copied to clipboard
TestApp fails using TTS
Bug Report
Opening a book that has a graphic cover and starting the vocal reproduction the TestApp (branch main) crashes.
What happened?
The Locator crash with fatal error "Highlight is nil"
public subscript<R>(range: R) -> Text where R : RangeExpression, R.Bound == String.Index {
guard let highlight = highlight else {
preconditionFailure("highlight is nil") <----- !!!
}
Expected behavior
Jump to the first page of text
How to reproduce?
- Download the book "Moby-Dick" from OPDS 2.0 Test Catalog
- Open it
- Start the voice playback.
Environment
- Readium version: 2.4.0
Development environment
macOS: 13.2.1 platform: x86_64 carthage: 0.38.0 Xcode 14.2 Build version 14C18
Testing device
- iOS version: 15.x
- Model (e.g. iPhone 11 Pro Max): iPhone 7
- Is it an emulator? No
Additional context
I could reproduce the issue from main, but this seems to be fixed in develop already. Would you mind confirming?
I downloaded a totally new environment from develop but on this branch I can't build.
I make the TestApp project with make spm and I got ‘No such module ‘ReadiumAdapterGCDWebServer’ on CBZViewController.swift at line 17.
make spm uses the last released version. Building from develop, you should use make dev instead.
However, I think this should work too: make spm commit=develop.
Thank you!! Ok I can confirm that on develop the problem does not occur.
Will you release a fix for Readium 2.4.0 or we should wait and then move to Readium 2.5.0 ?
You will need to wait for 2.5.0, which should be released in about 2 weeks.
I downloaded a totally new environment from
developbut on this branch I can't build. I make the TestApp project withmake spmand I got ‘No such module ‘ReadiumAdapterGCDWebServer’ on CBZViewController.swift at line 17.
When I try to build project with CocaPods I have a similar problem ‘No such module ‘ReadiumAdapterGCDWebServer’ after migrating to version 2.7.0 from version 2.4.0 even with this pods is Podfile:
pod 'ReadiumAdapterGCDWebServer', podspec: 'https://raw.githubusercontent.com/readium/swift-toolkit/2.7.0/Support/CocoaPods/ReadiumAdapterGCDWebServer.podspec'
pod 'ReadiumGCDWebServer', podspec: 'https://raw.githubusercontent.com/readium/GCDWebServer/master/GCDWebServer.podspec'
Is there a workaround?
Do you have any error when doing pod install? Do you see the ReadiumAdapterGCDWebServer library in the Pods of the project? Are you able to build the ReadiumAdapterGCDWebServer scheme?
Do you have any error when doing
pod install? Do you see theReadiumAdapterGCDWebServerlibrary in the Pods of the project? Are you able to build theReadiumAdapterGCDWebServerscheme?
No pod install runs without error. Yes I can see ReadiumAdapterGCDWebServer in Pods of the project but I can't navigate to ReadiumAdapterGCDWebServer sources in Xcode (cmd + click on import ReadiumAdapterGCDWebServer). I tried clean and reinstall Pods but without success. I'm able to build project when I comment import ReadiumAdapterGCDWebServer. Do you have any suggestions? Thank you for your help/time/efforts.
Could you share your whole Podfile?
You can try this to see if you can build the ReadiumAdapterGCDWebServer from your Pods.
https://github.com/readium/swift-toolkit/assets/58686775/20751f4e-16e0-4508-88bc-94906d766bb4
I just checked using the Test App and it builds fine with CocoaPods. There must be an issue in your configuration or cache.