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

[Bug] ReadiumNavigation Unexpectedly found nil while implicitly unwrapping an Optional value paginationView in EPUBNavigatorViewModel #488

Closed
TechWilk opened this issue Sep 18, 2024 · 7 comments · Fixed by #493
Labels
bug Something isn't working

Comments

@TechWilk
Copy link

Describe the bug

Upon working to upgrade to 3.0.0-alpha.2 for testing or integration I have started to receive the following error when opening a publication.

Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value

image

How to reproduce?

I feel like I haven't initialised something correctly, but as far as I'm aware I have correctly followed the steps from the migration guide.

Readium version

3.0.0-alpha.2

OS version

iOS 16.7.10 and iOS

Testing device

iPhone X (physical device) and iPhone 15 (simulator)

Environment

macOS: 14.3.1
platform: arm64
carthage: 0.40.0
Xcode 15.4
Build version 15F31d

Additional context

In order to continue my testing, if I check the variable first I can get the ebook to load, but this doesn't feel like this is fixing the root cause.

case .loadedResources:
  await withTaskGroup(of: Void.self) { tasks in
    if (paginationView != nil) {
      for (_, view) in paginationView.loadedViews {
          tasks.addTask {
              await (view as? EPUBSpreadView)?.evaluateScript(script)
          }
      }
    }
  }
@TechWilk TechWilk added bug Something isn't working triage Triage needed by maintainers labels Sep 18, 2024
@mickael-menu
Copy link
Member

Thanks for reporting this issue, I'll try to tackle it next week.

@mickael-menu mickael-menu removed the triage Triage needed by maintainers label Oct 9, 2024
@akhsary
Copy link

akhsary commented Oct 11, 2024

By the way, to solve the problem you just need to move navigator.submitPreferences to viewDidAppear, this worked for me

@mickael-menu
Copy link
Member

Could you give more details steps to reproduce the error from the test app? I can't trigger it.

@mickael-menu
Copy link
Member

mickael-menu commented Oct 16, 2024

Okay I could reproduce, I think it happens only with fixed layout publications, correct?

It doesn't trigger on iOS 18 either.

@mickael-menu
Copy link
Member

Could you try again from develop and confirm that it fixes the problem for you? Thanks!

@akhsary
Copy link

akhsary commented Oct 19, 2024

Yes, thanks, fixed, can you tell me when to expect the release with all the latest fixes?

@mickael-menu
Copy link
Member

I'm doing one right now, 3.0.0-alpha.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants