-
Notifications
You must be signed in to change notification settings - Fork 47
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
[webview_flutter_tizen] crash when run on real TV device #647
Comments
If run in emulator then can not play video in any page... Any one face this issue :( |
Hi
It's not common case to fail to create an internal WebView instance. Does this happen every time?
What kind of video are you playing? The example is blocking youtube.com (for testing). Also, YouTube video cannot be played on the emulator.
If you need to play YouTube on your device, please change the |
Hi, With emulator first.
|
Hi |
Hi @JSUYA , Now i tried to work with real TV devices:
void main() => runApp(const MaterialApp(home: WebViewExample())); class WebViewExample extends StatefulWidget { @OverRide class _WebViewExampleState extends State { @OverRide
} @OverRide |
HI, Thank you for your detail. I found some suspicious codes. Can you apply this patch and check if crash still occurs? |
Thank you, Let me try it. I will back soon |
@JSUYA The |
@JSUYA I tried to apply dependency from your branch: |
I tried to change log to printf and apply at Stupidman22@5fbadbe |
@Stupidman22 Thank you for your check. I will check again. It may take some more time. |
Hope to receive good news from you |
Sorry, I set up a tizen 6.0 device and binary and tried again with your modified example code.
The error log you reported is occurs when Tizen web engine instance used in the webview is not created properly. How about using webview_flutter_lwe? |
I had tried webview_flutter_lwe before. The web load about 98 or 99% then stop. |
@JSUYA As i tesed with other device the same log. May i miss something or set up wrong. But with TV can you help me show the Tizen SDK need to install ?? |
@JSUYA New Log update hope it help you find the cause: |
There is nothing that needs to be installed separately on the TV. If you are in developer mode and sdb is connected (flutter-tizen run command works), there is nothing more you need to do on the TV. Anyway, I cannot reproduce this problem. In your log, there is webview_flutter is still unstable,so not recommended for use it for production.(https://github.com/flutter-tizen/flutter-tizen/wiki/Limitations#plugins).
But there are still a few strange things. |
Thank you so much for your help.
The manifest is correct. I have read the instructions very carefully
My samsung internet in some test TVs work like a charm. Still can see video, for example in youtube.com Now can you help me publish the source code sample that you can run (Very simple sample). and a few real TV models that you are testing so I can try to reproduce them. May my project missing any config then i can compare with your project too. |
There is no another sample code. I am testing with the example code of webview_flutter. I reproduced it what ewk_view_add() fails. I mainly used the debug binary for debugging, but I couldn't reproduce it with debug binary. So I tested it using the release binary(according to @xuelian-bai's advice) and checked the crash. I made a patch to fix this issue. #655 |
@JSUYA sound great bro. You make my day. I'm on vacation so I'll be back in the next 2 days. I will try your patch soon. |
@Stupidman22 um.. could you share log with below code? +) and could you resetting TV device or clean-build? (power off/on , uninstall app from tv and --- a/packages/webview_flutter/tizen/src/webview.cc
+++ b/packages/webview_flutter/tizen/src/webview.cc
@@ -288,7 +288,7 @@ void WebView::SetDirection(int direction) {
}
void WebView::InitWebView() {
- EwkInternalApiBinding::GetInstance().main.SetVersionPolicy(1);
+ EwkInternalApiBinding::GetInstance().main.SetVersionPolicy(1); // 1 or 0.
char* chromium_argv[] = {
const_cast<char*>("--disable-pinch"),
@@ -300,7 +300,7 @@ void WebView::InitWebView() {
EwkInternalApiBinding::GetInstance().main.SetArguments(chromium_argc,
chromium_argv);
- ewk_init();
+ log += "ewk_init count " + std::to_string(ewk_init());
Ecore_Evas* evas = ecore_evas_new("wayland_egl", 0, 0, 1, 1, 0);
webview_instance_ = ewk_view_add(ecore_evas_get(evas));
@@ -354,10 +354,10 @@ void WebView::InitWebView() {
void WebView::HandleWebViewMethodCall(const FlMethodCall& method_call,
std::unique_ptr<FlMethodResult> result) {
- if (!webview_instance_) {
- result->Error("Invalid operation",
- "The webview instance has not been initialized.");
- return;
+ // if (!webview_instance_)
+ {
+ result->Error("Invalid operation", "test log + \n" + log);
+ // return;
}
const std::string& method_name = method_call.method_name();
diff --git a/packages/webview_flutter/tizen/src/webview.h b/packages/webview_flutter/tizen/src/webview.h
index 76eaa25b..b8cc2caa 100644
--- a/packages/webview_flutter/tizen/src/webview.h
+++ b/packages/webview_flutter/tizen/src/webview.h
@@ -99,6 +99,8 @@ class WebView : public PlatformView {
std::unique_ptr<flutter::TextureVariant> texture_variant_;
std::mutex mutex_;
std::unique_ptr<BufferPool> tbm_pool_;
+
+ std::string log;
}; Logs that call policy(1) function -> webview works
Logs that call policy(0) function -> ewk_init() is fail
|
Let me try it and back soon |
@JSUYA |
Hi @xuelian-bai @Stupidman22
|
Hi @JSUYA
the same tizen 6.0 in this device. Thank you |
Hi @Stupidman22 From I researched, if the web engine is updated, web engine must load upgraded engine implements. I added a commit for testing in PR #655. In the normal case, policy(1) returns 1 and ewk_init also returns 1, so ewk_default_context will operate normally. Can you run this PR on your device and share the logs? [Normal case]
|
Hi @JSUYA , Thank you so much for your help. I tried your PR #655. And that is the result: |
HI @Stupidman22 By default, libchromium-impl.so exists, but it is difficult to check what policy(path) exists on your device. According to the webengine team's opinion, the upgrade path is referenced when summary
|
Good day, @JSUYA |
@Stupidman22 |
@JSUYA
Can webengine team's of samsung can check the root cause about this problem ? It may cause this library to not function properly on many devices. Is there any way we can update libchromium-impl.so manually? |
Hi @Stupidman22 |
Thank you so much for your help. Hope this lib can be deployed soon. Have a nice day |
There was a case where the ewk engine failed to load on some devices using Tizen 6.0. As a result, ewk init failed and an engine instance could not be created. We have not found an exact cause for this. Calling ewk_set_version_policy(1) will solve the problem, but using UWE(upgrade web engine) in 3rd party application is not recommended. (The webview works may not be guaranteed to normally.) Therefore, add a temporary API and have user application call it. This API may be deleted in the future depending on whether tizen version 6.0 is supported. related issue: flutter-tizen#647
There was a case where the ewk engine failed to load on some devices using Tizen 6.0. As a result, ewk init failed and an engine instance could not be created. We have not found an exact cause for this. Calling ewk_set_version_policy(1) will solve the problem, but using UWE(upgrade web engine) in 3rd party application is not recommended. (The webview works may not be guaranteed to normally.) Therefore, add a temporary API and have user application call it. This API may be deleted in the future depending on whether tizen version 6.0 is supported. related issue: flutter-tizen#647
There was a case where the ewk engine failed to load on some devices using Tizen 6.0. As a result, ewk init failed and an engine instance could not be created. We have not found an exact cause for this. Calling ewk_set_version_policy(1) will solve the problem, but using UWE(upgrade web engine) in 3rd party application is not recommended. (The webview works may not be guaranteed to normally.) Therefore, add a temporary API and have user application call it. This API may be deleted in the future depending on whether tizen version 6.0 is supported. related issue: flutter-tizen#647
There was a case where the ewk engine failed to load on some devices using Tizen 6.0. As a result, ewk init failed and an engine instance could not be created. We have not found an exact cause for this. Calling ewk_set_version_policy(1) will solve the problem, but using UWE(upgrade web engine) in 3rd party application is not recommended. (The webview works may not be guaranteed to normally.) Therefore, add a temporary API and have user application call it. This API may be deleted in the future depending on whether tizen version 6.0 is supported. related issue: flutter-tizen#647
There was a case where the ewk engine failed to load on some devices using Tizen 6.0. As a result, ewk init failed and an engine instance could not be created. We have not found an exact cause for this. Calling ewk_set_version_policy(1) will solve the problem, but using UWE(upgrade web engine) in 3rd party application is not recommended. (The webview works may not be guaranteed to normally.) Therefore, add a temporary API and have user application call it. This API may be deleted in the future depending on whether tizen version 6.0 is supported. related issue: flutter-tizen#647
I'm running the example https://github.com/flutter-tizen/plugins/blob/master/packages/webview_flutter/example/lib/main.dart
in TV emulator then it work normal.
When using the code to run in real samsung TV device (tizen 6.0)
then it crash and can not load webview:
[E] [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(Invalid operation, The webview instance has not been initialized., null, null)
#0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651:7)
#1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:322:18)
Any one help me figure out this issue pls
The text was updated successfully, but these errors were encountered: