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

[webview_flutter_tizen] crash when run on real TV device #647

Closed
Stupidman22 opened this issue Dec 28, 2023 · 34 comments
Closed

[webview_flutter_tizen] crash when run on real TV device #647

Stupidman22 opened this issue Dec 28, 2023 · 34 comments

Comments

@Stupidman22
Copy link

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

@Stupidman22 Stupidman22 changed the title web_view_tizen crash when run on real TV device [webview_flutter_tizen] crash when run on real TV device Dec 28, 2023
@Stupidman22
Copy link
Author

If run in emulator then can not play video in any page... Any one face this issue :(

@JSUYA
Copy link
Member

JSUYA commented Jan 3, 2024

Hi

[E] [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(Invalid operation, The webview instance has not been initialized., null, null)

It's not common case to fail to create an internal WebView instance. Does this happen every time?
We need more information.

If run in emulator then can not play video in any page... Any one face this issue :(

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 (request.url.startsWith('https://www.youtube.com/')) {

If you need to play YouTube on your device, please change the backgroundColor of the example.
https://github.com/flutter-tizen/plugins/blob/master/packages/webview_flutter/README.md#note

@Stupidman22
Copy link
Author

Stupidman22 commented Jan 3, 2024

Hi, With emulator first.

  1. I try to using this emulator:
    image
  2. I already remove blocking youtube request in example in plugins/packages/webview_flutter/example/lib/main.dart
  3. And change background color to transparent as well.
  4. The result is: Everything works except for video content on all sites
    image

@JSUYA
Copy link
Member

JSUYA commented Jan 3, 2024

Hi
webview_flutter_tizen was written based on Tizen's ewk webview.
ewk webview does not support youtube play in the emulator.
Here's a similar case. youtube_player_iframe (researched it before...) is using webview internally and has the same problem.
#517

@Stupidman22
Copy link
Author

Stupidman22 commented Jan 4, 2024

Hi @JSUYA , Now i tried to work with real TV devices:

  1. I'm already connect and install test app with this device
    sdbdevice
  2. My devices capability is:
    Screenshot_2
  3. I tried to run example to my real TV device and the result is crash log and tv with back screen app :
    image
  4. I tried to use the basic example only have webview
    `import 'package:flutter/material.dart';
    import 'package:webview_flutter/webview_flutter.dart';

void main() => runApp(const MaterialApp(home: WebViewExample()));

class WebViewExample extends StatefulWidget {
const WebViewExample({super.key});

@OverRide
State createState() => _WebViewExampleState();
}

class _WebViewExampleState extends State {
final WebViewController _controller = WebViewController();

@OverRide
void initState() {
super.initState();

_controller.loadRequest(Uri.parse('https://flutter.dev'));

}

@OverRide
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.transparent,
body: WebViewWidget(controller: _controller),
);
}
}`

@JSUYA
Copy link
Member

JSUYA commented Jan 4, 2024

HI, Thank you for your detail. I found some suspicious codes. Can you apply this patch and check if crash still occurs?
If the crash still occurs, the added log may be output. Please tell me that together.
#652

@Stupidman22
Copy link
Author

Thank you, Let me try it. I will back soon

@swift-kim
Copy link
Member

@JSUYA The LOG_ERROR (dlog) messages cannot be seen by normal users. You can use printf (for testing purpose) or have to use a method/event channel to log an error message.

@Stupidman22
Copy link
Author

@JSUYA I tried to apply dependency from your branch:
image
but it still remain the same error and no more log show. I think it's the same as @swift-kim commented above.

@Stupidman22
Copy link
Author

I tried to change log to printf and apply at Stupidman22@5fbadbe
Still the same error with no log in console.
image

@JSUYA
Copy link
Member

JSUYA commented Jan 4, 2024

@Stupidman22 Thank you for your check. I will check again. It may take some more time.

@Stupidman22
Copy link
Author

Hope to receive good news from you

@JSUYA
Copy link
Member

JSUYA commented Jan 5, 2024

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.
A web page was worked on my device. I can't reproduce crash case.

$ sdb capability
secure_protocol:enabled
intershell_support:enabled
filesync_support:pushpull
usbproto_support:disabled
sockproto_support:enabled
syncwinsz_support:enabled
sdbd_rootperm:disabled
rootonoff_support:enabled
encryption_support:disabled
zone_support:disabled
multiuser_support:enabled
cpu_arch:armv7
sdk_toolpath:/home/owner/share/tmp/sdk_tools
profile_name:tv
vendor_name:Samsung
can_launch:tv-samsung
device_name:Tizen
platform_version:6.0
product_version:4.0
sdbd_version:2.2.31
sdbd_plugin_version:3.8.4_TV_DBG
sdbd_cap_version:1.0
log_enable:disabled
log_path:/tmp
appcmd_support:disabled
appid2pid_support:enabled
pkgcmd_debugmode:enabled
netcoredbg_support:enabled

The error log you reported is occurs when Tizen web engine instance used in the webview is not created properly.
The parts that do not check the creation of a web engine instance and the creation of a method channel with out check web engine instance must be modified.
(However, this will not make it guarantee work on your device.)

How about using webview_flutter_lwe?
(this webview is a light engine, media play like YouTube is not guaranteed to work.)

@Stupidman22
Copy link
Author

I had tried webview_flutter_lwe before. The web load about 98 or 99% then stop.
image
I will test my code in other device to make sure. I will back soon

@Stupidman22
Copy link
Author

@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 ??

@Stupidman22
Copy link
Author

Stupidman22 commented Jan 8, 2024

@JSUYA New Log update hope it help you find the cause:
webview_instance_ = ewk_view_add(ecore_evas_get(evas));
if (!webview_instance_) {
debug_log_ += "\n Fail to create ewk_view.";
//printf("Failed to create ewk view instance.");
//return;
}

image

@JSUYA
Copy link
Member

JSUYA commented Jan 9, 2024

@Stupidman22

@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 ??

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 nikel(1). (NikeL is one of the boards used in TV.)
Since our team does not have NikeL model TV among the devices available for testing, it cannot be tested at least for now. (I tested on NikeM board TV with tizen6.0.)

webview_flutter is still unstable,so not recommended for use it for production.(https://github.com/flutter-tizen/flutter-tizen/wiki/Limitations#plugins).
At least for now I haven't found what's causing ewk_view_add to fail in your environment.
I'm sorry I couldn't help you

I had tried webview_flutter_lwe before. The web load about 98 or 99% then stop.

But there are still a few strange things.
webview_flutter_lwe not loading is another problem.
According to your comment, webview_flutter_lwe has no problem creating webview.
I wonder if the problem also occurs on simple sites like google.com (or other simple sites).
(Are the privilege settings in tizen-manifest.xml correct? (<privilege>http://tizen.org/privilege/internet</privilege>))
Or, I'm curious if the internet browser built into your TV also works.
Or does video_player work? the stream contents of this player also work?
(I think there may be a memory problem or a problem with the network environment.)

@Stupidman22
Copy link
Author

Thank you so much for your help.

(Are the privilege settings in tizen-manifest.xml correct? (http://tizen.org/privilege/internet))

The manifest is correct. I have read the instructions very carefully

Or, I'm curious if the internet browser built into your TV also works.

My samsung internet in some test TVs work like a charm. Still can see video, for example in youtube.com
with webview_flutter_lwe i will try to see this code of lib and try to figure out why my webview can not create.

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.
Have a nice day bro

@JSUYA
Copy link
Member

JSUYA commented Jan 12, 2024

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
When I tested, the webview was created normally. Maybe this call will be necessary after tizen 5.5.

@Stupidman22
Copy link
Author

@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.
Have a nice weekend bro 👯

@Stupidman22
Copy link
Author

Stupidman22 commented Jan 15, 2024

Good day @JSUYA
I'm back to work and test this problem.
Unfortunately it is still buggy and not working. I tried adding your changes at this link:
#655
As my log show. ewk_view still can not create.

@JSUYA
Copy link
Member

JSUYA commented Jan 15, 2024

@Stupidman22
oh... I can't reproduce the problem anymore....

um.. could you share log with below code?
I checked that ewk_view_init() will fail if ewk_set_version_policy(1) is not set.
ewk_view_init() is a function that mainly calls *_init() API of EFL libraries.
If this fails, perhaps in another application will fail too.
But since you said webview_flutter_lwe works, init() may not problem.

+) and could you resetting TV device or clean-build? (power off/on , uninstall app from tv and flutter-tizen clean)

--- 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
ewk_init count 1

$ flutter-tizen run --release
...
Launching tizen/flutter/generated_main.dart on Tizen 0 in release mode...
The 160_140_tv profile is used for signing.
Building a Tizen application in release mode...                    11.2s
✓ Built build/tizen/tpk/org.tizen.webview_flutter_tizen_example-1.0.0.tpk (8.8MB).
Installing build/tizen/tpk/org.tizen.webview_flutter_tizen_example-1.0.0.tpk...         6.3s

Flutter run key commands.
h List all available interactive commands.
c Clear the screen
q Quit (terminate the application on the device).
[I] [EGL_DBG]: eglGetDisplay:2119, Winsys [tizen] path
[I] [EGL_DBG]: eglInitialize:2263, [Samsung][libmali.so][rel]: Rev: v1.r23p0-01rel0.530d34f90b87718efe898cd899e2bad3, Winsys: tizen + fbdev, nikem(1), nikel(0), internal AFBC disable
[I] ave_ppi_init start
[I] [EGL_DBG]: eglGetDisplay:2119, Winsys [tizen] path
[I] [EGL_DBG]: eglInitialize:2263, [Samsung][libmali.so][rel]: Rev: v1.r23p0-01rel0.530d34f90b87718efe898cd899e2bad3, Winsys: tizen + fbdev, nikem(1), nikel(0), internal AFBC disable
[I] [EGL_DBG]: eglGetDisplay:2119, Winsys [tizen] path
[EGL_DBG]: eglInitialize:2263, [Samsung][libmali.so][rel]: Rev: v1.r23p0-01rel0.530d34f90b87718efe898cd899e2bad3, Winsys: tizen + fbdev, nikem(1), nikel(0), internal AFBC disable
[E] Error: Only one of Success, Error, or NotImplemented can be called,
[E]  and it can be called exactly once. Ignoring duplicate result.
[E]
[E] Error: Only one of Success, Error, or NotImplemented can be called,
[E]  and it can be called exactly once. Ignoring duplicate result.
[E]
[E] [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(Invalid operation, test log +
ewk_init count 1, null, null)
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:322)
<asynchronous suspension>
[E] Error: Only one of Success, Error, or NotImplemented can be called,
[E]  and it can be called exactly once. Ignoring duplicate result.
[E]
[E] Error: Only one of Success, Error, or NotImplemented can be called,
[E]  and it can be called exactly once. Ignoring duplicate result.
[E]
[E] [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(Invalid operation, test log +
ewk_init count 1, null, null)
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:322)
<asynchronous suspension>
[E] [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(Invalid operation, test log +
ewk_init count 1, null, null)
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:322)
<asynchronous suspension>
[E] [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(Invalid operation, test log +
ewk_init count 1, null, null)
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:322)
<asynchronous suspension>
[E] [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(Invalid operation, test log +
ewk_init count 1, null, null)
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:322)
<asynchronous suspension>
[I] flutter: WebView is loading (progress : 10%)
[E] Error: Only one of Success, Error, or NotImplemented can be called,
[E]  and it can be called exactly once. Ignoring duplicate result.
[E]
[I] flutter: allowing navigation to https://flutter.dev/
[I] flutter: url change to https://flutter.dev/
[I] flutter: Page started loading: https://flutter.dev/
[I] flutter: WebView is loading (progress : 22%)
[I] flutter: WebView is loading (progress : 70%)
[I] flutter: WebView is loading (progress : 80%)
[I] flutter: allowing navigation to https://www.google.com/recaptcha/api2/anchor?ar=1&k=6LdG504kAAAAAPZGIhZd_--CkTASNKaW64oMriCL&co=aHR0cHM6Ly9mbHV0dGVyLmRldjo0NDM.&hl=en&v=Ya-Cd6PbRI5ktAHEhm9JuKEu&size=normal&cb=btcvj0156hjh
[I] flutter: allowing navigation to https://www.google.com/recaptcha/api2/anchor?ar=1&k=6LdG504kAAAAAPZGIhZd_--CkTASNKaW64oMriCL&co=aHR0cHM6Ly9mbHV0dGVyLmRldjo0NDM.&hl=en&v=Ya-Cd6PbRI5ktAHEhm9JuKEu&size=normal&cb=btcvj0156hjh
[I] flutter: allowing navigation to about:blank
[I] flutter: Page finished loading: https://flutter.dev/
flutter: WebView is loading (progress : 100%)
[I] flutter: WebView is loading (progress : 100%)
[I] flutter: allowing navigation to about:blank
[I] flutter: allowing navigation to https://www.google.com/recaptcha/api2/bframe?hl=en&v=Ya-Cd6PbRI5ktAHEhm9JuKEu&k=6LdG504kAAAAAPZGIhZd_--CkTASNKaW64oMriCL
[I] flutter: allowing navigation to https://www.google.com/recaptcha/api2/bframe?hl=en&v=Ya-Cd6PbRI5ktAHEhm9JuKEu&k=6LdG504kAAAAAPZGIhZd_--CkTASNKaW64oMriCL

Logs that call policy(0) function -> ewk_init() is fail
ewk_init count 0,

$ flutter-tizen run --release
...
Launching tizen/flutter/generated_main.dart on Tizen 0 in release mode...
The 160_140_tv profile is used for signing.
Building a Tizen application in release mode...                    11.3s
✓ Built build/tizen/tpk/org.tizen.webview_flutter_tizen_example-1.0.0.tpk (8.8MB).
Installing build/tizen/tpk/org.tizen.webview_flutter_tizen_example-1.0.0.tpk...         7.4s

Flutter run key commands.
h List all available interactive commands.
c Clear the screen
q Quit (terminate the application on the device).
[I] [EGL_DBG]: eglGetDisplay:2119, Winsys [tizen] path
[I] [EGL_DBG]: eglInitialize:2263, [Samsung][libmali.so][rel]: Rev: v1.r23p0-01rel0.530d34f90b87718efe898cd899e2bad3, Winsys: tizen + fbdev, nikem(1), nikel(0), internal AFBC disable
[I] [EGL_DBG]: eglGetDisplay:2119, Winsys [tizen] path
[I] [EGL_DBG]: eglInitialize:2263, [Samsung][libmali.so][rel]: Rev: v1.r23p0-01rel0.530d34f90b87718efe898cd899e2bad3, Winsys: tizen + fbdev, nikem(1), nikel(0), internal AFBC disable
[E] [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(Invalid operation, test log +
ewk_init count 0, null, null)
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:322)
<asynchronous suspension>
[E] Error: Only one of Success, Error, or NotImplemented can be called, and it can be called exactly once. Ignoring duplicate result.
[E]
[E] [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(Invalid operation, test log +
ewk_init count 0, null, null)
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:322)
<asynchronous suspension>
[E] Error: Only one of Success, Error, or NotImplemented can be called, and it can be called exactly once. Ignoring duplicate result.
[E] [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(Invalid operation, test log +
ewk_init count 0, null, null)
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:322)
<asynchronous suspension>

@Stupidman22
Copy link
Author

Let me try it and back soon

@Stupidman22
Copy link
Author

@JSUYA
After add log. I see the ewk_init count = 0 althought i try to set EwkInternalApiBinding::GetInstance().main.SetVersionPolicy(0); or EwkInternalApiBinding::GetInstance().main.SetVersionPolicy(1);

image

@JSUYA
Copy link
Member

JSUYA commented Jan 16, 2024

Hi @xuelian-bai
Do you have a device that can reproduce this problem? (Product TV + Tizen 6.0 required)

@Stupidman22
Based on your comment, it looks like you have two TVs.

  1. UA65AU7002KXXV + Novatek TV + Tizen 6.0
    • (The webview_flutter_lwe works on this TV.)
  2. UA65AU800KXXV + Samsung TV + Tizen (<- Can you tell me sdb capability result? Is it same tizen 6.0?)
    • Is the problem still the same on this TV?

@Stupidman22
Copy link
Author

Hi @JSUYA

UA65AU800KXXV + Samsung TV + Tizen (<- Can you tell me sdb capability result? Is it same tizen 6.0?)

the same tizen 6.0 in this device. Thank you

@JSUYA
Copy link
Member

JSUYA commented Jan 18, 2024

Hi @Stupidman22

From I researched, if the web engine is updated, web engine must load upgraded engine implements.
However, the information of the web engine's update library may differ depending on the product.
Therefore, in some cases, the load may not load properly.

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.
If the device's web engine update is specified in a different path, the above calls will be returned as failure.

Can you run this PR on your device and share the logs?
Even if the issue cannot be resolved, I can forward this to tizen web engine team.

[Normal case]

[E] [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(Invalid operation, test log +
ewk_set_version_policy success
ewk_init count 1
ewk default context is exist
Bind log
 load fail /usr/apps/org.tizen.chromium-efl/lib/libchromium-impl.so
 load fail /opt/usr/globalapps/org.tizen.chromium-efl/lib/libchromium-impl.so
 load fail /opt/usr/globalapps/org.tizen.chromium-efl-upgrade/lib/libchromium-impl.so
 load fail /usr/share/chromium-efl/update/lib/libchromium-impl.so
 load fail /usr/share/chromium-efl//lib/libchromium-impl.so
 load success /usr/share/chromium-efl/upgrade/lib/libchromium-impl.so
, 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)
<asynchronous suspension>

@Stupidman22
Copy link
Author

Hi @JSUYA , Thank you so much for your help. I tried your PR #655. And that is the result:
image
This is full log file:
log-tizen.txt
Hope to hear good new from you soon. Have a good day bro

@JSUYA
Copy link
Member

JSUYA commented Jan 22, 2024

HI @Stupidman22

By default, libchromium-impl.so exists, but it is difficult to check what policy(path) exists on your device.
Because according to your comment, the internet browser (samsung internet app) is working normally.
I need more research on this, but I have no way it right now.

According to the webengine team's opinion, the upgrade path is referenced when ewk_set_version_policy(1) is called.
libchromium-impl.so is automatically installed in the upgrade path when certain applications that require a higher version of Chromium are installed.
Therefore, in your case, we recommend installing Google Meets application.
My guess is that when you install Google Meets, libchromium-impl.so is installed in the upgrade path.
You can check it with #655 PR.
Can you check this?

summary

  1. Install Google meets application on your TV device.
  2. webview example test with [webview_flutter] Add ewk_set_version_policy() call #655 PR.

@Stupidman22
Copy link
Author

Good day, @JSUYA
Seems like a pretty lucky day. Your predictions seem correct.
After I installed the Google Meet application, the webview loaded normally without any errors. It work like a charm
Let me know what you need to analyze this issue further. Thank you for all the hard work you've done

@JSUYA
Copy link
Member

JSUYA commented Jan 22, 2024

@Stupidman22
I'm happy I could help you.
I rebased #655 PR. This patch is merged, there will be no more problems.
If any other problems occur, please let us know again. If there are no more problems, please close this issue. :)

@Stupidman22
Copy link
Author

Stupidman22 commented Jan 23, 2024

@JSUYA
I have one more question althought this issue mark as close.

libchromium-impl.so is automatically installed in the upgrade path when certain applications that require a higher version of Chromium are installed

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?
Thank you

@JSUYA
Copy link
Member

JSUYA commented Jan 25, 2024

Hi @Stupidman22
As far as I know, there is no way to manually install upgraded SO by product TV side.
There is an updater for Chromium internally. However, since the current webview flutter is not linked to the updater, it could to unmatch SO actually used.
We need to additional research to determine whether the updater can be linked(?) when webview flutter is deployed.
(I don't know exactly about the updater either.)
However, since webview flutter is not yet recommended for product TV, this may take more time.
https://github.com/flutter-tizen/flutter-tizen/wiki/Limitations#plugins

@Stupidman22
Copy link
Author

Thank you so much for your help. Hope this lib can be deployed soon. Have a nice day

JSUYA added a commit to JSUYA/plugins that referenced this issue Feb 16, 2024
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
JSUYA added a commit to JSUYA/plugins that referenced this issue Feb 19, 2024
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
JSUYA added a commit to JSUYA/plugins that referenced this issue Feb 19, 2024
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
JSUYA added a commit to JSUYA/plugins that referenced this issue Mar 12, 2024
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
JSUYA added a commit to JSUYA/plugins that referenced this issue Mar 28, 2024
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
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

3 participants