What the heck am I doing wrong. As soon as I proxy stream, I get a 503 error, but there are no errors in my logs. tattered-lead-archaeopteryx is the name of my project.
I’m looking at your code, and it’s got a great big
.then with no
.catch. maybe you’re not getting any errors in the logs because you actually aren’t logging them?
you can use
.catch(...) to set up a function to handle errors in your promise chain. see if adding a handler to log it helps with getting the logs in the project log
you just said the magic word
well… I removed the catch to see if any new errors would throw, because no errors were showing up, but I can try it again.
well, I got nothin. maybe it’s different for you. https://tattered-lead-archaeopteryx.glitch.me/watch?v=https://www.youtube.com/watch?v=UA0cCrfMccE&pp=ygUKZ2xpdGNoLmNvbQ%3D%3D try that link. See if it downloads this video: You’re going to build a web app in less than a minute on Glitch.com, for free - YouTube
another weird thing is that if I proxy an mp3 it works, so maybe that’s a hint…
I’m getting this
failed to start application on tattered-lead-archaeopteryx.glitch.me
This is most likely because your project has a code error.
Check your project logs, fix the error and try again.
are there any errors in the project log about it just starting up?
no. it’s so stupid. I have no idea what’s wrong.
okay I remixed it to try some more extensive diagnostics. the oddest thing is that the project is sending
Content-Length: undefined. it seems this line
var contentLength = format.contentLength;
is getting undefined. I tried removing that from the headers, i.e. removing this line
headers["content-length"] = contentLength;
and that at least allowed the response to get to my browser. my remix: server.js – traveling-grass-kick (glitch.com)
- twarped: check if there’s another way to get the content length. or if you can go without it. or if the response from youtube already has it.
- glitch: something is incorrectly saying “failed to start application” when the app provides a malformed response. please consider this a bug, that the message is misleading.
hey, thanks so much, that might actually work