Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlatformException(evaluateJavaScript_failed, Failed evaluating JavaScript, JavaScript string was: 'play()' #67

Closed
phungtp97 opened this issue Sep 9, 2019 · 3 comments

Comments

@phungtp97
Copy link

Hi there,

There is an issue with the youtube_player_flutter on iPhone XS version 12.3.1.

Exception:
Unhandled Exception: PlatformException(evaluateJavaScript_failed, Failed evaluating JavaScript, JavaScript string was: 'play()'
Error Domain=WKErrorDomain Code=4 "A JavaScript exception occurred" UserInfo={WKJavaScriptExceptionLineNumber=1, WKJavaScriptExceptionMessage=ReferenceError: Can't find variable: play, WKJavaScriptExceptionColumnNumber=5, WKJavaScriptExceptionSourceURL=about:blank, NSLocalizedDescription=A JavaScript exception occurred})

pubspec.yaml:
youtube_player_flutter: ^4.1.0

doctor:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.7.8+hotfix.4, on Mac OS X 10.13.6 17G65, locale en-VN)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 10.1)
[✓] iOS tools - develop for iOS devices
[✓] Android Studio (version 3.4)
[✓] Connected device (1 available)

• No issues found!

Btw, love the plugin though :)

@HardikDG
Copy link

I am having the same issue. Do you find any solution for this?

@Duchv2008
Copy link

I have same issue.
flutter: Video mounted YoutubePlayerValue(isReady: false, isEvaluationReady: false, isLoaded: false, duration: 0:00:00.000000, position: 0:00:00.000000, buffered: 0.0, isPlaying: false, volume: 100, playerState: PlayerState.UNKNOWN, playbackRate: PlaybackRate.NORMAL, errorCode: 0)
flutter: Video mounted YoutubePlayerValue(isReady: false, isEvaluationReady: false, isLoaded: false, duration: 0:00:00.000000, position: 0:00:00.000000, buffered: 0.0, isPlaying: false, volume: 100, playerState: PlayerState.UNKNOWN, playbackRate: PlaybackRate.NORMAL, errorCode: 0)
[VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: PlatformException(evaluateJavaScript_failed, Failed evaluating JavaScript, JavaScript string was: 'play()'
Error Domain=WKErrorDomain Code=4 "A JavaScript exception occurred" UserInfo={WKJavaScriptExceptionLineNumber=1, WKJavaScriptExceptionMessage=ReferenceError: Can't find variable: play, WKJavaScriptExceptionColumnNumber=5, WKJavaScriptExceptionSourceURL=about:blank, NSLocalizedDescription=A JavaScript exception occurred})
#0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
#1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:316:33)

#2 MethodChannelWebViewPlatform.evaluateJavascript (package:webview_flutter/src/webview_method_channel.dart:90:21)
#3 WebViewController.evaluateJavascript (package:webview_flutter/webview_flutter.dart:626:39)
#4 YoutubePlayerController._evaluateJS (package:youtube_player_flutter/src/youtube_pl<…>

@sarbagyastha
Copy link
Owner

Check #79

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants