Forbidden no access permission to `/' after app shutdown - ruby

Essentially, when you don't visit my Jekyll application on Heroku for an hour, you see this error message the first time the app fires back up:
Forbidden
no access permission to `/'
WEBrick/1.3.1 (Ruby/1.9.2/2011-07-09) at franklovecchio.herokuapp.com:80
Then, after a page reload, all is magically fine. I don't recall seeing this with my other Jekyll Heroku apps. The source is here: https://github.com/franklovecchio/frank.lovecch.io . Anybody see this and know what the problem is?

Do you only have one web worker? Heroku sites with only one process automatically go idle after an hour of inactivity. Then, when a visitor hits your site, the Jekyll server has to spin up again, but it hasn't actually generated the root index.html file yet, so you get a "forbidden error" (this is what Jekyll's built-in server returns when it hasn't completely generated the site yet).

Related

How to disabled Phusion Passenger for hosting on Plesk? When I refresh web app in VueJS I always have error

My server has Plesk and I have mydomain.com with frontend in Vue and backend in api.mydomain.com with laravel. Before, when I went to mydomain.com/clients and tried to refresh the page, I got an error with Phusion Passenger. I have disabled Phusion Passenger on this domain but I don't remember how I did it.
Now, I have the same problem with the same front and back system. The only difference is that both domains are subdomains, that is, I have front.domain.es and api.domain.es.
If I refresh front.domain.com it works perfectly. If I navigate from the system menu it works fine. But, if I am in front.domain.com/clients for example and I try to refresh page, I get Pushion Passenger error.
Important comment that the system work perfectly, just when you try to refresh the page has this error. On the first example that I comment, now works perfecty without Passenger, I can refresh without problem, but I don't remember how I did it.
I want to disable Phusion Passenger for this hosting on plesk or domain or whatever, I hope you can help me!
Thank you very much!!
Log File:
[ E 2023-02-02 08:44:42.0486 476333/Tf age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /var/www/vhosts/domain.com/front.domain.com: The application process exited prematurely.
Error ID: dbcc318c
Error details saved to: /tmp/passenger-error-BX09me.html
Go in Tools&Settings >> PHP Setting
In top of the page you should find this " Select the PHP handlers you want to make available. You can install additional handlers using the Plesk Installer. "
Follow the link and will take you to Plesk Installer, there you can enable/disable modules including fusion

Heroku pipeline app returns 404: "no such app"

I created three apps in Heroku and added them to a pipeline, but their URLs return a 404.
The apps are named like "app-name-dev", "app-name-stage", and "app-name". On the settings tab of each app, Heroku has given them auto-generated URLs, like "https://app-name-dev.herokuapp.com/", etc. But only the production URL works (the one not ending in -dev or -stage). The other 2 return 404 with the title "no such app".
Anyone know how to get Heroku pipeline apps to load in the browser? My code runs fine -- no errors -- because the production site loads fine. It's just -dev and -stage that won't load. Again, they're at default URLs assigned by Heroku -- no custom domains.
Thanks.
Duh, all I had to do was wait a few hours for some DNS entries to be updated somewhere. All 3 apps are loading now.

Service worker Failed to load resource: net::ERR_UNSAFE_REDIRECT

would you please tell me what i did wrong with my service worker installation, i have those errors appear in chrome console (see the image-1).
The script resource is behind a redirect, which is disallowed. service-worker.js:1
Failed to load resource: net::ERR_UNSAFE_REDIRECT https://harampress.com/post/45/service-worker.js
i use Laravel framework in backend if that could help
just to know that my service-worker.js is in the root of the website, works fine on home page no errors on chrome console, but the moment i try to navigate to a post for example, those two errors appears (see image-2).
knowing that i use sw-precache and sw-toolbox, i generate the service worker useing sw-precache with gulp.
image-1
image-2
see the solutions here on github discussion
the message from the discussion in github that actually answered to my problem :
What #wanderview means is that when you do
navigator.serviceWorker.register('/sw.js')
The actual requesting URL is the sw.js located in the root
but when you do
navigator.serviceWorker.register('sw.js')
This is actually a Relative URL so what you actually request might be /post/blah/sw.js and your server might treat it as 404 and do some redirect.

Why is my meteor app getting these errors on firefox but not other browsers?

The web app that I am building in meteor works in chrome and I.E.(Other than a UI bug in I.E.) but it starts acting strange in Firefox. When I run it on my localhost and on the deployment to meteor.com, I don't get any errors in the console in the browsers' developer tools.
When I run it in Firefox, things start acting weird. On Mac OSX, if I run the app on my localhost and open it in FF it is just fine. However, when I open up the app that deployed to meteor.com via meteor deploy [my-app-url].com, I get the following errors but I can still use everything in my app:
Error 1:
mutating the [[Prototype]] of an object will cause your code to run very slowly;
instead create the object with the correct initial [[Prototype]] value using Object.create
Error 2:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource
at https://ddp--3071-[my-app-url].com/sockjs/info?cb=v9pygo9mzn.
(Reason: CORS request failed).
While right now I am not able to figure out what is causing the first error, I am mostly worried about the second error.
When I open up the app from it's deployment in FF on Windows 8, I get the first error once, and then I get the second error repeatedly and the app never loads(it just stays on my loading template from the iron router). My deployed app runs just fine on Chrome and I.E.
I don't send any kind of request to another server in my app, so I am not sure why I am getting a CORS request error. I have not set up SSL or began to make a certificate yet, so I am not sure if this could be causing this kind of error in FF as I got another exception on my login page in FF on my localhost saying that I shouldn't have password elements when I'm not using https.
Does anyone know what could be causing this?
Sorry that I provide any code, as I don't know what code I would post to solve this problem since I don't actually request anything from another server in code that I have written.
Thanks in advance for any responses!
If anyone is interested, it seems as if my combination of the aldeed:collectio2 package and one of my other packages was the cause of my problems. I removed this package and my issues went away.

A bizzare unsolvable Google Checkout issue occurs in certain server

I have a site running in Hostgator shared-hosting account with Google Checkout (GC) working since v1.2 - when the site first gone live, the GC works out-of-the-box.
Recently I moved the site to a VPS server and GC stopped working with this error:
Google Checkout: Invalid response from Google Checkout server
I thought it couldn’t be an issue with Magento’s Google Checkout integration but the new VPS server or maybe SSL cert that require further testing, so I moved the site back to the shared server (the GC starts working again!), and then setup a test site with a valid SSL cert, a working GC account.
3 weeks had passed still GC wouldn’t work in the VPS server; I have tried/searched/tested all possibilities along with the help from Hostgator’s support, and we have exhausted all options to a point that we believe it has nothing to do with SSL cert setup nor the server configuration.
From the above error and the log from "var/log/payment_googlecheckout" I reckon it couldn’t redirect to checkout.google.com/schema/2
<order-processing-support>
<request-initial-auth-details>true</request-initial-auth-details>
</order-processing-support>
</checkout-shopping-cart>
[dir] => out
It seems a number of people had experienced the same error before but no one seems to be able to find the cause, and I am starting to think it’s a bug lies on Magento’s Google Checkout module.
If you had this issue before and had it solved, please share. Thanks!
This person seems to have had a similar problem and it was due to an issue with their cURL installation. Have you compared versions from your shared hosting with your VPS? I'd compare: PHP versions, PHP extension versions, php.ini settings, and versions of cURL itself.
If none of that bring about any results, open up app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Abstract.php and modify the _call() method like this:
// app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Abstract.php
public function _call($xml)
{
// ... snip ...
$result = #simplexml_load_string($response);
if (!$result) {
// Add this...
Mage::log(var_export($response, true), null, 'google_checkout_debug.log', true);
// ... end
$result = simplexml_load_string('<error><error-message>Invalid response from Google Checkout server</error-message></error>');
}
With this, you will have the exact response from Google logged to var/log/google_checkout_debug.log. Use this to debug what might be going wrong (perhaps there is another error message embedded in the response).
Just remember to remove the code when you're done!

Resources