QuiteRSS / quiterss

Free news feeds reader
https://quiterss.org
Other
1k stars 122 forks source link

Feeds are not getting updated after suspend/resume #1517

Open ValdikSS opened 2 years ago

ValdikSS commented 2 years ago

ОС: Linux Fedora 35 Qt: 5.15.2 QuiteRSS: 0.19.4 (21.04.2020, Qt-5.15.2, SQLite-3.36.0, WebKit-602.1)

QuiteRSS перестаёт обновлять все RSS-ленты, если ноутбук отправить в сон и включить заново. Все фиды помечаются красным крестом «сломанного интернета», а прогресс-бар доходит до 100% очень быстро.

Программа не пытается открыть IPv4/IPv6-сокет (проверено через strace), но периодически открывает netlink-сокеты с флагом NETLINK_ROUTE. Подозреваю, что программа не получает информацию о работоспособности интернета, и думает, что его нет.

ValdikSS commented 2 years ago

Полагаю, это https://bugreports.qt.io/browse/QTBUG-84907 @tieugene

ValdikSS commented 2 years ago

https://bugzilla.redhat.com/show_bug.cgi?id=2041569 @tieugene

ValdikSS commented 2 years ago

Hrm, that's not https://bugreports.qt.io/browse/QTBUG-84907 and not a network availability related. I've hacked up mainApp->networkManager()->setNetworkAccessible(QNetworkAccessManager::Accessible);

in https://github.com/QuiteRSS/quiterss/blob/a672609940a49776eb097abe99fa2a5b39578872/src/network/networkmanager.cpp#L304

and in https://github.com/QuiteRSS/quiterss/blob/a672609940a49776eb097abe99fa2a5b39578872/src/webview/webpage.cpp#L207

and it still doesn't work. The feeds are not getting updated, the pictures and other resources inside the feed records are not getting loaded in the webview. This seems like a regression of Qt5 in Fedora, since I don't remember such behavior on the previous distro version, Fedora 34. Fedora syncs Qt5 code with KDE Neon, maybe the regression is there. @tieugene

jimgreen2013 commented 1 year ago

I'm suffering from the same bug, do you have any clues or solutions?

jimgreen2013 commented 1 year ago

More info about this issue, error log

27.03.2023 10:44:50.276 WARNING: "Request failed: result = -1, error - The specified configuration cannot be used. (8), url - https://quiterss.org/en/rss.xml"

Maybe this has something to do with QNetworkAccessManager. See similar problems https://github.com/qutebrowser/qutebrowser/issues/129

ValdikSS commented 1 year ago

Probably the same Qt issue in crow-translate https://github.com/crow-translate/crow-translate/issues/383

ValdikSS commented 1 year ago

Workaround: Disable "networkbearer" plugin of Qt5 $ sudo mv /usr/lib64/qt5/plugins/bearer /usr/lib64/qt5/plugins/bearer.mv

Thanks to https://github.com/crow-translate/crow-translate/issues/383#issuecomment-1319991892

ValdikSS commented 1 year ago

Nextcloud resets QNetworkAccessManager in case of issues.

https://github.com/nextcloud/desktop/blob/12177878e25a6e8ae350a117880be769d3b3db5/src/gui/accountstate.cpp#L298-L320

https://github.com/nextcloud/desktop/blob/12177878e25a6e8ae350a117880be769d3b3db5e/src/libsync/account.cpp#L363-L384

See https://github.com/nextcloud/desktop/issues/4331

ValdikSS commented 1 year ago

Took some time to debug the issue. https://bugreports.qt.io/browse/QTBUG-114666

Simpliest workaround: start the affected applications without the network, connect to the network later.