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

Ugrade webview_flutter to 1.0.7 for better ios error detection #104

Closed
RickVM opened this issue Dec 17, 2020 · 8 comments
Closed

Ugrade webview_flutter to 1.0.7 for better ios error detection #104

RickVM opened this issue Dec 17, 2020 · 8 comments

Comments

@RickVM
Copy link

RickVM commented Dec 17, 2020

As previously mentioned in some tickets I have some buggy behaviour when loading webviews, and thus flutter_echarts in IOS.
It seems to happen more often if there's multiple webviews, the view will be loaded blank. Refreshing helps, it seems like a 'chance' for things to go wrong.

Think its related to limitations in the flutter engine and IOS which are mentioned in this issue
A workaround has been implemented in the webview plugin as of 1.0.7 here

If we upgrade to the new version we should be able to implement the workaround to detect and handle issues for ios with WebView.onWebResourceError

Might be able to work on this issue this or next week, not sure yet if we should autoreload the webview if it was terminated, or let the user handle this with a callback parameter

@entronad
Copy link
Owner

Users of flutter_echarts mainly focus on charting.
They don't care about( or even don't know) the webview plugin under the hood. They just want the chart shown.
So I vote for the autoreload solution.

@RickVM , when implementing the autoreload, please be very careful to avoid an endless loop.

@GithubTeemo
Copy link

I put the initialization method in WidgetsBinding.instance.addPostFrameCallback, it seems to solve this problem, but I feel that there will be jitter when the chart is loaded.

@lironzemingo
Copy link

Users of flutter_echarts mainly focus on charting.
They don't care about( or even don't know) the webview plugin under the hood. They just want the chart shown.
So I vote for the autoreload solution.

@RickVM , when implementing the autoreload, please be very careful to avoid an endless loop.

what is the autoreload solution? We've been having problems with iPhones, not displaying the chart (iPhone 5 and 6)

@hakaari
Copy link

hakaari commented Jan 15, 2021

In my case the problem was with using charts inside IndexedStack. As a temporary workaround, getting rid of IndexedStack helped.

@KoheiKanagu
Copy link

@RickVM
I modified it so that it reloads when onWebResourceError is raised.

flutter_echarts:
  git:
    url: https://github.com/KoheiKanagu/flutter_echarts.git
    ref: feature/onWebResourceError

I'm testing this in my app, but if you want, you can try it to see if it solves the problem.
Note, however, that I have not taken any measures to prevent infinite loops.
We don't know if the infinite loop happens.

I used this as a reference
flutter/flutter#61795 (comment)

@KoheiKanagu
Copy link

#104 (comment)

I'm still having problems with my app.

@pye52
Copy link

pye52 commented Mar 31, 2021

rollback flutter to 1.20.4, everything works fine.
在1.22之后的版本,webview flutter在ios上有很多问题…

@entronad
Copy link
Owner

Please update to v2.1.0 and try setting reloadAfterInit to true.
Details discussed in #124 .

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

7 participants