Skip to content

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

Closed
@TechWilk

Description

@TechWilk

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)
          }
      }
    }
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions