fluttercommunity / fluttercommunity/chewie

iOS crash when file name has empty space.

Open
#718 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
2.1k
Forks
1.1k
Avg merge
6d 8h
Merged PRs (30d)
6

Description

I have attached the code and log of exceptions thrown when I tried to initialize a player with an empty name in iOS. Is there a workaround for this issue if anyone has encountered it before?

```
Future initializePlayer() async {
_videoPlayerController1 =
VideoPlayerController.asset('assets/video 1.mp4');
_videoPlayerController2 =
VideoPlayerController.asset('assets/video 1.mp4');
await Future.wait([
_videoPlayerController1.initialize(),
_videoPlayerController2.initialize()
]);
_createChewieController();
setState(() {});
}
```

**Error**

```
2023-04-06 14:10:49.449450+0900 Runner[392:6004] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL initFileURLWithPath:]: nil string parameter'
*** First throw call stack:
(0x1b5b04e38 0x1aec9f8d8 0x1afe9c730 0x1afe9c4ac 0x1044c939c 0x1044ccee0 0x1044d299c 0x106f21d78 0x106a0dd4c 0x10459853c 0x104599ff0 0x1045aa800 0x1045aa344 0x1b5b956c8 0x1b5b7702c 0x1b5b7beb0 0x1efd71368 0x1b8071668 0x1b80712cc 0x10412dc50 0x1d4474960)
libc++abi: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL initFileURLWithPath:]: nil string parameter'
terminating with uncaught exception of type NSException
```

Thanks in advance

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.