pod_player icon indicating copy to clipboard operation
pod_player copied to clipboard

"PodGetXVideoController" not found Error

Open IdemenB opened this issue 1 year ago • 4 comments

Hi,

After pressing the "full-screen button" I receive the following error. I am 80% sure (was not fully tested earlier) that before recent Flutter updates, this was running in the app, but now it breaks. Any ideas?

The following message was thrown while finalizing the widget tree:
"PodGetXVideoController" not found. You need to call "Get.put(PodGetXVideoController())" or "Get.lazyPut(()=>PodGetXVideoController())"

IdemenB avatar Dec 25 '23 17:12 IdemenB

I saw the same error in sentry logs, any ideas ?

r-dev-limited avatar Apr 23 '24 01:04 r-dev-limited

The same error on Android, only in the release build (it is not reproduced in debug). If there are several players on the screen with different URLs. The error occurs immediately, without clicking on the full screen. It seems that the error appeared after upgrading flutter to 3.22.

  void _setController() => mounted
      ? setState(() => controller = PodPlayerController(
            playVideoFrom: PlayVideoFrom.youtube(
              widget.source,
              live: widget.live ||
                  widget.source.contains('live=1') ||
                  widget.source.contains('/live/'),
              videoPlayerOptions: VideoPlayerOptions(
                mixWithOthers: true,
                allowBackgroundPlayback: true,
              ),
            ),
            podPlayerConfig: PodPlayerConfig(autoPlay: isLive),
          )..initialise())
      : null;

  @override
  void initState() {
    _setController();
    super.initState();
  }

xurc avatar May 17 '24 14:05 xurc

@newtaDev

Looks like the problem is here: https://github.com/newtaDev/pod_player/blob/f3ea20e044d50bac6f35ac408edd65276f534540/lib/src/controllers/pod_player_controller.dart#L32

At a minimum, flutter 3.22 in release builds produces a static String "Instance of UniqueKey" with this code. Perhaps this is a flutter bug, not sure.

I changed it locally to uuid, the problem disappeared. Who has the same problem, as a temporary solution, you can indicate the following:

dependency_overrides:
  pod_player:
    git:
      url: https://github.com/xurc/pod_player.git
      ref: fix/getTag-uniqueness

I didn’t do PR because I’m not sure it’s the right solution.

xurc avatar May 18 '24 10:05 xurc

@newtaDev

Looks like the problem is here:

https://github.com/newtaDev/pod_player/blob/f3ea20e044d50bac6f35ac408edd65276f534540/lib/src/controllers/pod_player_controller.dart#L32

At a minimum, flutter 3.22 in release builds produces a static String "Instance of UniqueKey" with this code. Perhaps this is a flutter bug, not sure.

I changed it locally to uuid, the problem disappeared. Who has the same problem, as a temporary solution, you can indicate the following:

dependency_overrides:
  pod_player:
    git:
      url: https://github.com/xurc/pod_player.git
      ref: fix/getTag-uniqueness

I didn’t do PR because I’m not sure it’s the right solution.

Same problem, fixed with the @xurc solution. Thanks 👍🏻

furkankurt avatar Jun 04 '24 00:06 furkankurt