Skip to content

[video_player] VideoPlayerController::initialize future never resolves nor errors on iOS with the attached video file #166914

@misos1

Description

@misos1

Steps to reproduce

  1. copy the attached video file into assets
  2. run the code sample

Tested also with the latest main branch of packages.

https://github.com/flutter/packages/blob/431dc61cadd586f753c89ee5e9da6bbef6dad964/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation/Sources/video_player_avfoundation/FVPVideoPlayer.m#L385-L387

Is this really a good idea?

Expected results

It should also print flutter: initialized or perhaps end with an unhandled exception.

Actual results

It prints just "flutter: constructed".

Code sample

Code sample
import "package:flutter/material.dart";
import "package:video_player/video_player.dart";

void main() async
{
	WidgetsFlutterBinding.ensureInitialized();
	var vpc = VideoPlayerController.asset("assets/fail.mp4");
	print("constructed");
	await vpc.initialize();
	print("initialized");
}

Video used in the code sample as fail.mp4

Video used in the code sample as fail.mp4
fail.mp4

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.27.2, on macOS 15.3.1 24D70 darwin-x64)
    • Flutter version 3.27.2 on channel stable at /usr/local/Caskroom/flutter/3.22.1/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 68415ad1d9 (3 months ago), 2025-01-13 10:22:03 -0800
    • Engine revision e672b006cb
    • Dart version 3.6.1
    • DevTools version 2.40.2

[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16C5032a
    • CocoaPods version 1.15.2

[✓] Connected device
    • ios            • iOS 15.8.2 19H384

Metadata

Metadata

Labels

Bot is counting down the days until it unassigns the issueP2Important issues not at the top of the work listfound in release: 3.29Found to occur in 3.29found in release: 3.31Found to occur in 3.31has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: video_playerThe Video Player pluginpackageflutter/packages repository. See also p: labels.platform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions