Bug 391875 - Setting Speeddial As Homepage Randomly Gives Empty Page
Summary: Setting Speeddial As Homepage Randomly Gives Empty Page
Status: RESOLVED FIXED
Alias: None
Product: Falkon
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: David Rosca
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-15 01:23 UTC by dsreyes1014
Modified: 2018-05-01 11:10 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 3.0.1


Attachments
webchannel registration debug (448 bytes, patch)
2018-03-31 12:14 UTC, David Rosca
Details
Fix (713 bytes, patch)
2018-04-08 12:59 UTC, The_assassin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dsreyes1014 2018-03-15 01:23:01 UTC
I set homepage to speeddial and it sometimes brings me to no dials on it.  It happens randomly so not sure how to create steps for reproduction of this bug.
Comment 1 The_assassin 2018-03-15 07:27:01 UTC
I think that's related to https://phabricator.kde.org/R875:674a0e78f69fb49c5512ddf03fe32597dc7ca209, so if i'm right, it's fixed already.
Comment 2 dsreyes1014 2018-03-15 12:25:18 UTC
Is there a release of stable coming out soon or should I just check for the fix in git?
Comment 3 David Rosca 2018-03-15 12:28:23 UTC
Does reloading the page helps?
Comment 4 The_assassin 2018-03-15 12:45:25 UTC
David, i also was facing that as kind of regression of https://github.com/QupZilla/qupzilla/issues/2544, but currently i can't reproduce it, so that was the reason i posted the previous comment. Reloading the page was not helping to me.
Comment 5 The_assassin 2018-03-16 12:30:36 UTC
Actually today it happens again. Almost 100% reproducible at https://twitter.com/IronMaiden, then just close it (you should have 'dontCloseWithOneTab=true' sett)
Comment 6 dsreyes1014 2018-03-16 13:48:09 UTC
David reloading the page doesn't not help nor does clicking on homepage again.
Comment 7 David Rosca 2018-03-16 17:47:23 UTC
I can't reproduce it with QtWebEngine 5.10.1
Comment 8 The_assassin 2018-03-16 18:31:25 UTC
I'm also with 5.10.1...
You may try with QupZilla Appimage, i've reproduced it also with it.
Does the debug code will give you the needed information?
Comment 9 The_assassin 2018-03-17 10:00:42 UTC
I think that is something related to paths permissions, because:
To do some quick tests, i'm just overriding the HOME variable, so if HOME is set to '/tmp/test' for example, the problem does not exists, but if HOME is set to any other directory different from '/tmp' or just by default, it exists. So, for me there is no bug here.
Comment 10 David Rosca 2018-03-31 12:14:29 UTC
Created attachment 111753 [details]
webchannel registration debug

Can you please try with this patch and send output when the bug happens?
Comment 11 The_assassin 2018-03-31 13:22:41 UTC
This is the output to me:

WebPage(0x1a3e3e0) set 0
Comment 12 David Rosca 2018-03-31 13:57:00 UTC
That looks correct, no idea then.

Maybe try to change ms delay (setTimeout) for m_setupChannelTimer in webpage.cpp:114 to lower/higher value.
Comment 13 The_assassin 2018-03-31 14:35:22 UTC
Well, i have tried few lower values until i increased it to 1000, where i have a success. That's it.
Comment 14 Christian 2018-04-08 11:59:43 UTC
I have the same issue as dsreyes1014 -I set the homepage to speeddial (falkon:speeddial) and "do not close window upon closing last tab", so I expect that  there will be the speed dial when I close the last tab. Sometimes it shows up, sometimes it shows an empty screen with the speeddial background but no speed dials.
Falkon version 3.0.0, qtwebengine version 5.9.4, using Gentoo.
Comment 15 Christian 2018-04-08 12:04:34 UTC
PS Clicking the green plus button for a new tab always gives me the speed dial. It just sometimes fails to appear when closing the last tab.
Comment 16 Richard Ullger 2018-04-08 12:14:49 UTC
This is 100% reproducible for me using the steps below. I'm running the kde_unstable repo in Arch Linux.

qt5-webengine 5.11.0beta2-2
falkon 3.0.0-1 rebuilt for 5.11.0beta2

I have the following preferences set...
After launch: Open homepage
Homepage: falkon:speeddial
On new tab: Open homepage

1. Ensure falkon is set as the default browser.
2. Quit all instances of falkon.
3. Click on a http(s) link to cause falkon to start up and display the page.
4. After the page has displayed click on the homepage button. A blank speeddial page is displayed.

Clicking + to open a new tab displays the speeddial page correctly whether the new tab is opened before or after the homepage button is clicked while on the first tab.

Opening a new tab correctly displaying the speeddial page and then clicking the homepage button on the first tab still displays a blank speeddial page.
Comment 17 The_assassin 2018-04-08 12:59:46 UTC
Created attachment 111901 [details]
Fix

The attached patch should fixes the issue. Please try it!
Comment 18 Christian 2018-04-08 15:18:35 UTC
I installed the patch. It seems that the speed dial items now appear, after a noticeable delay.
Comment 19 Richard Ullger 2018-04-08 15:45:07 UTC
I concur with Christian, applying the patch fixes the issue but introduces a delay in displaying the speeddials.
Comment 20 Christian 2018-04-17 14:11:49 UTC
Sometimes when I close a page (maybe somewhat more complex page?) and it takes longer for Falkon to close it, the Speed Dial still shows up as blank despite the Fix.

I don't know how it is programmed, but I think the Speed dial items should be drawn as part of the sequence that draws the empty tab with the Speed dial, and not after a certain programmed delay.
Comment 21 David Rosca 2018-05-01 11:10:51 UTC
Git commit 3787a606d3fc66d36301a34457f3ca08c0893bd4 by David Rosca.
Committed on 01/05/2018 at 11:02.
Pushed by drosca into branch 'Falkon/3.0'.

Rewrite internal sites to use user scripts instead of embedded code

It is no longer needed to setup web channel on unsafe js world
for internal pages, and thus it fixes issue where registering web
channel could fail in some cases.
FIXED-IN: 3.0.1

M  +19   -16   src/lib/app/mainapplication.cpp
M  +2    -0    src/lib/data/html.qrc
M  +7    -170  src/lib/data/html/restore.html
C  +21   -178  src/lib/data/html/restore.user.js [from: src/lib/data/html/restore.html - 053% similarity]
M  +33   -462  src/lib/data/html/speeddial.html
A  +502  -0    src/lib/data/html/speeddial.user.js
M  +0    -2    src/lib/network/schemehandlers/falkonschemehandler.cpp
M  +9    -1    src/lib/plugins/speeddial.cpp
M  +12   -13   src/lib/tools/scripts.cpp
M  +2    -1    src/lib/tools/scripts.h
M  +4    -29   src/lib/webengine/webpage.cpp
M  +0    -5    src/lib/webengine/webpage.h

https://commits.kde.org/falkon/3787a606d3fc66d36301a34457f3ca08c0893bd4