-
Notifications
You must be signed in to change notification settings - Fork 4
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
Problems downloading docs in chrome, with recap enabled... #352
Comments
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.). The successfully uploaded docs (that I fetched one at a time) do show up here: |
@mlissner Upon examination, the issue seems to be related to the 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 |
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: and it worked as expected (including the message mentioning a download was in progress). Thanks! |
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 <iframe> link to the zip document.
const htmlPage = await browserSpecificFetch(event.data.id).then((res) => res.text());
console.log('RECAP: Successfully submitted zip file request');
const zipUrl = extractUrl(htmlPage);
//download zip file and save it to chrome storage
const blob = await fetch(zipUrl).then((res) => res.blob());
const dataUrl = await blobToDataURL(blob);
console.info('RECAP: Downloaded zip file');
// save blob in storage under tabId
// we store it as an array to chunk the message
await updateTabStorage({
[this.tabId]: { ['zip_blob']: dataUrl },
});
...
// 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;
};
The text was updated successfully, but these errors were encountered: