[Bug 1879923] Re: Update Scan Data Over Internet fails

TJ 1879923 at bugs.launchpad.net
Sun Aug 15 07:49:31 UTC 2021


Confirming this is still an issue on 20.04 with

$ apt-cache policy kaffeine
kaffeine:
  Installed: 2.0.18-1build1
  Candidate: 2.0.18-1build1
  Version table:
 *** 2.0.18-1build1 500
        500 http://gb.archive.ubuntu.com/ubuntu focal/universe amd64 Packages

The file is a sequence of zlib-encoded bytes created using QT's
QFile.qCompress()

https://doc.qt.io/qt-5/qbytearray.html#qCompress

QByteArray qCompress(const QByteArray &data, int compressionLevel = -1)

where compressionLevel = 9 (best).

Analyzing the received file shows:

$ binwalk /tmp/scantable.dvb.gz

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
4             0x4             Zlib compressed data, best compression


The file being requested is:

https://autoconfig.kde.org/kaffeine/scantable.dvb.qz

src/dvb/dvbconfigdialog.cpp:636:        job =
KIO::get(QUrl("https://autoconfig.kde.org/kaffeine/scantable.dvb.qz"),
KIO::NoReload,


Enabling KIO debugging reveals the file is downloaded:

kf5.kio.kio_http: ============ Sending Header:                                                                                                    
kf5.kio.kio_http: "GET /kaffeine/scantable.dvb.qz HTTP/1.1"                                                                                       
kf5.kio.kio_http: "Host: autoconfig.kde.org"                                                                                                      
kf5.kio.kio_http: "Connection: keep-alive"                                                                                                        
kf5.kio.kio_http: "User-Agent: Mozilla/5.0 (X11; Linux x86_64) KHTML/5.68.0 (like Gecko) Konqueror/5 KIO/5.68"
kf5.kio.kio_http: "Accept: text/html, text/*;q=0.9, image/jpeg;q=0.9, image/png;q=0.9, image/*;q=0.9, */*;q=0.8"
kf5.kio.kio_http: "Accept-Encoding: gzip, deflate, x-gzip, x-deflate"                                                                             
kf5.kio.kio_http: "Accept-Charset: utf-8,*;q=0.5"                                                                                                 
kf5.kio.kio_http: "Accept-Language: en-GB,en;q=0.9"                                                                                               
kf5.kio.kio_http: sent it!                                                                                                                        
kf5.kio.kio_http:    
kf5.kio.kio_http: ============ Received Status Response:                                                                                          
kf5.kio.kio_http: "HTTP/1.1 200 OK"                                                                                                               
kf5.kio.kio_http: QUrl("https://autoconfig.kde.org/kaffeine/scantable.dvb.qz") response code:  200 previous response code: 0
kf5.kio.kio_http: wasAuthError= false isAuthError= false sameAuthError= false           
kf5.kio.kio_http:  -- full response:                                                                                                              
 "HTTP/1.1 200 OK\r\nDate: Sun, 15 Aug 2021 07:07:46 GMT\r\nServer: Apache/2.4.29 (Ubuntu)\r\nUpgrade: h2\r\nConnection: Upgrade, Keep-Alive\r\nLa
st-Modified: Tue, 04 May 2021 17:52:06 GMT\r\nAccept-Ranges: bytes\r\nContent-Length: 102499\r\nCache-Control: max-age=0\r\nExpires: Sun, 15 Aug 2
021 07:07:46 GMT\r\nStrict-Transport-Security: max-age=15768000\r\nReferrer-Policy: strict-origin-when-cross-origin\r\nX-XSS-Protection: 1; mode=b
lock\r\nX-Content-Type-Options: nosniff\r\nX-Frame-Options: sameorigin\r\nPermissions-Policy: interest-cohort=()\r\nKeep-Alive: timeout=5, max=100
"                                                                                                                                                 
kf5.kio.kio_http: parsed expire date from 'expires' header: "Sun, 15 Aug 2021 07:07:46 GMT"
kf5.kio.kio_http: Cache needs validation
kf5.kio.kio_http:                 
kf5.kio.kio_http: Previous Response: 0
kf5.kio.kio_http: Current Response: 200
kf5.kio.kio_http: "102499" bytes left.
kf5.kio.kio_http: bytesReceived: 4096  m_iSize: 102499  Chunked: false  BytesLeft: 98403
kf5.kio.kio_http: Determining mime-type from content...
kf5.kio.kio_http: Mimetype buffer size: 4096
kf5.kio.kio_http: Using default mimetype: "text/html"
kf5.kio.kio_http: bytesReceived: 4096  m_iSize: 102499  Chunked: false  BytesLeft: 94307
kf5.kio.kio_http: bytesReceived: 4096  m_iSize: 102499  Chunked: false  BytesLeft: 90211
kf5.kio.kio_http: bytesReceived: 4096  m_iSize: 102499  Chunked: false  BytesLeft: 86115
kf5.kio.kio_http: bytesReceived: 4096  m_iSize: 102499  Chunked: false  BytesLeft: 82019
kf5.kio.kio_http: bytesReceived: 4096  m_iSize: 102499  Chunked: false  BytesLeft: 77923
kf5.kio.kio_http: bytesReceived: 4096  m_iSize: 102499  Chunked: false  BytesLeft: 73827
kf5.kio.kio_http: bytesReceived: 4096  m_iSize: 102499  Chunked: false  BytesLeft: 69731
kf5.kio.kio_http: bytesReceived: 4096  m_iSize: 102499  Chunked: false  BytesLeft: 65635
kf5.kio.kio_http: bytesReceived: 4096  m_iSize: 102499  Chunked: false  BytesLeft: 61539
kf5.kio.kio_http: bytesReceived: 4096  m_iSize: 102499  Chunked: false  BytesLeft: 57443
kf5.kio.kio_http: bytesReceived: 4096  m_iSize: 102499  Chunked: false  BytesLeft: 53347
kf5.kio.kio_http: bytesReceived: 4096  m_iSize: 102499  Chunked: false  BytesLeft: 49251
kf5.kio.kio_http: bytesReceived: 4096  m_iSize: 102499  Chunked: false  BytesLeft: 45155
kf5.kio.kio_http: bytesReceived: 4096  m_iSize: 102499  Chunked: false  BytesLeft: 41059
kf5.kio.kio_http: bytesReceived: 4096  m_iSize: 102499  Chunked: false  BytesLeft: 36963
kf5.kio.kio_http: bytesReceived: 4096  m_iSize: 102499  Chunked: false  BytesLeft: 32867
kf5.kio.kio_http: bytesReceived: 4096  m_iSize: 102499  Chunked: false  BytesLeft: 28771
kf5.kio.kio_http: bytesReceived: 4096  m_iSize: 102499  Chunked: false  BytesLeft: 24675
kf5.kio.kio_http: bytesReceived: 4096  m_iSize: 102499  Chunked: false  BytesLeft: 20579
kf5.kio.kio_http: bytesReceived: 4096  m_iSize: 102499  Chunked: false  BytesLeft: 16483
kf5.kio.kio_http: bytesReceived: 4096  m_iSize: 102499  Chunked: false  BytesLeft: 12387
kf5.kio.kio_http: bytesReceived: 4096  m_iSize: 102499  Chunked: false  BytesLeft: 8291
kf5.kio.kio_http: bytesReceived: 4096  m_iSize: 102499  Chunked: false  BytesLeft: 4195
kf5.kio.kio_http: bytesReceived: 4096  m_iSize: 102499  Chunked: false  BytesLeft: 99
kf5.kio.kio_http: bytesReceived: 99  m_iSize: 102499  Chunked: false  BytesLeft: 0
kf5.kio.kio_http: EOD received! Left = "0"
kf5.kio.kio_http: 
kf5.kio.kio_http: keepAlive = true
kf5.kio.kio_http: 
kf5.kio.kio_http: keep alive ( 5 )
kf5.kio.kio_http: keepAlive = false
kf5.kio.kio_http: 
kf5.kio.kio_http: 
kdeinit5: PID 2849693 terminated.


Based on the update dialog reporting "Scan data update failed" it suggests the code path never reaches:

src/dvb/dvbmanager.cpp DvbManager::updateScanData(const QByteArray
&data)

There's a suspicious looking job kill based on scanData.size() >= 64KiB:

src/dvb/dvbconfigdialog.cpp void DvbScanFileDownloadDialog::dataArrived(KIO::Job *, const QByteArray &data)
{
        if ((scanData.size() + data.size()) <= (64 * 1024)) {
                scanData.append(data);
        } else {
                job->kill(KJob::EmitResult);
        }
}

Which led me to the upstream source and an April 2021 commit and related
bug:

https://bugs.kde.org/show_bug.cgi?id=436371 " Can't download scanfile,
as it is too big"

commit 209a263ab2191f0b1d13f48a0a2fa67794357ad0
Author: Mauro Carvalho Chehab <mchehab+huawei at kernel.org>
Date:   Fri Apr 30 08:35:31 2021 +0200

    dvbconfigdialog: increase max download size for scandata
    
    By the time Kaffeine was written, a 64KB max limit were
    enough, but nowadays, the scandata file has already 104KB.
    
    Increase the limit up to 1MB, in order to fix download
    issues with valid files.
    
    While here, also improve the download messages to show
    how much data was downloaded and to report the reason
    why a download was aborted.
    
    BUG: 436371
    
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei at kernel.org>

** Bug watch added: KDE Bug Tracking System #436371
   https://bugs.kde.org/show_bug.cgi?id=436371

** Also affects: kaffeine via
   https://bugs.kde.org/show_bug.cgi?id=436371
   Importance: Unknown
       Status: Unknown

-- 
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to kaffeine in Ubuntu.
https://bugs.launchpad.net/bugs/1879923

Title:
  Update Scan Data Over Internet fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/kaffeine/+bug/1879923/+subscriptions





More information about the kubuntu-bugs mailing list