Amazon S3 Bucket 403 Forbidden - mysql

I'm following Michael Hartl's Rails tutorial and I'm trying to get the user to be able to upload images. It works fine on the rails server, but when I deploy to Heroku it uses S3 to handle the images. The upload fails with a 403 error. Here are the logs:
2015-01-29T10:31:39.129339+00:00 app[web.1]: (2.0ms) SELECT COUNT(*) FROM "microposts" WHERE (user_id = 101)
2015-01-29T10:31:39.125076+00:00 app[web.1]: Rendered shared/_error_messages.html.erb (0.1ms)
2015-01-29T10:31:39.138938+00:00 app[web.1]: CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 101]]
2015-01-29T10:31:39.155276+00:00 app[web.1]: Rendered shared/_feed.html.erb (28.9ms)
2015-01-29T10:31:39.169708+00:00 app[web.1]: Rendered layouts/_shim.html.erb (0.1ms)
2015-01-29T10:31:39.183946+00:00 app[web.1]: Rendered layouts/_footer.html.erb (0.1ms)
2015-01-29T10:31:39.197655+00:00 heroku[router]: at=info method=GET path="/" host=mysterious-oasis-7816.herokuapp.com request_id=4c2cbe41-3b26-4e37-9ef9-f07ec6e963a6 fwd="76.102.7.62" dyno=web.1 connect=3ms service=109ms status=200 bytes=4525
2015-01-29T10:31:39.369193+00:00 heroku[router]: at=info method=GET path="/assets/application-3ac07d30cc871c78233de32e71487cf3.js" host=mysterious-oasis-7816.herokuapp.com request_id=6cd2bfa0-424b-4456-9cfb-822b515d3bcc fwd="76.102.7.62" dyno=web.1 connect=1ms service=4ms status=304 bytes=241
2015-01-29T10:31:39.365503+00:00 heroku[router]: at=info method=GET path="/assets/application-cbf43ddf42ea7f553995264124e0cacf.css" host=mysterious-oasis-7816.herokuapp.com request_id=d7df3d86-0cf4-444b-bce8-8b164c2dbef6 fwd="76.102.7.62" dyno=web.1 connect=1ms service=3ms status=304 bytes=227
2015-01-29T10:31:39.598181+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=mysterious-oasis-7816.herokuapp.com request_id=386ad300-9cd9-43e7-8112-f918d7c3a7df fwd="76.102.7.62" dyno=web.1 connect=2ms service=2ms status=304 bytes=156
2015-01-29T10:31:46.517236+00:00 app[web.1]: Started POST "/microposts" for 76.102.7.62 at 2015-01-29 10:31:46 +0000
2015-01-29T10:31:46.519545+00:00 app[web.1]: Processing by MicropostsController#create as HTML
2015-01-29T10:31:46.519617+00:00 app[web.1]: Parameters: {"utf8"=>"✓", "authenticity_token"=>"p60LlipkvgDwLSAR8oJq+efj9yM0jYixbkwxWxN2v3sojEQFzbMhTVio4pXOwZehVpGQYfgYdnKgHRQomE/txg==", "micropost"=>{"content"=>"Sup", "picture"=>#<ActionDispatch::Http::UploadedFile:0x007f77ae5d1d80 #tempfile=#<Tempfile:/tmp/RackMultipart20150129-12-b07k07.jpg>, #original_filename="10582291_709123052488481_30008247_n.jpg", #content_type="image/jpeg", #headers="Content-Disposition: form-data; name=\"micropost[picture]\"; filename=\"10582291_709123052488481_30008247_n.jpg\"\r\nContent-Type: image/jpeg\r\n">}, "commit"=>"Post"}
2015-01-29T10:31:46.521720+00:00 app[web.1]: User Load (1.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 101]]
2015-01-29T10:31:46.836156+00:00 app[web.1]: (1.5ms) BEGIN
2015-01-29T10:31:46.841095+00:00 app[web.1]: SQL (1.7ms) INSERT INTO "microposts" ("content", "picture", "user_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["content", "Sup"], ["picture", "10582291_709123052488481_30008247_n.jpg"], ["user_id", 101], ["created_at", "201
5-01-29 10:31:46.837765"], ["updated_at", "2015-01-29 10:31:46.837765"]]
2015-01-29T10:31:48.433575+00:00 heroku[router]: at=info method=POST path="/microposts" host=mysterious-oasis-7816.herokuapp.com request_id=d7e1b8ee-3e5d-45ef-9578-4f242fd160db fwd="76.102.7.62" dyno=web.1 connect=1ms service=2239ms status=500 bytes=1786
2015-01-29T10:31:48.427961+00:00 app[web.1]: (1.3ms) ROLLBACK
2015-01-29T10:31:48.431863+00:00 app[web.1]:
2015-01-29T10:31:48.431866+00:00 app[web.1]: Excon::Errors::Forbidden (Expected(200) <=> Actual(403 Forbidden)
2015-01-29T10:31:48.431868+00:00 app[web.1]: excon.error.response
2015-01-29T10:31:48.431870+00:00 app[web.1]: :body => "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>2E3F56207B398181</RequestId><HostId>XIDq0YLLZd8ZdGB1mTuUiofj5vh0V4lt5hb/jow79dysteI26fEr/gNMpGqF5qCv0zPmFiEYtCY=</HostId></Error>"
2015-01-29T10:31:48.431871+00:00 app[web.1]: :headers => {
2015-01-29T10:31:48.431873+00:00 app[web.1]: "Connection" => "close"
2015-01-29T10:31:48.431874+00:00 app[web.1]: "Content-Type" => "application/xml"
2015-01-29T10:31:48.431875+00:00 app[web.1]: "Date" => "Thu, 29 Jan 2015 10:31:47 GMT"
2015-01-29T10:31:48.431878+00:00 app[web.1]: "x-amz-id-2" => "XIDq0YLLZd8ZdGB1mTuUiofj5vh0V4lt5hb/jow79dysteI26fEr/gNMpGqF5qCv0zPmFiEYtCY="
2015-01-29T10:31:48.431879+00:00 app[web.1]: "x-amz-request-id" => "2E3F56207B398181"
2015-01-29T10:31:48.431881+00:00 app[web.1]: }
2015-01-29T10:31:48.431882+00:00 app[web.1]: :local_address => "172.17.38.98"
2015-01-29T10:31:48.431883+00:00 app[web.1]: :local_port => 34183
2015-01-29T10:31:48.431885+00:00 app[web.1]: :reason_phrase => "Forbidden"
2015-01-29T10:31:48.431877+00:00 app[web.1]: "Server" => "AmazonS3"
2015-01-29T10:31:48.431890+00:00 app[web.1]: app/controllers/microposts_controller.rb:7:in `create'
2015-01-29T10:31:48.431891+00:00 app[web.1]:
2015-01-29T10:31:48.431892+00:00 app[web.1]:
2015-01-29T10:31:48.431886+00:00 app[web.1]: :remote_ip => "54.231.160.162"
2015-01-29T10:31:48.431887+00:00 app[web.1]: :status => 403
2015-01-29T10:31:48.431889+00:00 app[web.1]: ):
2015-01-29T10:31:48.429838+00:00 app[web.1]: Completed 500 Internal Server Error in 1910ms
2015-01-29T10:46:55.496986+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=mysterious-oasis-7816.herokuapp.com request_id=2a227f3f-20da-405f-b150-f4e4cbc62c0c fwd="76.102.7.62" dyno=web.1 connect=1ms service=1ms status=304 bytes=156
2015-01-29T10:46:57.592699+00:00 app[web.1]: Processing by MicropostsController#create as HTML
2015-01-29T10:46:57.592801+00:00 app[web.1]: Parameters: {"utf8"=>"✓", "authenticity_token"=>"p60LlipkvgDwLSAR8oJq+efj9yM0jYixbkwxWxN2v3sojEQFzbMhTVio4pXOwZehVpGQYfgYdnKgHRQomE/txg==", "micropost"=>{"content"=>"Sup", "picture"=>#<ActionDispatch::Http::UploadedFile:0x007f77b148e678 #tempfile=#<Tempfile:/tmp/RackMultipart20150129-6-kbjdeu.jpg>, #original_filename="10582291_709123052488481_30008247_n.jpg", #content_type="image/jpeg", #headers="Content-Disposition: form-data; name=\"micropost[picture]\"; filename=\"10582291_709123052488481_30008247_n.jpg\"\r\nContent-Type: image/jpeg\r\n">}, "commit"=>"Post"}
2015-01-29T10:46:57.595260+00:00 app[web.1]: User Load (1.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 101]]
2015-01-29T10:46:57.589391+00:00 app[web.1]: Started POST "/microposts" for 76.102.7.62 at 2015-01-29 10:46:57 +0000
2015-01-29T10:46:57.898731+00:00 app[web.1]: (1.4ms) BEGIN
2015-01-29T10:46:57.906703+00:00 app[web.1]: SQL (2.1ms) INSERT INTO "microposts" ("content", "picture", "user_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["content", "Sup"], ["picture", "10582291_709123052488481_30008247_n.jpg"], ["user_id", 101], ["created_at", "2015-01-29 10:46:57.900611"], ["updated_at", "2015-01-29 10:46:57.900611"]]
2015-01-29T10:46:59.548010+00:00 heroku[router]: at=info method=POST path="/microposts" host=mysterious-oasis-7816.herokuapp.com request_id=e7867249-ff62-4fa0-bf0e-9dadd9134640 fwd="76.102.7.62" dyno=web.1 connect=1ms service=2273ms status=500 bytes=1786
2015-01-29T10:46:59.542346+00:00 app[web.1]: (1.4ms) ROLLBACK
2015-01-29T10:46:59.546576+00:00 app[web.1]:
2015-01-29T10:46:59.546579+00:00 app[web.1]: Excon::Errors::Forbidden (Expected(200) <=> Actual(403 Forbidden)
2015-01-29T10:46:59.546581+00:00 app[web.1]: excon.error.response
2015-01-29T10:46:59.546583+00:00 app[web.1]: :body => "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>6B6A73213C176F40</RequestId><HostId>QDnWZ627/2/Wuf7z4nuQnS/u+ysezUG/o2IqDnO9hgAJBJF+H3h4uexFerBeON2V</HostId></Error>"
2015-01-29T10:46:59.546584+00:00 app[web.1]: :headers => {
2015-01-29T10:46:59.546586+00:00 app[web.1]: "Connection" => "close"
2015-01-29T10:46:59.546587+00:00 app[web.1]: "Content-Type" => "application/xml"
2015-01-29T10:46:59.546589+00:00 app[web.1]: "Date" => "Thu, 29 Jan 2015 10:46:58 GMT"
2015-01-29T10:46:59.546591+00:00 app[web.1]: "Server" => "AmazonS3"
2015-01-29T10:46:59.546593+00:00 app[web.1]: "x-amz-id-2" => "QDnWZ627/2/Wuf7z4nuQnS/u+ysezUG/o2IqDnO9hgAJBJF+H3h4uexFerBeON2V"
2015-01-29T10:46:59.546594+00:00 app[web.1]: "x-amz-request-id" => "6B6A73213C176F40"
2015-01-29T10:46:59.546595+00:00 app[web.1]: }
2015-01-29T10:46:59.546597+00:00 app[web.1]: :local_address => "172.17.38.98"
2015-01-29T10:46:59.546598+00:00 app[web.1]: :local_port => 47100
2015-01-29T10:46:59.546601+00:00 app[web.1]: :remote_ip => "54.231.164.162"
2015-01-29T10:46:59.546600+00:00 app[web.1]: :reason_phrase => "Forbidden"
2015-01-29T10:46:59.546603+00:00 app[web.1]: :status => 403
2015-01-29T10:46:59.546604+00:00 app[web.1]: ):
2015-01-29T10:46:59.546606+00:00 app[web.1]: app/controllers/microposts_controller.rb:7:in `create'
2015-01-29T10:46:59.546607+00:00 app[web.1]:
2015-01-29T10:46:59.546608+00:00 app[web.1]:
2015-01-29T10:46:59.544420+00:00 app[web.1]: Completed 500 Internal Server Error in 1951ms
2015-01-29T10:47:51.464274+00:00 app[web.1]: Started POST "/microposts" for 76.102.7.62 at 2015-01-29 10:47:51 +0000
2015-01-29T10:47:51.468398+00:00 app[web.1]: Processing by MicropostsController#create as HTML
2015-01-29T10:47:51.473171+00:00 app[web.1]: User Load (1.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 101]]
2015-01-29T10:47:51.468507+00:00 app[web.1]: Parameters: {"utf8"=>"✓", "authenticity_token"=>"p60LlipkvgDwLSAR8oJq+efj9yM0jYixbkwxWxN2v3sojEQFzbMhTVio4pXOwZehVpGQYfgYdnKgHRQomE/txg==", "micropost"=>{"content"=>"Sup", "picture"=>#<ActionDispatch::Http::UploadedFile:0x007f77ae6c1358 #tempfile=#<Tempfile:/tmp/RackMultipart20150129-9-6wmavu.jpg>, #original_filename="10582291_709123052488481_30008247_n.jpg", #content_type="image/jpeg", #headers="Content-Disposition: form-data; name=\"micropost[picture]\"; filename=\"10582291_709123052488481_30008247_n.jpg\"\r\nContent-Type: image/jpeg\r\n">}, "commit"=>"Post"}
2015-01-29T10:47:51.786456+00:00 app[web.1]: (1.4ms) BEGIN
2015-01-29T10:47:51.794299+00:00 app[web.1]: SQL (2.0ms) INSERT INTO "microposts" ("content", "picture", "user_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["content", "Sup"], ["picture", "10582291_709123052488481_30008247_n.jpg"], ["user_id", 101], ["created_at", "2015-01-29 10:47:51.788551"], ["updated_at", "2015-01-29 10:47:51.788551"]]
2015-01-29T10:47:53.555368+00:00 heroku[router]: at=info method=POST path="/microposts" host=mysterious-oasis-7816.herokuapp.com request_id=86847ddb-74ec-4800-a18f-a07f2431cef9 fwd="76.102.7.62" dyno=web.1 connect=1ms service=2197ms status=500 bytes=1786
2015-01-29T10:47:53.550620+00:00 app[web.1]: (1.3ms) ROLLBACK
2015-01-29T10:47:53.554579+00:00 app[web.1]:
2015-01-29T10:47:53.554582+00:00 app[web.1]: Excon::Errors::Forbidden (Expected(200) <=> Actual(403 Forbidden)
2015-01-29T10:47:53.554584+00:00 app[web.1]: excon.error.response
2015-01-29T10:47:53.554587+00:00 app[web.1]: :headers => {
2015-01-29T10:47:53.554586+00:00 app[web.1]: :body => "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>6A39B8D8600F9D09</RequestId><HostId>cRac47ERlbGbSfrsTNt/fF+zt5CvM7Io8HZXU5A27l207MleOMCsGIRdmElP0Kk4</HostId></Error>"
2015-01-29T10:47:53.554589+00:00 app[web.1]: "Connection" => "close"
2015-01-29T10:47:53.554590+00:00 app[web.1]: "Content-Type" => "application/xml"
2015-01-29T10:47:53.554593+00:00 app[web.1]: "Server" => "AmazonS3"
2015-01-29T10:47:53.554592+00:00 app[web.1]: "Date" => "Thu, 29 Jan 2015 10:47:53 GMT"
2015-01-29T10:47:53.554595+00:00 app[web.1]: "x-amz-id-2" => "cRac47ERlbGbSfrsTNt/fF+zt5CvM7Io8HZXU5A27l207MleOMCsGIRdmElP0Kk4"
2015-01-29T10:47:53.554612+00:00 app[web.1]: "x-amz-request-id" => "6A39B8D8600F9D09"
2015-01-29T10:47:53.554613+00:00 app[web.1]: }
2015-01-29T10:47:53.554619+00:00 app[web.1]: :remote_ip => "54.231.165.74"
2015-01-29T10:47:53.554620+00:00 app[web.1]: :status => 403
2015-01-29T10:47:53.554623+00:00 app[web.1]: app/controllers/microposts_controller.rb:7:in `create'
2015-01-29T10:47:53.554622+00:00 app[web.1]: ):
2015-01-29T10:47:53.554615+00:00 app[web.1]: :local_address => "172.17.38.98"
2015-01-29T10:47:53.554616+00:00 app[web.1]: :local_port => 40757
2015-01-29T10:47:53.554618+00:00 app[web.1]: :reason_phrase => "Forbidden"
2015-01-29T10:47:53.554625+00:00 app[web.1]:
2015-01-29T10:47:53.554626+00:00 app[web.1]:
2015-01-29T10:47:53.552507+00:00 app[web.1]: Completed 500 Internal Server Error in 2084ms
Please help :(

I had a similar problem, it was a matter of formatting the url differently depending on the region you create your bucket in.
You can sometimes use this:
https://s3-us-west-2.amazonaws.com/
and some times you have to use this:
https://bucket-name.s3-us-west-2.amazonaws.com/
I do not know which format you are using, but try the other one :)
For more info on the urls to access diffrent regions look at this:
http://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteEndpoints.html

Thanks for the help guys, I figured it out. It turns out it was something really silly, I didn't set the allowed users to registered users.

Related

'Node Api using mysql' deployed on heroku crashes after some time Interval

I have created a Node API using MySQL and deployed it on Heroku. But after every 20-25 minutes it shows 'Application error' and I have to do 'Heroku restart' again to fetch data from API. My API calls work fine when runs on localhost:port_no
Heroku Logs
>2021-06-26T04:15:47.965652+00:00 heroku[web.1]: State changed from starting to up
2021-06-26T04:20:47.759660+00:00 app[web.1]: events.js:353
2021-06-26T04:20:47.759669+00:00 app[web.1]: throw er; // Unhandled 'error' event
2021-06-26T04:20:47.759670+00:00 app[web.1]: ^
2021-06-26T04:20:47.759670+00:00 app[web.1]:
2021-06-26T04:20:47.759670+00:00 app[web.1]: Error: Connection lost: The server closed the connection.
2021-06-26T04:20:47.759671+00:00 app[web.1]: at Protocol.end (/app/node_modules/mysql/lib/protocol/Protocol.js:112:13)
2021-06-26T04:20:47.759672+00:00 app[web.1]: at Socket.<anonymous> (/app/node_modules/mysql/lib/Connection.js:94:28)
2021-06-26T04:20:47.759672+00:00 app[web.1]: at Socket.<anonymous> (/app/node_modules/mysql/lib/Connection.js:526:10)
2021-06-26T04:20:47.759673+00:00 app[web.1]: at Socket.emit (events.js:388:22)
2021-06-26T04:20:47.759673+00:00 app[web.1]: at endReadableNT (internal/streams/readable.js:1336:12)
2021-06-26T04:20:47.759674+00:00 app[web.1]: at processTicksAndRejections (internal/process/task_queues.js:82:21)
2021-06-26T04:20:47.759674+00:00 app[web.1]: Emitted 'error' event on Connection instance at:
2021-06-26T04:20:47.759676+00:00 app[web.1]: at Connection._handleProtocolError (/app/node_modules/mysql/lib/Connection.js:423:8)
2021-06-26T04:20:47.759677+00:00 app[web.1]: at Protocol.emit (events.js:376:20)
2021-06-26T04:20:47.759678+00:00 app[web.1]: at Protocol._delegateError (/app/node_modules/mysql/lib/protocol/Protocol.js:398:10)
2021-06-26T04:20:47.759678+00:00 app[web.1]: at Protocol.end (/app/node_modules/mysql/lib/protocol/Protocol.js:116:8)
2021-06-26T04:20:47.759679+00:00 app[web.1]: at Socket.<anonymous> (/app/node_modules/mysql/lib/Connection.js:94:28)
2021-06-26T04:20:47.759679+00:00 app[web.1]: [... lines matching original stack trace ...]
2021-06-26T04:20:47.759679+00:00 app[web.1]: at processTicksAndRejections (internal/process/task_queues.js:82:21) {
2021-06-26T04:20:47.759680+00:00 app[web.1]: fatal: true,
2021-06-26T04:20:47.759680+00:00 app[web.1]: code: 'PROTOCOL_CONNECTION_LOST'
2021-06-26T04:20:47.759681+00:00 app[web.1]: }
2021-06-26T04:20:47.817878+00:00 heroku[web.1]: Process exited with status 1
2021-06-26T04:20:47.876488+00:00 heroku[web.1]: State changed from up to crashed
My connection.js file
const mysql = require('mysql');
var sqlConnection = mysql.createConnection({
host: ##,
user:##,
password: ##,
database: ##,
multipleStatements: true
});
sqlConnection.connect((err) => {
if (!err) {
console.log("Connected");
} else {
console.log("Connection Failed");
}
})
module.exports = sqlConnection;
```

Application unable to work due to rate limiter

I have tried to implement rate limiter on server.js but it gives this error below making the website crash. Did I implement the rate limiter wrongly? I have tried changing the rate and apiLimiter line position but it didnt work. Below server.js is the error log. As this is the first time I encounter this error log issue, I am not sure where to look for the issue. This is my first time implementing rate limiter in server.js so please advice.
Application error
An error occurred in the application and your page could not be served
server.js
import express from 'express'
import path from 'path'
import mongoose from 'mongoose'
import cors from 'cors'
import rateLimit from 'express-rate-limiter'
import config from './config'
import userRoute from './routes/userRoute'
import uploadRoute from './routes/uploadRoute'
import productRoute from './routes/productRoute'
import orderRoute from './routes/orderRoute'
const mongodbUrl = config.MONGODB_URL;
mongoose.connect(mongodbUrl, {
useNewUrlParser: true,
useUnifiedTopology: true,
useCreateIndex: true,
}).catch((error) => console.log(error.reason))
const app = express()
const apiLimiter = rateLimit({
windowMs: 15 * 60 * 1000, // 15 minutes
max: 100
})
app.use(cors())
app.use(express.json())
app.use('/api/', apiLimiter)
app.use('/api/users', userRoute)
app.use('/api/uploads', uploadRoute)
app.use('/api/products', productRoute)
app.use('/api/orders', orderRoute)
app.get('/api/paypal/clientId', (req, res) => {
res.send({ clientId: config.PAYPAL_CLIENT_ID })
})
app.use('/uploads', express.static(path.join(__dirname, '/../uploads')))
app.use(express.static(path.join(__dirname, '/../frontend')))
app.get('*', (req, res) => {
res.sendFile(path.join(`${__dirname}/../frontend/index.html`))
})
// eslint-disable-next-line no-unused-vars
app.use((err, req, res, next) => {
const status = err.name && err.name === 'ValidationError' ? 400 : 500
res.status(status)
res.send({ message: err.message })
})
2021-05-29T05:11:02.707267+00:00 app[web.1]: this.__configuration = this.__buildConfiguration(options);
2021-05-29T05:11:02.707268+00:00 app[web.1]: ^
2021-05-29T05:11:02.707268+00:00 app[web.1]:
2021-05-29T05:11:02.707269+00:00 app[web.1]: TypeError: this.__buildConfiguration is not a function
2021-05-29T05:11:02.707269+00:00 app[web.1]: at module.exports (/app/node_modules/express-rate-limiter/index.js:13:33)
2021-05-29T05:11:02.707270+00:00 app[web.1]: at Object.<anonymous> (/app/dist/server.js:34:49)
2021-05-29T05:11:02.707270+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:774:30)
2021-05-29T05:11:02.707270+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
2021-05-29T05:11:02.707271+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:641:32)
2021-05-29T05:11:02.707271+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:556:12)
2021-05-29T05:11:02.707272+00:00 app[web.1]: at Function.Module.runMain (internal/modules/cjs/loader.js:837:10)
2021-05-29T05:11:02.707272+00:00 app[web.1]: at internal/main/run_main_module.js:17:11
2021-05-29T05:11:02.778624+00:00 heroku[web.1]: Process exited with status 1
2021-05-29T05:11:02.853093+00:00 heroku[web.1]: State changed from starting to crashed
2021-05-29T05:11:59.000000+00:00 app[api]: Build started by user hillery262627#gmail.com
2021-05-29T05:13:01.344269+00:00 app[api]: Deploy c8670dff by user hillery262627#gmail.com
2021-05-29T05:13:01.344269+00:00 app[api]: Release v88 created by user hillery262627#gmail.com
2021-05-29T05:13:02.041520+00:00 heroku[web.1]: State changed from crashed to starting
2021-05-29T05:13:03.000000+00:00 app[api]: Build succeeded
2021-05-29T05:13:06.356963+00:00 heroku[web.1]: Starting process with command `node dist/server.js`
2021-05-29T05:13:10.148201+00:00 app[web.1]: /app/node_modules/express-rate-limiter/index.js:13
2021-05-29T05:13:10.148263+00:00 app[web.1]: this.__configuration = this.__buildConfiguration(options);
2021-05-29T05:13:10.148272+00:00 app[web.1]: ^
2021-05-29T05:13:10.148276+00:00 app[web.1]:
2021-05-29T05:13:10.148276+00:00 app[web.1]: TypeError: this.__buildConfiguration is not a function
2021-05-29T05:13:10.148279+00:00 app[web.1]: at module.exports (/app/node_modules/express-rate-limiter/index.js:13:33)
2021-05-29T05:13:10.148279+00:00 app[web.1]: at Object.<anonymous> (/app/dist/server.js:34:49)
2021-05-29T05:13:10.148280+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:774:30)
2021-05-29T05:13:10.148280+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
2021-05-29T05:13:10.148280+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:641:32)
2021-05-29T05:13:10.148280+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:556:12)
2021-05-29T05:13:10.148280+00:00 app[web.1]: at Function.Module.runMain (internal/modules/cjs/loader.js:837:10)
2021-05-29T05:13:10.148281+00:00 app[web.1]: at internal/main/run_main_module.js:17:11
2021-05-29T05:13:10.200115+00:00 heroku[web.1]: Process exited with status 1
2021-05-29T05:13:10.283484+00:00 heroku[web.1]: State changed from starting to crashed
2021-05-29T05:17:48.336323+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=revivaproject.herokuapp.com request_id=3f033042-c6d3-4c4b-bdbe-d0badd2d3d34 fwd="49.245.39.161" dyno= connect= service= status=503 bytes= protocol=https
2021-05-29T05:23:09.940782+00:00 heroku[web.1]: State changed from crashed to starting
2021-05-29T05:23:13.553102+00:00 heroku[web.1]: Starting process with command `node dist/server.js`
2021-05-29T05:23:16.251662+00:00 app[web.1]: /app/node_modules/express-rate-limiter/index.js:13
2021-05-29T05:23:16.251678+00:00 app[web.1]: this.__configuration = this.__buildConfiguration(options);
2021-05-29T05:23:16.251678+00:00 app[web.1]: ^
2021-05-29T05:23:16.251679+00:00 app[web.1]:
2021-05-29T05:23:16.251679+00:00 app[web.1]: TypeError: this.__buildConfiguration is not a function
2021-05-29T05:23:16.251680+00:00 app[web.1]: at module.exports (/app/node_modules/express-rate-limiter/index.js:13:33)
2021-05-29T05:23:16.251680+00:00 app[web.1]: at Object.<anonymous> (/app/dist/server.js:34:49)
2021-05-29T05:23:16.251681+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:774:30)
2021-05-29T05:23:16.251681+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
2021-05-29T05:23:16.251682+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:641:32)
2021-05-29T05:23:16.251682+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:556:12)
2021-05-29T05:23:16.251683+00:00 app[web.1]: at Function.Module.runMain (internal/modules/cjs/loader.js:837:10)
2021-05-29T05:23:16.251683+00:00 app[web.1]: at internal/main/run_main_module.js:17:11
2021-05-29T05:23:16.318206+00:00 heroku[web.1]: Process exited with status 1
2021-05-29T05:23:16.378564+00:00 heroku[web.1]: State changed from starting to crashed
2021-05-29T05:24:33.000000+00:00 app[api]: Build started by user hillery262627#gmail.com
2021-05-29T05:25:34.946347+00:00 app[api]: Release v89 created by user hillery262627#gmail.com
2021-05-29T05:25:34.946347+00:00 app[api]: Deploy c8670dff by user hillery262627#gmail.com
2021-05-29T05:25:35.219700+00:00 heroku[web.1]: State changed from crashed to starting
2021-05-29T05:25:37.000000+00:00 app[api]: Build succeeded
2021-05-29T05:25:38.314459+00:00 heroku[web.1]: Starting process with command `node dist/server.js`
2021-05-29T05:25:40.788755+00:00 app[web.1]: /app/node_modules/express-rate-limiter/index.js:13
2021-05-29T05:25:40.788776+00:00 app[web.1]: this.__configuration = this.__buildConfiguration(options);
2021-05-29T05:25:40.788777+00:00 app[web.1]: ^
2021-05-29T05:25:40.788778+00:00 app[web.1]:
2021-05-29T05:25:40.788778+00:00 app[web.1]: TypeError: this.__buildConfiguration is not a function
2021-05-29T05:25:40.788779+00:00 app[web.1]: at module.exports (/app/node_modules/express-rate-limiter/index.js:13:33)
2021-05-29T05:25:40.788779+00:00 app[web.1]: at Object.<anonymous> (/app/dist/server.js:34:49)
2021-05-29T05:25:40.788779+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:774:30)
2021-05-29T05:25:40.788780+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
2021-05-29T05:25:40.788780+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:641:32)
2021-05-29T05:25:40.788780+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:556:12)
2021-05-29T05:25:40.788781+00:00 app[web.1]: at Function.Module.runMain (internal/modules/cjs/loader.js:837:10)
2021-05-29T05:25:40.788781+00:00 app[web.1]: at internal/main/run_main_module.js:17:11
2021-05-29T05:25:40.864253+00:00 heroku[web.1]: Process exited with status 1
2021-05-29T05:25:40.952164+00:00 heroku[web.1]: State changed from starting to crashed
2021-05-29T05:34:33.335208+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=revivaproject.herokuapp.com request_id=3a904ea7-930c-42e6-a9af-16e333a4064a fwd="49.245.39.161" dyno= connect= service= status=503 bytes= protocol=https
2021-05-29T05:37:25.482013+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=revivaproject.herokuapp.com request_id=ebd52cb6-bb09-481b-bdb7-91d8c8993766 fwd="49.245.39.161" dyno= connect= service= status=503 bytes= protocol=https
2021-05-29T05:37:26.504268+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=revivaproject.herokuapp.com request_id=f7f3e1ec-ea62-4ea9-8712-b1178c56abca fwd="49.245.39.161" dyno=
connect= service= status=503 bytes= protocol=https
2021-05-29T05:38:36.526750+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=revivaproject.herokuapp.com request_id=0402ac65-49cb-4b09-a44e-6aaf428c23dd fwd="49.245.39.161" dyno= connect= service= status=503 bytes= protocol=https
2021-05-29T05:38:37.438382+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=revivaproject.herokuapp.com request_id=4389454b-a233-45d8-bf60-a3f0e7349504 fwd="49.245.39.161" dyno= connect= service= status=503 bytes= protocol=https
2021-05-29T06:09:11.655622+00:00 heroku[web.1]: State changed from crashed to starting
2021-05-29T06:09:15.444774+00:00 heroku[web.1]: Starting process with command `node dist/server.js`
2021-05-29T06:09:17.936977+00:00 app[web.1]: /app/node_modules/express-rate-limiter/index.js:13
2021-05-29T06:09:17.937002+00:00 app[web.1]: this.__configuration = this.__buildConfiguration(options);
2021-05-29T06:09:17.937003+00:00 app[web.1]: ^
2021-05-29T06:09:17.937003+00:00 app[web.1]:
2021-05-29T06:09:17.937003+00:00 app[web.1]: TypeError: this.__buildConfiguration is not a function
2021-05-29T06:09:17.937004+00:00 app[web.1]: at module.exports (/app/node_modules/express-rate-limiter/index.js:13:33)
2021-05-29T06:09:17.937004+00:00 app[web.1]: at Object.<anonymous> (/app/dist/server.js:34:49)
2021-05-29T06:09:17.937005+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:774:30)
2021-05-29T06:09:17.937005+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
2021-05-29T06:09:17.937005+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:641:32)
2021-05-29T06:09:17.937006+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:556:12)
2021-05-29T06:09:17.937006+00:00 app[web.1]: at Function.Module.runMain (internal/modules/cjs/loader.js:837:10)
2021-05-29T06:09:17.937007+00:00 app[web.1]: at internal/main/run_main_module.js:17:11
2021-05-29T06:09:17.980716+00:00 heroku[web.1]: Process exited with status 1
2021-05-29T06:09:18.047009+00:00 heroku[web.1]: State changed from starting to crashed
2021-05-29T06:48:19.910733+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=revivaproject.herokuapp.com request_id=b65d1d7c-50b2-4b63-b305-400459ed69ba fwd="49.245.39.161" dyno= connect= service= status=503 bytes= protocol=https
2021-05-29T06:48:21.301919+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=revivaproject.herokuapp.com request_id=61fe1968-f463-4c52-b3a8-8d517d0a157d fwd="49.245.39.161" dyno= connect= service= status=503 bytes= protocol=https
2021-05-29T06:48:33.577825+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=revivaproject.herokuapp.com request_id=9831ac5d-869a-4f05-a2f3-6a0422efba77 fwd="49.245.39.161" dyno= connect= service= status=503 bytes= protocol=https
2021-05-29T06:48:34.410206+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=revivaproject.herokuapp.com request_id=cd55e067-ced5-4689-a815-5725e7daa151 fwd="49.245.39.161" dyno= connect= service= status=503 bytes= protocol=https
2021-05-29T06:55:56.000000+00:00 app[api]: Build started by user hillery262627#gmail.com
2021-05-29T06:56:52.630557+00:00 heroku[web.1]: State changed from crashed to starting
2021-05-29T06:56:52.473357+00:00 app[api]: Deploy e28a52be by user hillery262627#gmail.com
2021-05-29T06:56:52.473357+00:00 app[api]: Release v90 created by user hillery262627#gmail.com
2021-05-29T06:56:54.000000+00:00 app[api]: Build succeeded
2021-05-29T06:56:55.920729+00:00 heroku[web.1]: Starting process with command `node dist/server.js`
2021-05-29T06:56:58.334876+00:00 heroku[web.1]: Process exited with status 1
2021-05-29T06:56:58.401966+00:00 heroku[web.1]: State changed from starting to crashed
2021-05-29T06:56:58.405968+00:00 heroku[web.1]: State changed from crashed to starting
2021-05-29T06:56:58.278359+00:00 app[web.1]: /app/node_modules/express-rate-limiter/index.js:13
2021-05-29T06:56:58.278373+00:00 app[web.1]: this.__configuration = this.__buildConfiguration(options);
2021-05-29T06:56:58.278374+00:00 app[web.1]: ^
2021-05-29T06:56:58.278374+00:00 app[web.1]:
2021-05-29T06:56:58.278374+00:00 app[web.1]: TypeError: this.__buildConfiguration is not a function
2021-05-29T06:56:58.278375+00:00 app[web.1]: at module.exports (/app/node_modules/express-rate-limiter/index.js:13:33)
2021-05-29T06:56:58.278375+00:00 app[web.1]: at Object.<anonymous> (/app/dist/server.js:34:52)
2021-05-29T06:56:58.278375+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:774:30)
2021-05-29T06:56:58.278376+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
2021-05-29T06:56:58.278376+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:641:32)
2021-05-29T06:56:58.278376+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:556:12)
2021-05-29T06:56:58.278377+00:00 app[web.1]: at Function.Module.runMain (internal/modules/cjs/loader.js:837:10)
2021-05-29T06:56:58.278377+00:00 app[web.1]: at internal/main/run_main_module.js:17:11
2021-05-29T06:57:01.716901+00:00 heroku[web.1]: Starting process with command `node dist/server.js`
2021-05-29T06:57:04.120156+00:00 heroku[web.1]: Process exited with status 1
2021-05-29T06:57:04.188477+00:00 heroku[web.1]: State changed from starting to crashed
2021-05-29T06:57:04.078916+00:00 app[web.1]: /app/node_modules/express-rate-limiter/index.js:13
2021-05-29T06:57:04.078967+00:00 app[web.1]: this.__configuration = this.__buildConfiguration(options);
2021-05-29T06:57:04.078967+00:00 app[web.1]: ^
2021-05-29T06:57:04.078968+00:00 app[web.1]:
2021-05-29T06:57:04.078968+00:00 app[web.1]: TypeError: this.__buildConfiguration is not a function
2021-05-29T06:57:04.078982+00:00 app[web.1]: at module.exports (/app/node_modules/express-rate-limiter/index.js:13:33)
2021-05-29T06:57:04.078983+00:00 app[web.1]: at Object.<anonymous> (/app/dist/server.js:34:52)
2021-05-29T06:57:04.078983+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:774:30)
2021-05-29T06:57:04.078983+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
2021-05-29T06:57:04.078983+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:641:32)
2021-05-29T06:57:04.078984+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:556:12)
2021-05-29T06:57:04.078984+00:00 app[web.1]: at Function.Module.runMain (internal/modules/cjs/loader.js:837:10)
2021-05-29T06:57:04.078984+00:00 app[web.1]: at internal/main/run_main_module.js:17:11
2021-05-29T06:57:05.387430+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=revivaproject.herokuapp.com request_id=54289191-9ec6-4ca9-ad4c-49395f5b3bf4 fwd="49.245.39.161" dyno= connect= service= status=503 bytes= protocol=https
At line 5, you need to import 'express-rate-limit' not 'express-rate-limiter'

My node.js App works locally but does not work on Heroku gives "application error". The log tail is like this. Can you help me fix this?

This is the Heroku logs tail:
remote: https://desolate-temple-28640.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/desolate-temple-28640.git
132ab25..24b7d35 master -> master
Bilals-MacBook-Air:Eat-the-burger bilalsarimeseli$ heroku logs --tail
2020-03-05T04:29:51.676106+00:00 app[web.1]:
2020-03-05T04:29:51.676125+00:00 app[web.1]: > burger#1.0.0 start /app
2020-03-05T04:29:51.676125+00:00 app[web.1]: > node server.js
2020-03-05T04:29:51.676125+00:00 app[web.1]:
2020-03-05T04:29:51.929460+00:00 app[web.1]: Server listening on: http://localhost:5967
2020-03-05T04:29:51.932815+00:00 app[web.1]: error connecting: Error: connect ECONNREFUSED 127.0.0.1:3306
2020-03-05T04:29:51.932816+00:00 app[web.1]: at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1137:16)
2020-03-05T04:29:51.932817+00:00 app[web.1]: --------------------
2020-03-05T04:29:51.932817+00:00 app[web.1]: at Protocol._enqueue (/app/node_modules/mysql/lib/protocol/Protocol.js:144:48)
2020-03-05T04:29:51.932817+00:00 app[web.1]: at Protocol.handshake (/app/node_modules/mysql/lib/protocol/Protocol.js:51:23)
2020-03-05T04:29:51.932818+00:00 app[web.1]: at Connection.connect (/app/node_modules/mysql/lib/Connection.js:119:18)
2020-03-05T04:29:51.932818+00:00 app[web.1]: at Object. (/app/config/connection.js:16:12)
2020-03-05T04:29:51.932818+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1158:30)
2020-03-05T04:29:51.932819+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
2020-03-05T04:29:51.932819+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:1002:32)
2020-03-05T04:29:51.932819+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:901:14)
2020-03-05T04:29:51.932819+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:1044:19)
2020-03-05T04:29:51.932820+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:77:18)
2020-03-05T04:29:53.272983+00:00 heroku[web.1]: State changed from starting to up
2020-03-05T05:04:18.124007+00:00 heroku[web.1]: Idling
2020-03-05T05:04:18.127663+00:00 heroku[web.1]: State changed from up to down
2020-03-05T05:04:18.993332+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2020-03-05T05:04:19.070341+00:00 heroku[web.1]: Process exited with status 143
2020-03-05T11:10:26.000000+00:00 app[api]: Build started by user bilalsarimeseli#gmail.com
2020-03-05T11:10:40.838353+00:00 heroku[web.1]: State changed from down to starting
2020-03-05T11:10:40.648875+00:00 app[api]: Deploy 24b7d357 by user bilalsarimeseli#gmail.com
2020-03-05T11:10:42.830384+00:00 heroku[web.1]: Starting process with command `npm start`
2020-03-05T11:10:40.648875+00:00 app[api]: Release v10 created by user bilalsarimeseli#gmail.com
2020-03-05T11:10:41.000000+00:00 app[api]: Build succeeded
2020-03-05T11:10:44.751738+00:00 app[web.1]:
2020-03-05T11:10:44.751800+00:00 app[web.1]: > burger#1.0.0 start /app
2020-03-05T11:10:44.751801+00:00 app[web.1]: > node server.js
2020-03-05T11:10:44.751806+00:00 app[web.1]:
2020-03-05T11:10:44.985822+00:00 app[web.1]: Server listening on: http://localhost:58632
2020-03-05T11:10:44.989700+00:00 app[web.1]: error connecting: Error: connect ECONNREFUSED 127.0.0.1:3306
2020-03-05T11:10:44.989705+00:00 app[web.1]: at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1137:16)
2020-03-05T11:10:44.989706+00:00 app[web.1]: --------------------
2020-03-05T11:10:44.989709+00:00 app[web.1]: at Protocol._enqueue (/app/node_modules/mysql/lib/protocol/Protocol.js:144:48)
2020-03-05T11:10:44.989710+00:00 app[web.1]: at Protocol.handshake (/app/node_modules/mysql/lib/protocol/Protocol.js:51:23)
2020-03-05T11:10:44.989710+00:00 app[web.1]: at Connection.connect (/app/node_modules/mysql/lib/Connection.js:119:18)
2020-03-05T11:10:44.989710+00:00 app[web.1]: at Object. (/app/config/connection.js:16:12)
2020-03-05T11:10:44.989710+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1158:30)
2020-03-05T11:10:44.989711+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
2020-03-05T11:10:44.989711+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:1002:32)
2020-03-05T11:10:44.989711+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:901:14)
2020-03-05T11:10:44.989711+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:1044:19)
2020-03-05T11:10:44.989712+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:77:18)
2020-03-05T11:10:45.456540+00:00 heroku[web.1]: State changed from starting to up
2020-03-05T11:11:02.583806+00:00 app[web.1]: /app/config/orm.js:41
2020-03-05T11:11:02.583841+00:00 app[web.1]: throw err;
2020-03-05T11:11:02.583841+00:00 app[web.1]: ^
2020-03-05T11:11:02.583843+00:00 app[web.1]:
2020-03-05T11:11:02.583845+00:00 app[web.1]: Error: Cannot enqueue Query after fatal error.
2020-03-05T11:11:02.583846+00:00 app[web.1]: at Protocol._validateEnqueue (/app/node_modules/mysql/lib/protocol/Protocol.js:212:16)
2020-03-05T11:11:02.583846+00:00 app[web.1]: at Protocol._enqueue (/app/node_modules/mysql/lib/protocol/Protocol.js:138:13)
2020-03-05T11:11:02.583848+00:00 app[web.1]: at Connection.query (/app/node_modules/mysql/lib/Connection.js:201:25)
2020-03-05T11:11:02.583848+00:00 app[web.1]: at Object.selectAll (/app/config/orm.js:39:20)
2020-03-05T11:11:02.583849+00:00 app[web.1]: at Object.selectAll (/app/models/burger.js:7:13)
2020-03-05T11:11:02.583849+00:00 app[web.1]: at /app/controller/burgers_controller.js:10:12
2020-03-05T11:11:02.583849+00:00 app[web.1]: at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
2020-03-05T11:11:02.583850+00:00 app[web.1]: at next (/app/node_modules/express/lib/router/route.js:137:13)
2020-03-05T11:11:02.583850+00:00 app[web.1]: at Route.dispatch (/app/node_modules/express/lib/router/route.js:112:3)
2020-03-05T11:11:02.583850+00:00 app[web.1]: at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5) {
2020-03-05T11:11:02.583851+00:00 app[web.1]: code: 'PROTOCOL_ENQUEUE_AFTER_FATAL_ERROR',
2020-03-05T11:11:02.583851+00:00 app[web.1]: fatal: false
2020-03-05T11:11:02.583851+00:00 app[web.1]: }
2020-03-05T11:11:02.591344+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2020-03-05T11:11:02.591569+00:00 app[web.1]: npm ERR! errno 1
2020-03-05T11:11:02.592540+00:00 app[web.1]: npm ERR! burger#1.0.0 start: `node server.js`
2020-03-05T11:11:02.592651+00:00 app[web.1]: npm ERR! Exit status 1
2020-03-05T11:11:02.592779+00:00 app[web.1]: npm ERR!
2020-03-05T11:11:02.592869+00:00 app[web.1]: npm ERR! Failed at the burger#1.0.0 start script.
2020-03-05T11:11:02.592974+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-03-05T11:11:02.596948+00:00 app[web.1]:
2020-03-05T11:11:02.597121+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-03-05T11:11:02.597200+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2020-03-05T11_11_02_593Z-debug.log
2020-03-05T11:11:02.659995+00:00 heroku[web.1]: State changed from up to crashed
2020-03-05T11:11:02.663569+00:00 heroku[web.1]: State changed from crashed to starting
2020-03-05T11:11:02.591268+00:00 heroku[router]: at=error code=H13 desc="Connection closed without response" method=GET path="/" host=desolate-temple-28640.herokuapp.com request_id=babd3c58-db4a-4333-8b8c-1d3b6c180144 fwd="73.170.10.17" dyno=web.1 connect=1ms service=15ms status=503 bytes=0 protocol=https
2020-03-05T11:11:02.640946+00:00 heroku[web.1]: Process exited with status 1
2020-03-05T11:11:04.780991+00:00 heroku[web.1]: Starting process with command `npm start`
2020-03-05T11:11:06.928183+00:00 app[web.1]:
2020-03-05T11:11:06.928199+00:00 app[web.1]: > burger#1.0.0 start /app
2020-03-05T11:11:06.928199+00:00 app[web.1]: > node server.js
2020-03-05T11:11:06.928200+00:00 app[web.1]:
2020-03-05T11:11:07.188672+00:00 app[web.1]: Server listening on: http://localhost:23612
2020-03-05T11:11:07.192422+00:00 app[web.1]: error connecting: Error: connect ECONNREFUSED 127.0.0.1:3306
2020-03-05T11:11:07.192422+00:00 app[web.1]: at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1137:16)
2020-03-05T11:11:07.192423+00:00 app[web.1]: --------------------
2020-03-05T11:11:07.192423+00:00 app[web.1]: at Protocol._enqueue (/app/node_modules/mysql/lib/protocol/Protocol.js:144:48)
2020-03-05T11:11:07.192424+00:00 app[web.1]: at Protocol.handshake (/app/node_modules/mysql/lib/protocol/Protocol.js:51:23)
2020-03-05T11:11:07.192424+00:00 app[web.1]: at Connection.connect (/app/node_modules/mysql/lib/Connection.js:119:18)
2020-03-05T11:11:07.192424+00:00 app[web.1]: at Object. (/app/config/connection.js:16:12)
2020-03-05T11:11:07.192425+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1158:30)
2020-03-05T11:11:07.192425+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
2020-03-05T11:11:07.192425+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:1002:32)
2020-03-05T11:11:07.192426+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:901:14)
2020-03-05T11:11:07.192426+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:1044:19)
2020-03-05T11:11:07.192426+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:77:18)
2020-03-05T11:11:07.594141+00:00 heroku[web.1]: State changed from starting to up
2020-03-05T11:15:26.050243+00:00 app[web.1]: /app/config/orm.js:41
2020-03-05T11:15:26.050267+00:00 app[web.1]: throw err;
2020-03-05T11:15:26.050267+00:00 app[web.1]: ^
2020-03-05T11:15:26.050268+00:00 app[web.1]:
2020-03-05T11:15:26.050270+00:00 app[web.1]: Error: Cannot enqueue Query after fatal error.
2020-03-05T11:15:26.050272+00:00 app[web.1]: at Protocol._validateEnqueue (/app/node_modules/mysql/lib/protocol/Protocol.js:212:16)
2020-03-05T11:15:26.050272+00:00 app[web.1]: at Protocol._enqueue (/app/node_modules/mysql/lib/protocol/Protocol.js:138:13)
2020-03-05T11:15:26.050273+00:00 app[web.1]: at Connection.query (/app/node_modules/mysql/lib/Connection.js:201:25)
2020-03-05T11:15:26.050274+00:00 app[web.1]: at Object.selectAll (/app/config/orm.js:39:20)
2020-03-05T11:15:26.050274+00:00 app[web.1]: at Object.selectAll (/app/models/burger.js:7:13)
2020-03-05T11:15:26.050275+00:00 app[web.1]: at /app/controller/burgers_controller.js:10:12
2020-03-05T11:15:26.050275+00:00 app[web.1]: at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
2020-03-05T11:15:26.050275+00:00 app[web.1]: at next (/app/node_modules/express/lib/router/route.js:137:13)
2020-03-05T11:15:26.050276+00:00 app[web.1]: at Route.dispatch (/app/node_modules/express/lib/router/route.js:112:3)
2020-03-05T11:15:26.050276+00:00 app[web.1]: at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5) {
2020-03-05T11:15:26.050277+00:00 app[web.1]: code: 'PROTOCOL_ENQUEUE_AFTER_FATAL_ERROR',
2020-03-05T11:15:26.050277+00:00 app[web.1]: fatal: false
2020-03-05T11:15:26.050277+00:00 app[web.1]: }
2020-03-05T11:15:26.059015+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2020-03-05T11:15:26.059397+00:00 app[web.1]: npm ERR! errno 1
2020-03-05T11:15:26.061003+00:00 app[web.1]: npm ERR! burger#1.0.0 start: `node server.js`
2020-03-05T11:15:26.061232+00:00 app[web.1]: npm ERR! Exit status 1
2020-03-05T11:15:26.061464+00:00 app[web.1]: npm ERR!
2020-03-05T11:15:26.061676+00:00 app[web.1]: npm ERR! Failed at the burger#1.0.0 start script.
2020-03-05T11:15:26.061857+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-03-05T11:15:26.069984+00:00 app[web.1]:
2020-03-05T11:15:26.070271+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-03-05T11:15:26.070400+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2020-03-05T11_15_26_062Z-debug.log
2020-03-05T11:15:26.165120+00:00 heroku[web.1]: State changed from up to crashed
2020-03-05T11:15:26.144397+00:00 heroku[web.1]: Process exited with status 1
2020-03-05T11:15:26.058348+00:00 heroku[router]: at=error code=H13 desc="Connection closed without response" method=GET path="/" host=desolate-temple-28640.herokuapp.com request_id=bba9be1c-a0a8-4187-9854-8f1adb4aef14 fwd="73.170.10.17" dyno=web.1 connect=0ms service=18ms status=503 bytes=0 protocol=https
2020-03-05T04:29:51.929460+00:00 app[web.1]: Server listening on: http://localhost:5967
2020-03-05T04:29:51.932815+00:00 app[web.1]: error connecting: Error: connect ECONNREFUSED 127.0.0.1:3306
I assume that you did bind your port to the environment variable $PORT which was supplied by Heroku. I assume that port is the 5967. Your program is trying to access 3306. You probably defined this port somewhere. This is on Heroku not possible.
Heroku only allows you to bind to a single port with the port number decided by Heroku.
2020-03-05T04:29:51.929460+00:00 app[web.1]: Server listening on: http://localhost:5967
2020-03-05T04:29:51.932815+00:00 app[web.1]: error connecting: Error: connect ECONNREFUSED 127.0.0.1:3306
You got an Error. Because your server tries to connect a 3306 PORT
But in your server Listening to a port 5967. simple change a PORT Number in own code .env file. Define a like
E.g.HOST=5967 in the .env file

Compressed JSON Content Type

I'm integrating a 3rd party API, and at one step they post JSON data into our server.
The content type they are sending is application/json, but the payload is actually gzipped, is this valid? I believe it should be gzip/json content type.
Update 1
the env["RAW_POST_DATA"] contains binary data, rather than JSON in text format that I would expect.
Update 2
This is a fairly standard Rails application, hosted on heroku with Puma for staging and production.
Update 3
I've not debugged at this level on heroku previously, so it's possible that I'm missing something, but I do not see a content-encoding header (I did miss the "HTTP_CONTENT_ENCODING"=>"gzip" header). The headers that I do get are:
2015-12-04T08:00:08.001620+00:00 app[web.1]: D, [2015-12-04T08:00:08.001590 #7] DEBUG -- : REQUEST_PATH: /
2015-12-04T08:00:08.001660+00:00 app[web.1]: D, [2015-12-04T08:00:08.001620 #7] DEBUG -- : REQUEST_URI: /
2015-12-04T08:00:08.001701+00:00 app[web.1]: D, [2015-12-04T08:00:08.001656 #7] DEBUG -- : HTTP_VERSION: HTTP/1.1
2015-12-04T08:00:08.001735+00:00 app[web.1]: D, [2015-12-04T08:00:08.001698 #7] DEBUG -- : HTTP_HOST: staging.redacted.com
2015-12-04T08:00:08.001768+00:00 app[web.1]: D, [2015-12-04T08:00:08.001732 #7] DEBUG -- : HTTP_CONNECTION: close
2015-12-04T08:00:08.001801+00:00 app[web.1]: D, [2015-12-04T08:00:08.001765 #7] DEBUG -- : HTTP_ACCEPT:
2015-12-04T08:00:08.001823+00:00 app[web.1]: D, [2015-12-04T08:00:08.001798 #7] DEBUG -- : CONTENT_LENGTH: 277
2015-12-04T08:00:08.001861+00:00 app[web.1]: D, [2015-12-04T08:00:08.001826 #7] DEBUG -- : CONTENT_TYPE: application/json
2015-12-04T08:00:08.001918+00:00 app[web.1]: D, [2015-12-04T08:00:08.001858 #7] DEBUG -- : HTTP_CACHE_CONTROL:
2015-12-04T08:00:08.001920+00:00 app[web.1]: D, [2015-12-04T08:00:08.001891 #7] DEBUG -- : HTTP_ORIGIN:
2015-12-04T08:00:08.001958+00:00 app[web.1]: D, [2015-12-04T08:00:08.001921 #7] DEBUG -- : HTTP_USER_AGENT: Apache-HttpClient/4.3.4 (java 1.5)
2015-12-04T08:00:08.001996+00:00 app[web.1]: D, [2015-12-04T08:00:08.001953 #7] DEBUG -- : HTTP_POSTMAN_TOKEN:
2015-12-04T08:00:08.002029+00:00 app[web.1]: D, [2015-12-04T08:00:08.001992 #7] DEBUG -- : HTTP_DNT:
2015-12-04T08:00:08.001801+00:00 app[web.1]: D, [2015-12-04T08:00:08.001765 #7] DEBUG -- : HTTP_CONTENT_ENCODING: gzip
2015-12-04T08:00:08.002074+00:00 app[web.1]: D, [2015-12-04T08:00:08.002027 #7] DEBUG -- : HTTP_ACCEPT_ENCODING: gzip,deflate
2015-12-04T08:00:08.002093+00:00 app[web.1]: D, [2015-12-04T08:00:08.002061 #7] DEBUG -- : HTTP_ACCEPT_LANGUAGE:
2015-12-04T08:00:08.002137+00:00 app[web.1]: D, [2015-12-04T08:00:08.002094 #7] DEBUG -- : HTTP_COOKIE:
And the raw post data prints out as:
2015-12-04T08:00:08.002165+00:00 app[web.1]: D, [2015-12-04T08:00:08.002128 #7] DEBUG -- : RAW_POST_DATA:
2015-12-04T08:00:08.002166+00:00 app[web.1]:
2015-12-04T08:00:08.002168+00:00 app[web.1]: ���_%���R�#�S%#�4ݶ��n���wg�4$Wz��9�/me�J���pоp Eٍ��!B�,N��#��k4g�
2015-12-04T08:00:08.002169+00:00 app[web.1]: -���*c�8�[�PK&DفR���LM�
2015-12-04T08:00:08.002169+00:00 app[web.1]: k=t#:?"'��Ip|�dpg��縼Ѻ|�u�cBC��Hly��*�ǯ'Meq�W�]N͛C�F
So the request body is gzipped, and the request carries "Content-Encoding: gzip". No surprises here. See RFC 7231 Section 3.1.2 Encoding for Compression or Integrity.

Rails App Deploying to Heroku Application Error

I'm migrating my app to Heroku and using a MySQL ClearDB addon. However, upon deploying and attempting to view the app, leads to the page:
and the log (my apologies for the length):
2015-03-17T02:25:14.688899+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
2015-03-17T02:25:14.688917+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-4.0.1/lib/rails/commands/server.rb:75:in `start'
2015-03-17T02:25:14.688914+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-4.0.1/lib/rails/commands/server.rb:48:in `app'
2015-03-17T02:25:14.688915+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
2015-03-17T02:25:14.688918+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-4.0.1/lib/rails/commands.rb:76:in `block in <top (required)>'
2015-03-17T02:25:14.688921+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-4.0.1/lib/rails/commands.rb:71:in `<top (required)>'
2015-03-17T02:25:14.688923+00:00 app[web.1]: from bin/rails:4:in `require'
2015-03-17T02:25:14.688924+00:00 app[web.1]: from bin/rails:4:in `<main>'
2015-03-17T02:25:15.498865+00:00 heroku[web.1]: Process exited with status 1
2015-03-17T02:25:16.549374+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=boiling-tor-3589.herokuapp.com request_id=4675fd2
5-7ef8-41cb-929b-1edab9d13189 fwd="*************" dyno= connect= service= status=503 bytes=
2015-03-17T02:25:15.517544+00:00 heroku[web.1]: State changed from starting to crashed
2015-03-17T02:25:16.869085+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=boiling-tor-3589.herokuapp.com request
_id=44755c2f-fbb2-45d2-a2cb-320224891ada fwd="*************" dyno= connect= service= status=503 bytes=
2015-03-17T02:26:48+00:00 heroku[slug-compiler]: Slug compilation started
2015-03-17T02:27:19.225204+00:00 heroku[api]: Deploy 01fdec8 by kjakah08#gmail.com
2015-03-17T02:27:19.225204+00:00 heroku[api]: Release v15 created by kjakah08#gmail.com
2015-03-17T02:27:19+00:00 heroku[slug-compiler]: Slug compilation finished
2015-03-17T02:27:19.596998+00:00 heroku[web.1]: State changed from crashed to starting
2015-03-17T02:27:24.842389+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 4736 -e production`
2015-03-17T02:27:27.872900+00:00 app[web.1]: /app/config/application.rb:12:in `<top (required)>': iconv will be deprecated in the future, use String#encode instead.
2015-03-17T02:27:33.560719+00:00 app[web.1]: => Booting WEBrick
2015-03-17T02:27:33.561366+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activemodel-4.0.1/lib/active_model/validations/validates.rb:105:in `validates':
You need to supply at least one validation (ArgumentError)
2015-03-17T02:27:33.561375+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `require'
2015-03-17T02:27:33.560727+00:00 app[web.1]: => Ctrl-C to shutdown server
2015-03-17T02:27:33.561373+00:00 app[web.1]: from /app/app/models/active_campaign_dow.rb:1:in `<top (required)>'
2015-03-17T02:27:33.560723+00:00 app[web.1]: => Rails 4.0.1 application starting in production on http://0.0.0.0:4736
2015-03-17T02:27:33.560725+00:00 app[web.1]: => Run `rails server -h` for more startup options
2015-03-17T02:27:33.560728+00:00 app[web.1]: Exiting
2015-03-17T02:27:33.561377+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `block inrequire'
2015-03-17T02:27:33.561398+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-4.0.1/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
2015-03-17T02:27:33.561380+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `require'
2015-03-17T02:27:33.561390+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-4.0.1/lib/rails/engine.rb:464:in `block in eager_load!'
2015-03-17T02:27:33.561372+00:00 app[web.1]: from /app/app/models/active_campaign_dow.rb:6:in `<class:ActiveCampaignDow>'
2015-03-17T02:27:33.561412+00:00 app[web.1]: from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/tsort.rb:180:in `each'
2015-03-17T02:27:33.561381+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:330:in `require_or_load'
2015-03-17T02:27:33.561379+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:214:in `load_dependency'
2015-03-17T02:27:33.561396+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-4.0.1/lib/rails/engine.rb:347:in `eager_load!'
2015-03-17T02:27:33.561400+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-4.0.1/lib/rails/initializable.rb:30:in `instance_exec'
2015-03-17T02:27:33.561386+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:207:in `require_dependency'
2015-03-17T02:27:33.561407+00:00 app[web.1]: from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
2015-03-17T02:27:33.561394+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-4.0.1/lib/rails/engine.rb:462:in `eager_load!'
2015-03-17T02:27:33.561387+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-4.0.1/lib/rails/engine.rb:465:in `block (2 levels) in eager_load!'
2015-03-17T02:27:33.561411+00:00 app[web.1]: from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/tsort.rb:182:in `block in each_strongly_connected_component'
2015-03-17T02:27:33.561389+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-4.0.1/lib/rails/engine.rb:464:in `each'
2015-03-17T02:27:33.561410+00:00 app[web.1]: from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/tsort.rb:219:in `each_strongly_connected_component_from'
2015-03-17T02:27:33.561438+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:214:in `load_dependency'
2015-03-17T02:27:33.561429+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-4.0.1/lib/rails/application.rb:215:in `initialize!'
2015-03-17T02:27:33.561450+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
2015-03-17T02:27:33.561434+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2015-03-17T02:27:33.561414+00:00 app[web.1]: from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/tsort.rb:180:in `each_strongly_connected_component'
2015-03-17T02:27:33.561391+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-4.0.1/lib/rails/engine.rb:462:in `each'
2015-03-17T02:27:33.561433+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-4.0.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
2015-03-17T02:27:33.561436+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `block inrequire'
2015-03-17T02:27:33.561447+00:00 app[web.1]: from /app/config.ru:in `<main>'
2015-03-17T02:27:33.561454+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
2015-03-17T02:27:33.561385+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:289:in `depend_on'
2015-03-17T02:27:33.561418+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-4.0.1/lib/rails/initializable.rb:54:in `run_initializers'
2015-03-17T02:27:33.561397+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-4.0.1/lib/rails/application/finisher.rb:56:in `each'
2015-03-17T02:27:33.561446+00:00 app[web.1]: from /app/config.ru:in `new'
2015-03-17T02:27:33.561439+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `require'
2015-03-17T02:27:33.561404+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-4.0.1/lib/rails/initializable.rb:55:in `block in run_initializers'
2015-03-17T02:27:33.561451+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
2015-03-17T02:27:33.561459+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-4.0.1/lib/rails/commands/server.rb:75:in `start'
2015-03-17T02:27:33.561456+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
2015-03-17T02:27:33.561405+00:00 app[web.1]: from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/tsort.rb:150:in `block in tsort_each'
2015-03-17T02:27:33.561463+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-4.0.1/lib/rails/commands.rb:71:in `tap'
2015-03-17T02:27:33.561403+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-4.0.1/lib/rails/initializable.rb:30:in `run'
2015-03-17T02:27:33.561417+00:00 app[web.1]: from /app/vendor/ruby-1.9.3/lib/ruby/1.9.1/tsort.rb:148:in `tsort_each'
2015-03-17T02:27:33.561457+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-4.0.1/lib/rails/commands/server.rb:48:in `app'
2015-03-17T02:27:33.561449+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
2015-03-17T02:27:33.561469+00:00 app[web.1]: from bin/rails:4:in `<main>'
2015-03-17T02:27:33.561435+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `require'
2015-03-17T02:27:33.561458+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
2015-03-17T02:27:33.561465+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-4.0.1/lib/rails/commands.rb:71:in `<top (required)>'
2015-03-17T02:27:33.561442+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
2015-03-17T02:27:33.561445+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
2015-03-17T02:27:33.561441+00:00 app[web.1]: from /app/config.ru:3:in `blockin <main>'
2015-03-17T02:27:33.561462+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-4.0.1/lib/rails/commands.rb:76:in `block in <top (required)>'
2015-03-17T02:27:33.561466+00:00 app[web.1]: from bin/rails:4:in `require'
2015-03-17T02:27:34.456959+00:00 heroku[web.1]: State changed from starting to crashed
From the log, there are no explicit errors aside from showing the app crashed error page. I configured everything correctly.
Why won't the app show?
I think this line is rellevant
[....]/active_model/validations/validates.rb:105:in `validates':
You need to supply at least one validation (ArgumentError)
From the backtrace it seems like you have source of the problem in app/models/active_campaign_dow.rb:6, probably mailformed validates call