MrJai / flutter_to_airplay

Flutter plugin that offers two widgets, one to play a video for a given URL or file path using native AVPlayer and second with an option to airplay it on available Apple devices.
MIT License
30 stars 24 forks source link

Unexpectedly found nil while unwrapping an Optional value Lost connection to device. #29

Closed ThakarRajesh closed 3 months ago

ThakarRajesh commented 4 months ago

Once we load video from a local file, then app crashes every-time. We used the most recent version 2.0.4, and when we tried the preview versions, the same problem occurred.

Local asset video file are working fine. But if we download and save video on document directory(getApplicationDocumentsDirectory()) then we load document directory path app crash.

here is log

flutter_to_airplay/FlutterAVPlayer.swift:34: Fatal error: Unexpectedly found nil while unwrapping an Optional value Lost connection to device. Error: Unable to terminate com.xxx on EE5BC5C6-4C03-4748-9B4C-3679047D98D6: ProcessException: Process exited abnormally with exit code -2: An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=3): Simulator device failed to terminate com.xxx. found nothing to terminate Underlying error (domain=NSPOSIXErrorDomain, code=3): The request to terminate "com.xxx" failed. found nothing to terminate found nothing to terminate Command: /usr/bin/arch -arm64e xcrun simctl terminate EE5BC5C6-4C03-4748-9B4C-3679047D98D6 the Dart compiler exited unexpectedly.

ThakarRajesh commented 4 months ago

issue has been fixed Accept pull request https://github.com/MrJai/flutter_to_airplay/pull/30