flutter-html-editor icon indicating copy to clipboard operation
flutter-html-editor copied to clipboard

JavaScript execution returned a result of an unsupported type

Open dlpigpen opened this issue 4 years ago • 6 comments

I got this error when loading flutter HTML editor.

[VERBOSE-2:ui_dart_state.cc(177)] Unhandled Exception: PlatformException(evaluateJavaScript_failed, Failed evaluating JavaScript, JavaScript string was: '$(".note-placeholder").html("Your text here...");'
Error Domain=WKErrorDomain Code=5 "JavaScript execution returned a result of an unsupported type" UserInfo={NSLocalizedDescription=JavaScript execution returned a result of an unsupported type}, null)
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:582:7)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:159:18)
<asynchronous suspension>
#2      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:332:12)
#3      MethodChannelWebViewPlatform.evaluateJavascript (package:webview_flutter/src/webview_method_channel.dart:115:21)
#4      WebViewController.evaluateJavascript (package:webview_flutter/webview_flutter.dart:672:39)
#5      HtmlEditorState.setHint (package:html_editor/html_editor.dart:25<…>
[VERBOSE-2:ui_dart_state.cc(177)] Unhandled Exception: PlatformException(evaluateJavaScript_failed, Failed evaluating JavaScript, JavaScript string was: '$(".note-placeholder").html("Your text here...");'
Error Domain=WKErrorDomain Code=5 "JavaScript execution returned a result of an unsupported type" UserInfo={NSLocalizedDescription=JavaScript execution returned a result of an unsupported type}, null)
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:582:7)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:159:18)
<asynchronous suspension>
#2      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:332:12)
#3      MethodChannelWebViewPlatform.evaluateJavascript (package:webview_flutter/src/webview_method_channel.dart:115:21)
#4      WebViewController.evaluateJavascript (package:webview_flutter/webview_flutter.dart:672:39)
#5      HtmlEditorState.setHint (package:html_editor/html_editor.dart:25<…>

dlpigpen avatar Dec 06 '20 15:12 dlpigpen

i have the same error.

teknofreek avatar Dec 15 '20 22:12 teknofreek

+1 with
html_editor: ^1.0.1

AndrewPiterov avatar Dec 22 '20 22:12 AndrewPiterov

same error

M1123581E avatar Jan 03 '21 13:01 M1123581E

Same

Husniddin-dev avatar Feb 08 '21 10:02 Husniddin-dev

Same

miguelpruivo avatar Feb 08 '21 16:02 miguelpruivo

I forked this library and have made some pretty massive changes to it, you can find it here. I've fixed this issue (and many others) in that library.

I would have preferred to create PRs but it seems this library is lacking maintenance so I took it upon myself.

tneotia avatar Feb 20 '21 04:02 tneotia