Skip to content

Crash on iOS - AVPlayerViewController is not defined #234

Open
@3rror404

Description

I'm experiencing a issue on iOS 16 & 17 (not tested older versions). Navigating to any page that contains a VideoPlayer element causes the app to crash.

It only happens on real devices. The simulator works fine.

  ***** Fatal JavaScript exception - application has been terminated. *****
  NativeScript encountered a fatal error:
  Uncaught Error: Building UI from XML. @video-page.xml:17:9
   > Module 'nativescript-videoplayer' not found for element 'nativescript-videoplayer:Video'.
     > AVPlayerViewController is not defined
   at
        (file: app/webpack:/barebones/node_modules/@nativescript/core/ui/builder/xml2ui.js:54:0)
        at (file: app/webpack:/barebones/node_modules/@nativescript/core/ui/builder/xml2ui.js:32:0)
        at (file: app/webpack:/barebones/node_modules/@nativescript/core/xml/index.js:411:0)
        at EasySAXParser.parse(file: app/webpack:/barebones/node_modules/@nativescript/core/js-libs/easysax/easysax.js:751:0)
        at parse(file: app/webpack:/barebones/node_modules/@nativescript/core/xml/index.js:454:0)
        at parse(file: app/webpack:/barebones/node_modules/@nativescript/core/ui/builder/xml2ui.js:41:0)
        at parseInternal(file: app/webpack:/barebones/node_modules/@nativescript/core/ui/builder/index.js:194:0)
        at loadInternal(file: app/webpack:/barebones/node_modules/@nativescript/core/ui/builder/index.js:106:0)
        at createViewFromEntry(file: app/webpack:/barebones/node_modules/@nativescript/core/ui/builder/index.js:37:0)
        at navigate(file: app/webpack:/barebones/node_modules/@nativescript/core/ui/frame/frame-common.js:180:28)
        at viewModel.onTap(file: app/webpack:/barebones/app/main-view-model.js:20:9)
        at _handleEvent(file: app/webpack:/barebones/node_modules/@nativescript/core/data/observable/index.js:303:0)
        at notify(file: app/webpack:/barebones/node_modules/@nativescript/core/data/observable/index.js:287:0)
        at _emit(file: app/webpack:/barebones/node_modules/@nativescript/core/data/observable/index.js:346:0)
        at TapHandlerImpl.tap(file: app/webpack:/barebones/node_modules/@nativescript/core/ui/button/index.ios.js:277:0)

I've created a basic sample app in case of some plugin conflict, but it also crashes.

{
  "name": "barebones",
  "main": "app/app.js",
  "version": "1.0.0",
  "private": true,
  "dependencies": {
    "@nativescript/core": "~8.6.2",
    "@nativescript/theme": "~3.0.2",
    "nativescript-videoplayer": "^5.0.1"
  },
  "devDependencies": {
    "@nativescript/ios": "8.6.4",
    "@nativescript/webpack": "~5.0.19"
  }
}
✔ Your ANDROID_HOME environment variable is set and points to correct directory.
✔ Your adb from the Android SDK is correctly installed.
✔ The Android SDK is installed.
✔ A compatible Android SDK for compilation is found.
✔ Javac is installed and is configured properly.
✔ The Java Development Kit (JDK) is installed and is configured properly.
✔ Xcode is installed and is configured properly.
✔ xcodeproj is installed and is configured properly.
✔ CocoaPods are installed.
✔ CocoaPods update is not required.
✔ CocoaPods are configured properly.
✔ Your current CocoaPods version is newer than 1.0.0.
✔ Python installed and configured correctly.
✔ Xcode version 15.3.0 satisfies minimum required version 10.
✔ Getting NativeScript components versions information...
✔ Component nativescript has 8.8.0 version and is up to date.
⚠ Update available for component @nativescript/core. Your current version is 8.6.2 and the latest available version is 8.8.0.
⚠ Update available for component @nativescript/ios. Your current version is 8.6.4 and the latest available version is 8.8.1.
✖ Component @nativescript/android is not installed.

I'm stuck on older versions of @nativescript/core and @nativescript/ios due to another issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      Participants

      @3rror404

      Issue actions

        Crash on iOS - AVPlayerViewController is not defined · Issue #234 · nstudio/nativescript-videoplayer