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

After a while, From downloadable it will give you "cannot send HTTP request" #21

Open
hanakomisa opened this issue Oct 29, 2017 · 42 comments

Comments

@hanakomisa
Copy link

hanakomisa commented Oct 29, 2017

It's working for like 30 minutes, then it will give you an error "cannot send HTTP request" I have a ghetto solution by delete and recreate the pkgi folder with the pkgi.txt again.

Edit: now the solution doesn't work with me, just hoping someone to point out where it really is.

@MarioMasta64
Copy link

I get this issue as well. it seems to happen at around 2gb or so

@MarioMasta64
Copy link

for now i made a fork of the source at: https://github.com/MarioMasta64/pkgi that disables home lock (so that it doesnt softlock with this error) use at your own will and compile according to the release instructions

@fennectech
Copy link

i beleve this is a result of the vita turning off wlan to save power. You shoudl turn the screen off instaid of locking the system if you cant inhibit this powersaving.

@mmozeiko
Copy link
Owner

mmozeiko commented Oct 30, 2017

Deleting pkgi and installing again will not change anything. It doesn't store any permanent state except your last filtering/sorting direction.

Not sure why removing disable of home button would help... VitaShell does the same when it invokes FTP server. Can you test if this happens with VitaShell? Start ftp server, wait X min and check if it is still active and accessible from PC.

@hanakomisa
Copy link
Author

hanakomisa commented Oct 30, 2017

Okay I'll check that out.

@hanakomisa
Copy link
Author

Oh and btw, Last night I get it to work for one download then it gives me the same HTTP error again.

@hanakomisa
Copy link
Author

Seems like VitaShell is still going on while past for 25 min.

@mmozeiko
Copy link
Owner

So it cannot be that power-saving code. Because in VitaShell it does exactly same thing as in pkgi.

@fennectech
Copy link

hmmm If only we could see a packet capture of this.

@mmozeiko
Copy link
Owner

mmozeiko commented Oct 30, 2017

I don't think there are any packets. That error happens when it cannot create http connection handle with Vita API's. Unfortunately pkgi doesn't show any detailed error code in UI. Currently if it fails, it displays just generic "cannot send http request error". I'll create build that shows more detailed error. Then the error code will maybe tell us more what is wrong.

@fennectech
Copy link

ill test it

@hanakomisa
Copy link
Author

I'll be the one of the tester.

@fennectech
Copy link

having full error codes would be nice in production too.

@MarioMasta64
Copy link

MarioMasta64 commented Oct 31, 2017

basically it just a temp fix because when this error appears there is no way to exit it because it keeps trying to continue and failing so it ends up softlocking the device

i just disabled it as a temp fix in case it softlocks the app. it shouldnt be used in any other step.

perhaps if you added a incremented error check so if it error's say 3 times in a row it will stop downloading and you will have to manually continue it :D

btw maybe using "sceHttpEnableKeepAlive" may help?
on another note this seems to control the downloading: "https://github.com/TheOfficialFloW/VitaShell/blob/master/network_download.c"
maybe see whats different between theres and yours? -shrug-

(btw you forgot to disable mtp so if someone were to plug in a cord the app would exit)

also i doubt its a timeout kinda thing like y'all suggest because exiting and returning produces the same error. my best guess is it freaks out with big files :/

im actually certain its not a timeout thing tho, because i have slow slow slow internet. i can have this thing run for like 3 hours (for like a 1.6gb file or so) but if i try to download something ~2.5gb+ it freaks out.

perhaps if someone downloaded many different ~2.5gb+ things and see if they all freak out at the same amount of memory used?

@mmozeiko
Copy link
Owner

mmozeiko commented Oct 31, 2017

What do you mean by "it keeps trying to continue and failing" ? If download fails, it should stop with red error message, and should not continue until you start it again - but then it will be completely new http connection. Do you see something else?

File size that is being download does not affect memory usage. I do not allocate memory during application runtime - only whatever is allocated at startup. All download happen in fixed size buffer which gets written to files all the time.

@mmozeiko
Copy link
Owner

@fennectech @jsyreviews please try this vpk: pkgi-v0.05-http-debug.vpk. It is v0.05 version with few modification - removed locking of PS home button, and added extra debug info to http error messages. It should show error code when it fails. Let me know what kind of error you see with this one.

@MarioMasta64
Copy link

basically, it stops. makes a new connection and fails. essentially creating an infinite loop of trying to connect and thats where the problem arises. and i was guessing such as it only happens after a certain amount of gigs and not time. on another note this build seems to work swell, im no longer getting the error when continuing (least not yet) what did you change?

@MarioMasta64
Copy link

MarioMasta64 commented Oct 31, 2017

also i seem to get a way different thing because it will constantly constantly spam the failed to create http error. pressing the continue button just has it try to continue and then the same thing over and over and over. but whatever you changed seemed to fix it.

now im downloading something of size ~3.3gb over the span of 2 hours, i will let you know if it error's at all but as far as i can tell you fixed it.

i also see that you fixed the mtp issue :D very nice

@MarioMasta64
Copy link

MarioMasta64 commented Oct 31, 2017

also keep in mind allowing the application to exit and continue like this kinda really messes with whats happening and can p'much throw off an entire download (which brings tears if its big and youve been there for hours) so pshome should only be used when not in download or if an error "softlocks" you

(i did alot of testing with the effects of enabling pshome in my free time before i made the branch)

@mmozeiko
Copy link
Owner

mmozeiko commented Oct 31, 2017

what did you change?

I changed three things - remove locking of PS home button (because you complained it locks up device, so I thought this will be easier to test), showing error code when something fails with http, and I found one place where it tried to reconnect even if reading of http data failed (that's pointless).

it will constantly constantly spam the failed to create http error

But what is error code? I need the error code. What exactly error message are you getting?

i also see that you fixed the mtp issue

No, I have not changed anything related to this. If you are comparing this "feature" to your fork, then you actually removed code that makes Vita to ignore new usb connections - line 439.

allowing the application to exit and continue like this kinda really messes with whats happening

Yes, I know. This is not permanent change and won't go into master. This is just because you said it locks up device, so I removed that part to make testing easier.

So I'm not completely sure - does the download failure error happens to you or not? If it happens, please post the error code.

@hanakomisa
Copy link
Author

So it gives me "0x80436005" tho.

@mmozeiko
Copy link
Owner

mmozeiko commented Oct 31, 2017

This number means SCE_HTTP_ERROR_RESOLVER_EFORMAT. It looks like DNS server returns invalid response? Are you using custom DNS server on your Vita (henkaku update) or on your router?

@MarioMasta64
Copy link

cannot send http request. this is the error. with the test build it no longer seems to try and recconect after this able. and yea lol seems i did rip. it seems to have the expected behavior you told me in this build where it doesnt continue automatically now. i downloaded something in full (had 3 cannot send http request error's) and thats it. and no dns is not setup

@MarioMasta64
Copy link

if it errors again i will let you know the code

@MarioMasta64
Copy link

MarioMasta64 commented Nov 1, 2017

okay so the error is:
HTTP download error 0x80431068

@mmozeiko
Copy link
Owner

mmozeiko commented Nov 1, 2017

This is SCE_HTTP_ERROR_TIMEOUT.

Connection timed out. There's not much I can do there, you just need to resume it if you want to continue.

Hard to tell why it happens. There can be many reasons - your router, your ISP, something in ISP upstream connection.. who knows.

@fennectech
Copy link

Perhaps you can impliment Auto resume?

@MarioMasta64
Copy link

MarioMasta64 commented Nov 1, 2017

perhaps adding all the error codes people report and what they mean to the readme as a "if this happens it means this" thing. example:

Common Error's
0x80436005, _HTTP_ERROR_RESOLVER_EFORMAT, Try Turning Off DNS.
0x80431068, SCE_HTTP_ERROR_TIMEOUT, Connection Timed Out,

@MarioMasta64
Copy link

auto resume could cause the same error to happen many many times in a row soft-locking the device. so you would need some kind of error counter a timeout of sorts beforehand.plus presing the enter button isnt that hard lol

@MarioMasta64
Copy link

MarioMasta64 commented Nov 2, 2017

cannot send HTTP error 0x80431064, SCE_HTTP_ERROR_BAD_RESPONSE, what does this mean?

@MarioMasta64
Copy link

also inserting usb definitly exits via mtp. im using your build now.

@mmozeiko
Copy link
Owner

mmozeiko commented Nov 2, 2017

From http://www.psdevwiki.com/ps4/NW

Response is invalid // Delayed server response. // Try Internet connection test at [Settings] > [Network] > [Test Internet Connection]. Check that the internet status is valid.

It probably means it cannot parse received http response. Its malformed - something is sending data that cannot be parsed. That's very strange. Almost sounds like your ISP is corrupting http responses in middle.

Can you try testing download from your PC? Set up webserver, place few pkg files on your local machine, and put http URLs to your IP address of PC in pkgi.txt. Then try installing these items in pkgi. And check if you still get similar errors. If yes - then it could be router/vita issue. If not, then its your ISP issue (or ISP<->Sony server issue).

@MarioMasta64
Copy link

MarioMasta64 commented Nov 2, 2017

its probably public wifi trying to redirect me then works on my phones hotspot. and interesting. and for at&t to try to mitm sounds funny but probs realistic lol. "why is all this games coming through this wifi" is probs why its doing it. it doesnt happen in the browser after all.

also maybe consider changing user agent to that of ps store? :D

@fennectech
Copy link

fennectech commented Nov 2, 2017

Babysitting your vita during a 4gb download over slow network is not fun ether. Your auto resume can just delay 5 seconds before attempting to resume to prevent this softlock (resuming in 5. 4. 3. 2. 1. ) or something like that

@mmozeiko
Copy link
Owner

mmozeiko commented Nov 2, 2017

and for at&t to try to mitm sounds funny but probs realistic lol.

Then you will be surprised to learn that this has happened already many times:

https://www.eff.org/deeplinks/2014/11/verizon-x-uidh
http://webpolicy.org/2015/08/25/att-hotspots-now-with-advertising-injection/

@MarioMasta64
Copy link

MarioMasta64 commented Nov 2, 2017

timed auto-resume and a cancel button when error's appear sound like a nice idea :D and wow, didnt know this was a thing, D: sucks man.

@MarioMasta64
Copy link

as a matter of fact. a cancel button on error's would be perfect. rather than just a continue button. the timeout of 5 secs can be added for an auto-resume and bam nice good way to satisfy many requests.

@hanakomisa
Copy link
Author

Afaik, I tried witth 4 different routers, facttory reset my vita and the problem still goes. No router setting has been altered except wifi names.
image

@MarioMasta64
Copy link

it could also be an isp thing too try a different network if you can

@hanakomisa
Copy link
Author

Okay, tried with my uncle's network which is from a different ISP, still no luck.

@hanakomisa
Copy link
Author

hanakomisa commented Nov 3, 2017

Anyway I see @mmozeiko in the discord server, you can hit me up by @Jes - jsyreviews#9627

@fennectech
Copy link

Ether way. I dont like babysitting downloads. That’s why I prefer BitTorrent.

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

No branches or pull requests

5 participants
@mmozeiko @fennectech @MarioMasta64 @hanakomisa and others