Open sTywin opened 7 years ago
Thanks so much for this bug report @sTywin !
I'm debugging it now and will have an explanation shortly.
I took a deeper look at the seat14c.com/future_ideas
pages and they are unfortunately very large.
Each page is ~4Mb. EpubPress has a limit of 10Mb for any content sent.
Why the error?
nginx
was being used to enforce that limit - it responds with html, but the extension expects json
responses. So when it goes to parse the response it has a bad time.
Results
I've made it so that requests > 10 Mb and < 30 mb will get a friendlier error. Will need an extension update to catch the error for all cases.
I'm going to mark this as closed. Getting all those pages to work with EpubPress would require boosting the limit to
23 * 4Mb = 92 Mb
Allowing books that are ~100Mb large would degrade service for everyone and make the service more expensive to run.
Not the conclusion I had hoped for - sorry :(.
A separate issue exists for the JSON parsing bug, so I'll add these details and continue to track progress there.
Thanks again for the detailed bug report!
Makes sense, thanks for the update. A friendlier error will help.
Today I received the same error on all the pages I tried to download, both on Chrome and Firefox.
Now it works.
Thanks for the update @bkrlik!
Was off the grid the last few days and something went down 😬
Again it's no working :(
Currently experiencing some server issues. Hope to have things back up soon.
Sorry for the inconvenience.
Things are working again. Thanks again for alerting me @bkrlik !
How do we get an updated client to fix this? I'm still running into the same issue.
@jeffrechten If you're seeing the error it's because too much data is being sent. The fix would be to log a nice error that says:
Try sending less data...
Could be done in epub-press-js#normalizeErrors
. I can do that this weekend, just hasn't been on the top of my priorities.
@haroldtreen Would this be expected for one page of data? ~1200 lines, 110k characters.
@jeffrechten One page doesn't seem like it should be an issue... but it could be? The amount of text on the page isn't what matters as much as the size of the html
in the page. Sometimes pages download content in the background, store it in the page but hidden.
Do you have more information?
Network
tab and click the book
request, is the response?
@haroldtreen It's a yammer page I am logged into.
After I select the page for the book and click download, there isn't a books
request. Also, the total size is not terribly large: I forced a refresh to capture any cached data.
There are no errors in the console.
@jeffrechten I think you're looking at an inspector for the yammer webpage.
To see what EpubPress is doing you'll need to:
That's where the request should be coming from.
@haroldtreen Okay, I see. Sorry. Here's what I got:
@jeffrechten Hmmm... so it's not responding with anything? That seems a bit strange...
What's in the Headers
tab? Would be curious what the outbound request looks like.
What's the second network request? Doesn't look like anything that EpubPress requests.
This is what the output should look like:
And the Headers:
Published a new version of epub-press-js
that catches this error and returns something nicer.
https://www.npmjs.com/package/epub-press-js
Now just need to update the chrome extension.
@haroldtreen I noticed that the request was getting caught by a corporate proxy so that is why it wasn't making it to the server side.
macOS: Sierra 10.12.5 Chrome: 58.0.3029.110 (64-bit)
Steps to reproduce: 1/ Open new Chrome window 2/ Navigate to https://seat14c.com/future_ideas 3/ Open each of the entries in the “Passenger Manifest” on the left-hand-side in a new tab, from top to bottom, including “The Origin Story” (but not including “Claim Your Seat”) 4/ Close the root tab, so that “The Origin Story” has focus 5/ Click the Epub.Press icon 6/ Enter the title “Seat 14C” 7/ Click “Select All” 8/ Click “Download”
Expected outcome:
Actual outcome:
Workaround: