-
Notifications
You must be signed in to change notification settings - Fork 121
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
Image not downloaded correctly #9
Comments
Same issue. Also, I'm sure about two of these possible reasons.
@mixn Please help to let us try this awesome thing out. |
Thanks for reporting, @livissnack. :) It’s really hard for me to debug this in any way, since this is the default error. What OS are you both on? @HarshitKaushik I haven’t tested it on Windows yet… should work for macOS and Linux. :) |
@yedhink Where does the full URL of |
@mixn oops didn't see that it has been cut off . here's the full link :- |
@mixn I am on MacOS Sierra Version 10.12.6 Also, shows the same default error to me. Should I try with -o flag? |
@yedhink Have you tried the Troubleshooting section for Linux machines mentioned here? https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md#chrome-headless-doesnt-launch @HarshitKaushik Interesting. I’ve only tested it on High Sierra so far, is an upgrade for you possible? Or no chance? @ all I’ve added additional error reporting on branch
Also, running |
same issue here. const browser = await puppeteer.launch({
headless: false,
args: ['--no-sandbox', '--disable-setuid-sandbox']
}); Fixed the issue, but as stated in the chrome and puppetteer docs this would be a potential security risk! @mixn I would like to create a PR with a new simple |
My good friend and colleague @Sneezoo was so nice to not just test this on his Linux machine, but also apparently fix it. ❤️ Thanks so much, Flotto — super appreciated! I’ve reviewed and run the whole thing with It’d be good if @livissnack @HarshitKaushik @yedhink could do the same and give feedback prior to merging. Please do this
🤞 🤞 🤞 |
I tried with the change in headless-visit.js and from bug/9 branch @mixn . Still it seems to be not working with MasOS Sierra Version 10.12.6. |
@HarshitKaushik Could you try it with a different save location on that branch? E.g. |
@mixn tried and same error. :( |
@HarshitKaushik Out of curiosity and to see if this is related, pls try this #9 (comment) and report back. Thank you. :) |
@mixn I think I have found the issue. Additional info: Error: ENOENT: no such file or directory, rename '/Users/harshit/Documents/home-workspace/carbon-now-cli/carbon.png' -> '/Users/harshit/Documents/home-workspace/carbon-now-cli/_index-616b5da3db.png' Additional info: Error: ENOENT: no such file or directory, rename '/Users/harshit/Documents/home-workspace/carbon-now-cli/carbon.png' -> '/Users/harshit/Documents/home-workspace/carbon-now-cli/_index-e26146cc4b.png' In file headless-visit.test.js, defaultDownloadName is expecting carbon.png but we are getting an image name with "_index-" as prefix and then some hash. |
@HarshitKaushik The file is first downloaded as |
Hi @mixn , thanks for letting me know. I'll upgrade to High Sierra and update later on this issue. :) |
Any progress on this issue? |
@mittalyashu No proper feedback has been given so far and I unfortunately can’t reproduce this. Try this please and report back. :) |
@mixn Here's the feedback
|
@mittalyashu That looks very similar to this, the error is the same + it’s on Windows, even though it is 7 — it’s Windows. 😅 Also doesn’t seem to be the same problem as others in this thread were experiencing, since their problems seem to be related to this issue. |
Here's the issue on chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=831887 |
@mixn Apology for the delay on the follow-up to this issue. I upgraded up Mac to High Sierra V 10.13.6 and still facing the same issue and the same error. |
@mixn Please see this commit which fixes the image download issue people are having (including me) by using Chromium's screenshot API. |
@molnarmark Thanks for your input and for playing with this, I appreciate it. :) I am aware of the screenshot API and have tried using it in the very beginning but abandoned the idea pretty quickly due to the unacceptable image quality it resulted in. Without screenshot API ( Using screenshot API ( But your comment made me research this further and lead me to this and this and it did work. :) With screenshot API + I will research this further, since it would likely mean no It’s also good to see that I’ll most likely hotfix this tomorrow or Monday when back from ⛰🏃. I’m working on #12 on a separate branch atm and want to avoid conflicts as much as possible. 😄 PS: I can’t believe I typed this on a 📱. 🙄 😅 |
@mixn Glad to be of help. :) Carbon CLI was a planned project for me, but had no time, so I'm glad I can help. 👍 |
Ok, here it goes. :) The download is performed differently now, when Please do this:
This should lead to an image being downloaded that has the same quality as without having used Regular usage: Usage with @molnarmark, @mittalyashu, @HarshitKaushik, @yedhink, @livissnack |
@mixn @molnarmark working for me 😄😄😄 |
@mixn Works totally fine. 😄 Hopefully this gets put into the next branch and I can continue working on my slideshow tool. 👍 |
@mixin got an error, in both cases (-h). |
@mittalyashu Ups, I forgot to add this. But honestly, that shouldn’t have anything to do with a download failing. But we’ll see — I never trust Windows blindly. 😄 Pls repeat the steps @mittalyashu or just pull the changes inside your already existing, cloned repo and run the If it then doesn’t work either, I highly suggest for you to just download Puppeteer and play around with it a bit, trying to screenshot something, open pages, etc. I feel like this hasn’t that much more to do with carbon-now-cli from that point onwards. Edit: Also, I’m now noticing you’re apparently running this via |
After re-trying few times, and it worked finally. InputOutputAdditional informationThis command doesn't work When I use this When the file is written to the disk, it is renamed from Why does the image has an black line on the left side? |
@mittalyashu Finally! 👏 Glad it worked.
Because
Pretty obvious, I think 😄 — to not overwrite already downloaded images. :) Also, this is a preparation for #5 , the images need to have different names. |
👍👍👍👍👍 But what about the image have black line at the left side. |
@mittalyashu It seems to be related to the font used. Doesn’t occur to me with |
@mittalyashu Ok, I just fixed this for me — it works with every font now without the black Using Hack: Using Droid Sans Mono: Using IBM Plex Mono: |
Yup it worked. 🎉🎉🎉 Found another problem 😓
Here's the output with no padding (vertical or horizontal) |
@mittalyashu Great! 🎉 About time. 😉 Also, be aware that this thread is originally only for failed downloads, not follow-up stuff. I will merge I’ll still address your problem… what you want is a valid CSS unit, so what you’re looking for here is |
Yeah, finally it working. Now you can close this issue. |
@mixn @mittalyashu Really appreciate the help with investigating and fixing the issue. This thing is working for me now. And feels awesome! 😉 |
As a TL;DR for everyone, who might eventually end up here somehow: I published This flag avoids Puppeteer’s experimental
I am very happy to close this big issue thread and want to thank everyone who helped and contributed to fixing this — it’s very much appreciated! 🎉 @molnarmark @Sneezoo @mittalyashu @HarshitKaushik @livissnack @yedhink |
While the fix was working for me @mixn, I went through an OS switch (Mint -> Elementary), and got a different error message:
Adding const browser = await puppeteer.launch({
headless,
args: ['--no-sandbox']
}); |
@molnarmark I assumed this was the case, since I’ve had it happen in another project a few days ago. :) I’ll most likely add a Or, he can add it if he wants? :) Don’t want to take away from his work… I was thinking no shorthand, e.g. only One day I will grow up and change OS more often like a real hAxX0r, too… @molnarmark 👑😎 |
I'm having the same issue on CentOs7:
|
This fix my issue on my ubuntu box:
|
Error: Sending code to https://carbon.now.sh went wrong.
This is mostly due to:
– Insensical input like
--start 10 --end 2
– Carbon being down or taking too long to respond
– Your internet connection not working or being too slow
The text was updated successfully, but these errors were encountered: