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

Unhandled promises while starting up the project local #1574

Closed
ArshErgon opened this issue Oct 28, 2022 · 6 comments
Closed

Unhandled promises while starting up the project local #1574

ArshErgon opened this issue Oct 28, 2022 · 6 comments
Labels

Comments

@ArshErgon
Copy link
Contributor

Error:

> start
> bin/serve-site.js

Parsing content
Requesting URL "https://blog.remoteintech.company/"
Requesting URL "https://s0.wp.com/_static/??-eJyNjt1uwjAMRl9oiemGWriY9ixpYkUG50dxAs..."
Requesting URL "https://s0.wp.com/wp-includes/css/dist/block-library/classic.min.cs..."
Requesting URL "https://s1.wp.com/_static/??/wp-content/mu-plugins/core-compat/wp-m..."
Requesting URL "https://s1.wp.com/_static/??-eJyVUO1qwzAMfKFpImOk7Mfos7iqmjixLWPLlL..."
Requesting URL "https://s2.wp.com/wp-content/mu-plugins/global-print/global-print.c..."
Requesting URL "https://s0.wp.com/wp-content/themes/h4/global.css?m=1420737423h&css..."
Requesting URL "https://s0.wp.com/?custom-css=1&csblog=9eXnX&cscache=6&csrev=6"
Requesting URL "https://s0.wp.com/_static/??-eJx9jNsKwjAMhl/ILky0sAvxWUobZrYegkkpe3..."
Unhandled promise rejection: Error: HTTP response code 404 for URL: https://s0.wp.com/wp-includes/css/dist/block-library/classic.min.css?ver=1
    at request (/home/arshergon/Desktop/OpenSource/remote-jobs/bin/build-site.js:77:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Promise.all (index 1)
    at async buildSite (/home/arshergon/Desktop/OpenSource/remote-jobs/bin/build-site.js:152:2)

https://s0.wp.com/wp-includes/css/dist/block-library/classic.min.css?ver=1 this URL doesn't exit on web

@ArshErgon ArshErgon added the bug label Oct 28, 2022
@dougaitken
Copy link
Member

@ArshErgon Can you try again please?

@ArshErgon
Copy link
Contributor Author

Wow, it works. Thanks!

@dougaitken
Copy link
Member

I did nothing which is odd, because newer PRs were working but looks like it's broken again.

I don't know enough about the site to handle this myself so I'll need to fix it properly soon.

@ArshErgon
Copy link
Contributor Author

@dougaitken I think the site sleeps for some time, when it sleeps the request shows 404. Similar like heroku free dynos

Dyno sleeping
If an app has a free web dyno, and that dyno receives no web traffic in a 30-minute period, it will sleep. In addition to the web dyno sleeping, the worker dyno (if present) will also sleep.

Free web dynos do not consume free dyno hours while sleeping.

If a sleeping web dyno receives web traffic, it will become active again after a short delay (assuming your account has free dyno hours available).

Apps that only utilise a free worker dyno do not sleep, because they do not respond to web requests. Be mindful of this as they may run 24/7 and consume from your pool of hours.

Occasionally, monitoring services such as Pingdom or New Relic monitoring can prevent a web dyno from sleeping. Run heroku logs -t to view your app’s logs to see if this is the case and turn off these services if it is happening.

@dougaitken
Copy link
Member

it's not though @ArshErgon - that URL is WordPress.com, it never sleeps. Also the ones before it in the log show as expected.

@ArshErgon
Copy link
Contributor Author

Well, in this file https://github.com/remoteintech/remote-jobs/blob/08561b7370307a00818fd2f786273e09ad9e1601/bin/build-site.js at line 58 @nylen has mentioned this issue (nodejs/node#17871) I think it's a node issue, or when fetching the URL https://s0.wp.com/wp-includes/css/dist/block-library/classic.min.css?ver=1 the code brokes.

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

No branches or pull requests

2 participants