xrb21 / flutter-html-editor

MIT License
82 stars 64 forks source link

JavaScript execution returned a result of an unsupported type #32

Open dlpigpen opened 3 years ago

dlpigpen commented 3 years ago

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<…>
teknofreek commented 3 years ago

i have the same error.

AndrewPiterov commented 3 years ago

+1 with
html_editor: ^1.0.1

M1123581E commented 3 years ago

same error

Husniddin-dev commented 3 years ago

Same

miguelpruivo commented 3 years ago

Same

tneotia commented 3 years ago

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.