-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
regression: IOException: Mark invalid after upgrade to 1.12.2 #1324
Comments
This reverts commit 3ebfb99. Reverting because of regression on jsoup, see: jhy/jsoup#1324
Hi, Thanks for the replication detail. Does this replicate if you save the response byte[] to a file and then open that? (Which I expect it should, as that's all jsoup is getting input from.) If so, can you attach that as a file. It will simplify the repro. |
Indeed, here's the test file which reproduces the failure: test.html.txt I now reproduce with:
|
Thanks for that file. I have replicated and fixed, and it will be in 1.13.1. The issue was that during bufferUp, if a mark existed it would get cleared, and then it couldn't be rewound. This instance happened to require a rewind, so it would blow up. The fix is just to keep the mark when shuffling in new data. You can build from HEAD to verify. Also, out of interest, is there a reason to not use Jsoup.connect(url).get() for this? The benefit of using that is that the whole HTTP response does not need to be buffered into memory, and parsing can occur while the network stream in coming in. Happy to take feedback on anything missing in Connect. |
Thanks, I'll check that.
Well I did not write our validation tests where we use jsoup so I'd have to check properly but I can already imagine 2 reasons:
|
Hi @jhy, can you give an ETA on when a new release containing this fix will be published? If finishing version 1.13.1 is still going to take a while, we would really appreciate a hotfix release ❤️ |
I faced the same issue with 1.12.1, are there any workaround or a hotfix planned? It would be perfect 🙏 |
Looks like I forgot to answer :) I confirm it's working well on my side (just checked again to be sure) |
@jhy Yes I can! We've been using a version built on master in our staging environment for about day now and the error has not shown up again since. 👍 I cannot confirm that it is fixed 100% since this has always been an intermittent error, but it usually occured a few times per hour, so this definetly looks like it is fixed. |
OK that's great, thank you both for confirming. It looks like this is in good shape. I'm planning on spending some this weekend on wrapping things up and getting a release out. |
Hi,
we are using jsoup inside XWiki to perform some page validation as part of our integrations tests and we noticed a regression after the upgrade from jsoup 1.12.1 to 1.12.2. When accessing a particular page, we obtained the following:
I've been able to isolate and reproduce in a "small" setup, but it still needs an XWiki instance.
Here's the small Java code I'm using for reproduction:
Before running this, you need to download an instance of XWiki 12.0 (http://maven.xwiki.org/releases/org/xwiki/platform/xwiki-platform-distribution-flavor-jetty-hsqldb/12.0/xwiki-platform-distribution-flavor-jetty-hsqldb-12.0.zip), unzip it, start it using the bash script (
./start_xwiki.sh
) and open a browser withhttp://localhost:8080
to be sure everything's loaded.I checked with 1.12.1 and I confirm I didn't reproduce with it.
The text was updated successfully, but these errors were encountered: