Closed Bug 1666575 Opened 4 years ago Closed 4 years ago

Searching for terms in large PDFs doesn't find all results

Categories

(Firefox :: PDF Viewer, defect)

Firefox 81
defect

Tracking

()

VERIFIED FIXED
83 Branch
Tracking Status
firefox83 --- verified

People

(Reporter: matthias, Assigned: mcccs)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0

Steps to reproduce:

I opened a large PDF (attached), and without having scrolled (so still focused on the fist page) searched for "automatic vacuum".

Actual results:

It didn't find any results

Expected results:

It should have found at least 2 result on page 27

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → PDF Viewer

Encountering the same problem.

You could use mozregression to find which commit caused it, unless it is fixed in Nightly. (I can't reproduce it on my Ubuntu (Firefox Beta)) This would speed up finding the issue. (Are you both on Linux?)

Flags: needinfo?(matthias.vandemeent)

I'm using Nightly regularly and this has not been fixed. Should have posted about it earlier but this issue has been going on for about 2 weeks now. I'm using Windows 10.

I can't reproduce in 81 or Nightly on Linux, FWIW.

Having the issue on Linux (debian stretch), at least with v81 (usually on beta, but not updated since release 81). Will add update when i've updated to latest beta.

Current about:config settings for search term 'pdfjs' that are highlighted:

pdfjs.enabledCache.initialized                    true	
pdfjs.enabledCache.state                          false
pdfjs.migrationVersion                            2
pdfjs.previousHandler.alwaysAskBeforeHandling     true

I still can't reproduce it on Ubuntu with those prefs. Does the problem occur on a fresh profile? (I'm trying to reproduce so that I can use mozregression next)

Right, it doesn't occur on a fresh profile for me. This issue isn't addon-related though as I've already tried restarting with addons disabled. Wonder from where this comes from.

Right, it doesn't occur on a fresh profile for me. This issue isn't addon-related though as I've already tried restarting with addons disabled. Wonder from where this comes from.

I've traced it back to configuring 'about:preferences > Files and Applications > Applications > Portable Document Format -> Always Ask', and when the popup from 'what to do with this PDF' choosing 'open in Firefox'.

Flags: needinfo?(matthias.vandemeent)

Thank you, this is reproducible on macOS too (and is also super annoying)

I found that PdfJsParent constructor is not called if "Portable Document Format => Always Ask" I'm inspecting why

(In reply to Matthias from comment #9)

Right, it doesn't occur on a fresh profile for me. This issue isn't addon-related though as I've already tried restarting with addons disabled. Wonder from where this comes from.

I've traced it back to configuring 'about:preferences > Files and Applications > Applications > Portable Document Format -> Always Ask', and when the popup from 'what to do with this PDF' choosing 'open in Firefox'.

Indeed, choosing another action than "Always Ask", such as "Open in Nightly", solves the problem.

Assignee: nobody → mcccs
Attachment #9177903 - Attachment description: Bug 1666575 - Keep pdfjs classes always enabled. r=mikedeboer → Bug 1666575 - Keep pdfjs classes always enabled.

It seems that the patch cannot land due to the following error. mccs, can you please take a look?

Details: We're sorry, Lando could not rebase your commits for you automatically. Please manually rebase your commits and try again.

hg error in cmd: hg import --no-commit -s 95 /tmp/tmp6475df01: applying /tmp/tmp6475df01

patching file toolkit/components/pdfjs/test/browser.ini
Hunk #1 FAILED at 5
1 out of 1 hunks FAILED -- saving rejects to file toolkit/components/pdfjs/test/browser.ini.rej
abort: patch failed to apply

Flags: needinfo?(mcccs)

Thank you for needinfo'ing me. A rebased patch is not at D91441. Should I add a "check-in needed" tag now?

Flags: needinfo?(mcccs) → needinfo?(cbrindusan)
  • now at

Yes, please add a "check-in needed" tag when the patch is ready so one of the sheriffs can land it.

Flags: needinfo?(cbrindusan)
Pushed by cbrindusan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4e240b88ba93
Keep pdfjs classes always enabled. r=NeilDeakin,jaws

mcccs, I believe this issue exists for a long time, but only recently started showing up due to Firefox now advertising to the OS that it can open PDFs: It also fails for 81, and probably dates back to 80 where the OS-default-PDF-reader configuration was introduced.

@Matthias Thanks that explains why D76950, and old review introducing the faulty code, was not causing any problems until 81.

Pushed by ncsoregi@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/73e1bc905663
Keep pdfjs classes always enabled. r=NeilDeakin,jaws

I rewrote the test so that it doesn't rely on the PDFJS find events.

Flags: needinfo?(mcccs)
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
Flags: qe-verify+

To reproduce:

Reproduced the initial issue using old Nightly from 2020-09-22, verified that this is no longer an issue using Firefox 83.0b3 across platforms (Windows 10 64bit, macOS 11 and Ubuntu 18.04 64bit).

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: