Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix integration test "FreeText Editor FreeText (delete existing) must delete an existing annotation" #18368

Closed
timvandermeij opened this issue Jul 2, 2024 · 6 comments

Comments

@timvandermeij
Copy link
Contributor

timvandermeij commented Jul 2, 2024

The most recent failure is in http://54.193.163.58:8877/018387cde149e38/output.txt with the following traceback:

Failures:
1) FreeText Editor FreeText (delete existing) must delete an existing annotation
  Message:
�[31m    ProtocolError: Waiting for selector `#pdfjs_internal_editor_3.selectedEditor` failed: script.callFunction timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher timeout if needed.�[0m
  Stack:
        at <instance_members_initializer> (file:///C:/pdfjs/botio-files-pdfjs/private/018387cde149e38/node_modules/puppeteer-core/lib/esm/puppeteer/common/CallbackRegistry.js:89:14)
        at new Callback (file:///C:/pdfjs/botio-files-pdfjs/private/018387cde149e38/node_modules/puppeteer-core/lib/esm/puppeteer/common/CallbackRegistry.js:93:16)
        at CallbackRegistry.create (file:///C:/pdfjs/botio-files-pdfjs/private/018387cde149e38/node_modules/puppeteer-core/lib/esm/puppeteer/common/CallbackRegistry.js:19:26)
        at BidiConnection.send (file:///C:/pdfjs/botio-files-pdfjs/private/018387cde149e38/node_modules/puppeteer-core/lib/esm/puppeteer/bidi/Connection.js:51:32)
        at Session.send (file:///C:/pdfjs/botio-files-pdfjs/private/018387cde149e38/node_modules/puppeteer-core/lib/esm/puppeteer/bidi/core/Session.js:154:42)
        at Session.<anonymous> (file:///C:/pdfjs/botio-files-pdfjs/private/018387cde149e38/node_modules/puppeteer-core/lib/esm/puppeteer/util/decorators.js:94:27)
        at WindowRealm.callFunction (file:///C:/pdfjs/botio-files-pdfjs/private/018387cde149e38/node_modules/puppeteer-core/lib/esm/puppeteer/bidi/core/Realm.js:92:51)
        at WindowRealm.<anonymous> (file:///C:/pdfjs/botio-files-pdfjs/private/018387cde149e38/node_modules/puppeteer-core/lib/esm/puppeteer/util/decorators.js:94:27)
        at #evaluate (file:///C:/pdfjs/botio-files-pdfjs/private/018387cde149e38/node_modules/puppeteer-core/lib/esm/puppeteer/bidi/Realm.js:127:42)
        at async BidiFrameRealm.evaluateHandle (file:///C:/pdfjs/botio-files-pdfjs/private/018387cde149e38/node_modules/puppeteer-core/lib/esm/puppeteer/bidi/Realm.js:94:16)

The source code can be found here: https://github.com/mozilla/pdf.js/blob/master/test/integration/freetext_editor_spec.mjs#L1213-L1263

We should find out what causes this as it's one of the last intermittents we have left.

@timvandermeij timvandermeij changed the title Fix integration test "" Fix integration test "FreeText Editor FreeText (delete existing) must delete an existing annotation" Jul 2, 2024
@calixteman
Copy link
Contributor

Maybe I fixed it in #18366.
The rect is empty because the editor isn't rendered and then clicking on "it" does nothing, consequently the editor isn't selected.

@timvandermeij
Copy link
Contributor Author

timvandermeij commented Jul 2, 2024

Unfortunately I don't think that fixed this particular issue because this intermittent happened in #18367 and that one was rebased onto the current master branch where that patch is already active; see the file at the revision of the last commit in that PR at

await page.waitForSelector(selector);
where the waitForSelector call is present. Looking at http://54.193.163.58:8877/386a81e543ffce1/output.txt, which prompted your fix, it does look similar, but given that that fix is already in place something else is probably going on in this test.

@timvandermeij
Copy link
Contributor Author

timvandermeij commented Jul 2, 2024

It's indeed a bit problematic because I can't spot anything wrong in the code, especially after the extra hardening that was applied to getRect, and I can't reproduce it locally too. For now let's just use this issue to track that it happened and see if it happens again, and in the meantime we'll first get other issues out of the way, which also gives me some time to think about how to get more relevant debugging information for the bot tests.

@timvandermeij
Copy link
Contributor Author

timvandermeij commented Jul 3, 2024

For future reference, it happened again in #18369, see http://54.193.163.58:8877/fc78ad56a1a8b11/output.txt, which also contains the getRect hardening, so it does appear that there is a different issue with this particular test only. Moreover, note that both times this only happened on Windows.

@timvandermeij
Copy link
Contributor Author

timvandermeij commented Jul 4, 2024

This problem is likely fixed by #18374, but due to its intermittent nature we'll leave this issue open for a bit to make sure it doesn't reappear.

@timvandermeij
Copy link
Contributor Author

Closing since we haven't seen this reappear so far. If it does, we'll track it in #18396.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants