Closed el-abcd closed 7 months ago
Thanks for the useful bug report. @ERosendo can you please take a look at this when you have a moment away from the ACMS stuff and the Elastic stuff?
@el-abcd, you might be able to just disable uploading from within RECAP's settings. That puts it in "mooch mode" which I think would at least let you get content for free until this is fixed.
Thx.
I did try downloading the six docs above "one at a time" and that did work (clunky, end up opening multiple tabs, etc.). But I think that might help confirm this is related to "multi-part docs". I'll try disabling uploads when I do more "multi-part" downloads.
The successfully uploaded docs (that I fetched one at a time) do show up here: https://www.courtlistener.com/docket/67784556/the-litigation-practice-group-pc-adversary-proceeding/
@mlissner Upon examination, the issue seems to be related to the extractUrl
helper function. This function attempts to extract the zip URL from the response generated after the form is submitted. However, it employs a query to an iframe
within the response, which fails in the absence of this HTML element (as encountered in docket 8:23-ap-01098).
I inspected the response received after the form submission and noticed it contained only a small number of HTML tags. The following is the body of the HTML page we get:
<div id="cmecfMainContent">
<br> Your download will begin in a separate window.
<div id="scroller" style="height: 100%; width: 100%; overflow: scroll; -webkit-text-size-adjust:none; resize: both;">
<script language="javascript" type="text/javascript">
window.location = "/cgi-bin/show_temp.pl?file=zipped_0.352834029679315.zip&type=application/zip&filename_prompt=8-23-ap-01098-SC.zip";
</script>
</div>
I was able to download the zip file by using the URL embedded within the script
tag. This suggests that we could fix this issue by tweaking the extractUrl
to get the URL from the script
tag
FWIW, this LGTM!
I forked the repo, git clone'd it locally, and followed the instructions on how to install locally for chrome (tweak versions in package.json and manifest.json, make the zip, and "load unpacked" in chrome.
I tested by downloading and uploading this multi-doc zip file: https://www.courtlistener.com/docket/67051161/the-litigation-practice-group-pc/?filed_after=&filed_before=&entry_gte=&entry_lte=&order_by=desc#entry-511
and it worked as expected (including the message mentioning a download was in progress).
Thanks! Eric
Thanks again for the helpful bug report.
Summary: Get a spinning beach ball in chrome on mac when trying to download docs with recap enabled.
Details: While it appears that recap can successfully upload the docket (when I view it in pacer, using chrome with the recap extension), the last several times (over a couple weeks, I'm an occasional user) that I have tried to download docs from the dockets I am interested in (CA bankruptcy court) the downloads to NOT complete (spinning beach ball).
Example docket I'm trying to download from: https://www.courtlistener.com/docket/67784556/the-litigation-practice-group-pc-adversary-proceeding/ https://ecf.cacb.uscourts.gov/cgi-bin/DktRpt.pl?759118030653799-L_1_0-1
Note: the one I'm reporting this bug on is a 6 part document (I wonder if this is related to multi-part documents)...
The "solution" for me has been to disable the recap extension, then the downloads work as expected.
When I open the developer tools and look at the console messages I see the following: RECAP: Successfully submitted zip file request Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'src') at extractUrl (content_delegate.js:548:22) at ContentDelegate.onDownloadAllSubmit (content_delegate.js:592:18)
So, somewhere in here:
// fetch the html page which contains the
...
// TODO: Confirm that zip downloading is consistent across jurisdictions ContentDelegate.prototype.onDownloadAllSubmit = async function (event) { // helper function - extract the zip by creating html and querying the frame const extractUrl = (html) => { const page = document.createElement('html'); page.innerHTML = html; const frames = page.querySelectorAll('iframe'); return frames[0].src; };