Closed Bug 1802685 Opened 1 year ago Closed 1 year ago

Search on Server fails in Newsgroups (NNTP) when there are many hits


(MailNews Core :: Networking: NNTP, defect)

Thunderbird 102


(thunderbird_esr102+ affected, thunderbird108 affected)

109 Branch
Tracking Status
thunderbird_esr102 + affected
thunderbird108 --- affected


(Reporter: infofrommozilla, Assigned: rnons)




(Keywords: regression)


(7 files)

Subscribe to Newsserver: Newsgroup: de.test
Context menu of group -> "Search Messages..."
Check "Run search on server"
Search for: "From" - "contains" - "Alfred Peters"

Result: Error dialog and the result is incomplete.
Error Console:

10:09:13.768 mailnews.nntp: Got an error id=-304 NntpClient.jsm:849:18
    _actionError resource:///modules/NntpClient.jsm:849
    _actionXPatResponse resource:///modules/NntpClient.jsm:835
    _onData resource:///modules/NntpClient.jsm:215
    (Async: EventHandlerNonNull)
    _onOpen resource:///modules/NntpClient.jsm:142
    (Async: EventHandlerNonNull)
    connect resource:///modules/NntpClient.jsm:109
    withClient resource:///modules/NntpIncomingServer.jsm:614
    getNewNews resource:///modules/NntpService.jsm:104
    performExpand resource:///modules/NntpIncomingServer.jsm:331
    _toggleRow chrome://messenger/content/folderPane.js:1382
    toggleOpenState chrome://messenger/content/folderPane.js:1310
    changeOpenState chrome://global/content/elements/tree.js:1246
    MozTreeChildren chrome://global/content/elements/tree.js:110

(The quick search finds 229 messages.)
The error occurs with the TB102 with activated nntp.jsmodule and also with the current daily.

The error occurs when the result set is split into 2 or more parts.
This is the first response with the response code (status:) 221, the status text and an empty data field.

Keywords: regression
Regressed by: nntp-js

The second part of the response contains the first data. The status and statusText fields are undefined.
No error is generated here.

The third part of the response again contains data and the undefined statusText field but no status field.
This then generates the error message.

(In reply to Alfred Peters from comment #0)

Error Console:

10:09:13.768 mailnews.nntp: Got an error id=-304 NntpClient.jsm:849:18

This message is from the trunk source code.

If I search not just a group but the whole server for something that doesn't deliver a hit at all, the TB sometimes seems to choke.

It then starts like this, where the response message is not properly separated into status code and text.
Again, this does not produce an error.

In the response for the next group, the status code is missing again and the error is generated.

I have a patch on local to prevent the error, but it still shows "No matches found".
I also tested 91 and with nntp.jsmodule=false on 102, showed "No matches found" as well.
Is it the same for you? Is this feature long broken?

No, the C module works fine.
I can't say if the JS module ever worked.

JS module: That the search works for few hits obviously depends on the server. delivers the response line and the data in separate packets as described in (comment #1) and (comment #2). This then fails.

My local news server delivers the first data already in the first data packet together with the response line. As long as the data fits into the first packet, the search with the JS module then works fine.

Assignee: nobody → remotenonsense

OK, I see how it works now. Even if XPAT returns 100 results, if 10 of the 100 articles are on local, only 10 will be shown in the search result. That's why I got "No matches found" yesterday.
So "search on server" is only useful to check if a message is still on the server?

Target Milestone: --- → 109 Branch
Closed: 1 year ago
Resolution: --- → FIXED

(In reply to Ping Chen (:rnons) from comment #11)

So "search on server" is only useful to check if a message is still on the server?

You can thus search any header without having to keep it offline.

(Edit: [deleted] - sorry that was nonsense.)

You need to log in before you can comment on or make changes to this bug.