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

display error page if page load fails #121

Merged
merged 9 commits into from Jan 7, 2019

Conversation

Projects
None yet
2 participants
@balcy
Copy link
Collaborator

balcy commented Dec 2, 2018

ErrorSheet: in Browser.qml use the property lastLoadFailed for the binding (was already correct in WebApp.qml)

Browser.qml / WebApp.qml: remove the top margin of the error sheet
AddressBar: new lastLoadSucceeded property: show lock symbol only, if last load was successful for https pages

fixes #118

now the chances are high that it fixes #133 as well

@balcy

This comment has been minimized.

Copy link
Collaborator Author

balcy commented Dec 10, 2018

... please do not yet merge, my test have shown that sometimes the initial page shows the 'network error'

@balcy balcy changed the title display error page if page load fails WIP: display error page if page load fails Dec 23, 2018

@balcy balcy force-pushed the balcy:xenial_-_loadfailed branch from 1c498bb to e78d5fe Dec 23, 2018

balcy added some commits Dec 2, 2018

ErrorSheet: in Browser.qml use the property lastLoadFailed for the bi…
…nding (was already correct in WebApp.qml)

Browser.qml / WebApp.qml: remove the top margin of the error sheet
AddressBar: new lastLoadSucceeded property: show lock symbol only, if last load was successful for https pages
get red of following log entries when morph is closed:
file:///usr/share/morph-browser/WebViewImpl.qml:647: TypeError: Cannot read property of null
file:///usr/share/morph-browser/WebViewImpl.qml:648: TypeError: Cannot read property of null
(instead of parent use the id of the parent)
- WebViewImpl.qml: clear page content after loading has failed (blink…
… error)

- Browser.qml: remove top margin for newTab view
- WebappContainerWebview: delayed initial load (40ms) to prevent sporadic "load failed" pages at start

@balcy balcy force-pushed the balcy:xenial_-_loadfailed branch from e78d5fe to a2cf771 Dec 26, 2018

@balcy balcy changed the title WIP: display error page if page load fails display error page if page load fails Dec 26, 2018

@balcy

This comment has been minimized.

Copy link
Collaborator Author

balcy commented Dec 26, 2018

@UniversalSuperBox ok I think we can try the current state, as always further testing is appreciated !

undo the change for WebappContainerWebview, becauseit stopped RSS fro…
…m loading feeds (probably other issues with webapps as well)
@balcy

This comment has been minimized.

Copy link
Collaborator Author

balcy commented Dec 27, 2018

while #133 is not solved by that, at least it does not make it worse..

initialize the webview with an empty page (about:blank)
navigate to the given initial url for the webapp after the first load (of the blank page) was successful.
the goal is a more synced startup of the initial page
@UniversalSuperBox

This comment has been minimized.

Copy link
Member

UniversalSuperBox commented Dec 29, 2018

I've found an issue with the display of this page, or lack thereof, when the user does something strange...

If I do the following, I get the incorrect error page shown before:

  1. Navigate to a page which causes a page error, such as http://asdf.fdsa.asdf
  2. Navigate to a correctly working page, such as ddg.gg
  3. Navigate to another working page, such as ubports.com
  4. Press the back button twice in quick succession

This only occurs if the problem page is the first page in a back/forward history, not if it's in the middle of several working pages.

@balcy

This comment has been minimized.

Copy link
Collaborator Author

balcy commented Dec 29, 2018

Since I'm without computer these days, I suggest to leave it out for now. (or even better s.o. else finds the solution :) )
If I switch back and forth between the not existing page and ubports.com, I get the problem too (no error notice) sporadically.
At least I know now that ddg.gg does exist ;)

@balcy

This comment has been minimized.

Copy link
Collaborator Author

balcy commented Dec 30, 2018

what i still not get is why the error pages provided by QtWebEngine / chromium look so weird (2 small rectangles and 1 bigger rectangle / button with a download symbol)
If you save the source code of them, it looks like an email sent by "Blink".
If they were proper error pages, we would not need our ErrorSheet here.
there is even a property to turn the error pages off in WebEngineSettings, but then the browser does not navigate to that page at all. (http://doc.qt.io/qt-5/qml-qtwebengine-webenginesettings.html#errorPageEnabled-prop) Maybe we than can use a dialog instead.
Will look at it 2019 i guess, suggestions welcome :)

Web/MorphWebView.qml: update lastLoadRequestStatus only, if the load …
…request does match the current url of the webview (some requests arrive after already navigated away)

WebViewImpl.qml: ignore load requests not matching the current url (see above)
WebappContainerWebview.qml: do not save initial "about:blank" in the browser history (set initial url via window.location)
Browser.qml / NavigationBar.qml / Chrome.qml / Webapp.qml: if the webview is still loading at the "goBack" and "goForward" action, stop it before navigating

@balcy balcy requested review from UniversalSuperBox and removed request for UniversalSuperBox Jan 6, 2019

@balcy

This comment has been minimized.

Copy link
Collaborator Author

balcy commented Jan 6, 2019

does the problem still exist with the latest commit ? (I could no longer reproduce it)

@UniversalSuperBox

This comment has been minimized.

Copy link
Member

UniversalSuperBox commented Jan 7, 2019

I'm not able to reproduce that behavior either. I'm still sometimes able to get the incorrect error page, but not in any reproducible way (and admittedly, only by pressing buttons in series that would not make sense for any usage). Good work!

@UniversalSuperBox UniversalSuperBox merged commit 402a5b7 into ubports:xenial Jan 7, 2019

1 check passed

continuous-integration/jenkins/pr-merge This commit looks good
Details

@balcy balcy deleted the balcy:xenial_-_loadfailed branch Jan 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.