Image is showing status=404 after deploying application to Heroku - heroku

I deployed my application to Heroku and once I did that the image isn't appearing. I looked at the Heroku log files and it gives the status=404 for that image. The image appears locally when I run it on my mac book.
The error message is:
2017-12-19T13:42:42.487011+00:00 heroku[router]: at=info method=GET
path="/images/MyPhoto.jpeg" host=bk-devcamp-portfolio.herokuapp.com
request_id=970163c2-4d3a-4b9a-83e0-7204b7cf4f10 fwd="66.194.42.54"
dyno=web.1 connect=2ms service=5ms status=404 bytes=1902 protocol=https
2017-12-19T13:42:42.430206+00:00 heroku[router]: at=info method=GET
path="/about-me" host=bk-devcamp-portfolio.herokuapp.com
request_id=4aebf34c-b6f9-47c3-a678-b779a7efa1ed fwd="66.194.42.54"
dyno=web.1 connect=1ms service=32ms status=200 bytes=11732 protocol=https

heroku describes how to fix the asset precompiling issue: Heroku Assets
Fix 1)
RAILS_ENV=production bundle exec rake assets:precompile
Fix 2)
in "config/application.rb" and add this line:
config.serve_static_assets = true
Alternatively you can achieve the same result by including the
rails_12factor
gem in your Gemfile:
gem 'rails_12factor', group: :production

Related

Blank page in browser with Unexpected token '<' in console

I have a problem with deploying Strapi application on Heroku. Both local and Heroku Strapi setups are using Postgres database.
Can't see any errors in Heroku logs, just a blank page in browser. Brpwser's console has these two errors:
Uncaught SyntaxError: Unexpected token '<' runtime~main.8073a043.js:1
Uncaught SyntaxError: Unexpected token '<' main.abbe0ac9.chunk.js:1
Heroku logs:
2020-12-11T15:26:03.986177+00:00 heroku[web.1]: State changed from starting to up
2020-12-11T15:26:03.916838+00:00 app[web.1]: INFO: Accepting connections at http://localhost:58777
2020-12-11T15:26:04.470749+00:00 heroku[router]: at=info method=GET path="/" host=john-strapi-postgres.herokuapp.com request_id=8783501f-3d9f-4986-bb44-6648a93d8105 fwd="68.82.27.99" dyno=web.1 connect=1ms service=24ms status=304 bytes=85 protocol=https
2020-12-11T15:26:04.561029+00:00 heroku[router]: at=info method=GET path="/admin/runtime~main.8073a043.js" host=john-strapi-postgres.herokuapp.com request_id=008157f5-a2ff-4738-9a8c-8ef4ac76a2d8 fwd="68.82.27.99" dyno=web.1 connect=1ms service=3ms status=304 bytes=85 protocol=https
2020-12-11T15:26:04.558537+00:00 heroku[router]: at=info method=GET path="/admin/main.abbe0ac9.chunk.js" host=john-strapi-postgres.herokuapp.com request_id=aa2e15a8-e001-4333-a195-f669ddcaac74 fwd="68.82.27.99" dyno=web.1 connect=1ms service=5ms status=304 bytes=85 protocol=https
2020-12-11T15:26:04.666249+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=john-strapi-postgres.herokuapp.com request_id=f2342dac-0347-4b0b-a4e4-89f0a425a98a fwd="68.82.27.99" dyno=web.1 connect=0ms service=6ms status=304 bytes=85 protocol=https
Local Strapi application runs perfectly fine.
Node v. 14.5.1
NPM v. 6.14.8
Strapi v. 3.3.4
Windows 10

503 (Service Unavailable) for MERN stack app deployed on heroku

I have deployed my MERN stack app on heroku but now I am having a trouble while making a POST request to my backend through a form.
I have run the command heroku logs --tail
and I am getting the following errors
at=error code=H12 desc="Request timeout" method=POST path="/api/auth" host=still-island-81891.herokuapp.com request_id=b151ea11-23e7-4677-a6d9-d8fd9a213098 fwd="47.30.225.200" dyno=web.1 connect=1ms service=30000ms status=503 bytes=0 protocol=https
Thanks!

Deployment Issue with Spring Boot on Heroku

This is my github repo https://github.com/ArslanAnjum/angularSpringApi which I want to deploy on heroku. The problem is that it is working fine locally but not working on heroku. Can anyone help me out why its not working on heroku?
Heroku link is https://angular-spring-api.herokuapp.com/login . Its giving error that page not found.
This is from the logs of heroku with command heroku logs --tail
2017-11-10T14:06:53.418723+00:00 heroku[router]: at=info method=GET path="/login" host=angular-spring-api.herokuapp.com request_id=cd5bf927-f868-4289-a79d-82aa0c97607b fwd=
"182.180.173.165" dyno=web.1 connect=0ms service=169ms status=404 bytes=715 protocol=https

After pushing on heroku my #Messages(value) are not interpreted

After pushing on heroku my #Messages(value) are not interpreted:
--> value is display instead of the translation present in conf/Messages file.
I use play framework 2.2.1.
Here is the log of a start and a first display of a page containning #Messsages() use.
2014-10-12T05:37:14.320052+00:00 heroku[web.1]: State changed from down to starting
2014-10-12T05:37:14.320052+00:00 heroku[web.1]: Unidling
2014-10-12T05:37:24.363328+00:00 heroku[web.1]: Starting process with command `target/universal/stage/bin/kosh -Dhttp.port=41328 -DapplyEvolutions.default=true`
2014-10-12T05:37:25.260260+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Djava.rmi.server.useCodebaseOnly=true
2014-10-12T05:37:25.672105+00:00 app[web.1]: Play server process ID is 2
2014-10-12T05:37:27.084724+00:00 app[web.1]: [←[37minfo←[0m] play - database [default] connected at jdbc:h2:mem:play
2014-10-12T05:37:27.660047+00:00 app[web.1]: [←[37minfo←[0m] play - Application started (Prod)
2014-10-12T06:39:14.765169+00:00 heroku[router]: at=info method=GET path="/" host=mmmm.herokuapp.com request_id=31eeed7d-0b4d-43ac-b2df-3d142f6db4ba fwd="-" dyno=web.1 connect=1ms service=16ms status=200 bytes=34657
2014-10-12T06:39:14.939740+00:00 heroku[router]: at=info method=GET path="/assets/stylesheets/bootstrap.min.css" host=mmmm.herokuapp.com request_id=7ffe7b15-d521-481fb9f1-fba1c146fbf0 fwd="-" dyno=web.1 connect=1ms service=7ms status=304 bytes=173
2014-10-12T06:39:14.949590+00:00 heroku[router]: at=info method=GET path="/assets/stylesheets/normalize.css" host=mmmm.herokuapp.com request_id=4616036b-d3d3-4891-bc69-8c3461d69e26 fwd="-" dyno=web.1 connect=1ms service=8ms status=304 bytes=1732
2014-10-12T06:47:05.367842+00:00 heroku[router]: at=info method=GET path="/webjars/jquery/1.9.1/jquery.min.js" host=mmmm.herokuapp.com request_id=2938c0d1-62ad-4e43-acdb-1dc23588754f fwd="-" dyno=web.1 connect=1ms service=5ms status=304 bytes=173
My Procfile contains :
web: target/universal/stage/bin/kosh -Dhttp.port=$PORT -DapplyEvolutions.default=true
Changing the name of the file from "Messages" to "messages" (with a lowercase m) had fix the problem. On my Windows side file was case insensitive, on heroku side, in an Unix world, file names were case sensitives. Play framework seem to look for file in lower case at heroku.

Heroku: Not Found & Process Exited

I'm not sure how I can debug this. Running this ruby/sinatra/thin app locally I have no issues whatsoever. On Heroku however the app doesn't seem to load, says "Not Found.". I'm not sure how to make sense of the logs:
2013-03-20T22:27:41+00:00 heroku[api]: Enable Logplex by mymail#gmail.com
2013-03-20T22:27:41+00:00 heroku[api]: Release v2 created by mymail#gmail.com
2013-03-20T22:28:04+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/ host=ancient-kings-2615.herokuapp.com fwd="92.225.106.224" dyno= queue= wait= connect= service= status=502 bytes=
2013-03-20T22:28:05+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/favicon.ico host=ancient-kings-2615.herokuapp.com fwd="92.225.106.224" dyno= queue= wait= connect= service= status=502 bytes=
2013-03-20T22:28:05+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/favicon.ico host=ancient-kings-2615.herokuapp.com fwd="92.225.106.224" dyno= queue= wait= connect= service= status=502 bytes=
2013-03-20T22:37:08+00:00 heroku[slugc]: Slug compilation started
2013-03-20T22:37:59+00:00 heroku[api]: Scale to web=1 by mymail#gmail.com
2013-03-20T22:37:59+00:00 heroku[api]: Add config by mymail#gmail.com
2013-03-20T22:37:59+00:00 heroku[api]: Release v3 created by mymail#gmail.com
2013-03-20T22:38:00+00:00 heroku[api]: Release v4 created by mymail#gmail.com
2013-03-20T22:38:00+00:00 heroku[api]: Deploy 0a18d12 by mymail#gmail.com
2013-03-20T22:38:00+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 33969`
2013-03-20T22:38:00+00:00 heroku[slugc]: Slug compilation finished
2013-03-20T22:38:01+00:00 app[web.1]: bash: bundle: command not found
2013-03-20T22:38:02+00:00 heroku[web.1]: Process exited with status 127
2013-03-20T22:38:09+00:00 heroku[web.1]: State changed from starting to up
2013-03-20T22:38:19+00:00 heroku[router]: at=info method=GET path=/ host=ancient-kings-2615.herokuapp.com fwd="92.225.106.224" dyno=web.1 queue=0 wait=0ms connect=3ms service=79ms status=404 bytes=18
2013-03-20T22:38:21+00:00 heroku[router]: at=info method=GET path=/favicon.ico host=ancient-kings-2615.herokuapp.com fwd="92.225.106.224" dyno=web.1 queue=0 wait=13ms connect=12ms service=69ms status=404 bytes=18
2013-03-20T22:38:21+00:00 heroku[router]: at=info method=GET path=/favicon.ico host=ancient-kings-2615.herokuapp.com fwd="92.225.106.224" dyno=web.1 queue=0 wait=0ms connect=2ms service=21ms status=404 bytes=18
2013-03-20T22:50:19+00:00 heroku[slugc]: Slug compilation started
2013-03-20T22:51:01+00:00 heroku[api]: Release v5 created by mymail#gmail.com
2013-03-20T22:51:01+00:00 heroku[api]: Deploy e18aad6 by mymail#gmail.com
2013-03-20T22:51:01+00:00 heroku[web.1]: State changed from up to starting
2013-03-20T22:51:02+00:00 heroku[slugc]: Slug compilation finished
2013-03-20T22:51:09+00:00 heroku[web.1]: State changed from starting to up
2013-03-20T22:52:32+00:00 heroku[router]: at=info method=GET path=/ host=ancient-kings-2615.herokuapp.com fwd="92.225.106.224" dyno=web.1 queue=0 wait=1ms connect=6ms service=11ms status=404 bytes=18
2013-03-20T22:52:33+00:00 heroku[router]: at=info method=GET path=/favicon.ico host=ancient-kings-2615.herokuapp.com fwd="92.225.106.224" dyno=web.1 queue=0 wait=0ms connect=2ms service=5ms status=404 bytes=18
2013-03-20T22:52:33+00:00 heroku[router]: at=info method=GET path=/favicon.ico host=ancient-kings-2615.herokuapp.com fwd="92.225.106.224" dyno=web.1 queue=0 wait=1ms connect=4ms service=4ms status=404 bytes=18
2013-03-20T22:52:34+00:00 heroku[router]: at=info method=GET path=/ host=ancient-kings-2615.herokuapp.com fwd="92.225.106.224" dyno=web.1 queue=0 wait=0ms connect=4ms service=4ms status=404 bytes=18
2013-03-20T22:52:35+00:00 heroku[router]: at=info method=GET path=/favicon.ico host=ancient-kings-2615.herokuapp.com fwd="92.225.106.224" dyno=web.1 queue=0 wait=0ms connect=12ms service=4ms status=404 bytes=18
2013-03-20T22:52:35+00:00 heroku[router]: at=info method=GET path=/favicon.ico host=ancient-kings-2615.herokuapp.com fwd="92.225.106.224" dyno=web.1 queue=0 wait=2ms connect=5ms service=4ms status=404 bytes=18
Any ideas?
Update 21.3.2013
my gemfile
source "http://rubygems.org"
# Sinatra
gem "rake"
gem "thin"
gem "sinatra", "~> 1.3.4"
gem "sinatra-contrib", "~> 1.3.1"
gem 'sinatra-assetpack', :require => 'sinatra/assetpack'
# Sass
gem "sass", "~> 3.2.1"
# Mailing related
gem "hominid", "~> 3.0.5"
# Google Analytics: UNCOMMENT IF DESIRED, THEN ADD YOUR OWN ACCOUNT INFO TO config.ru
#gem 'rack-google-analytics', "~> 0.9.2"
my config.ru
require 'rubygems'
require 'bundler'
Bundler.require
require './app.rb'
run Sinatra::Application
I cloned the repo but couldn't get it to work via rackup, which is what Heroku relies up to run an app. It did work when running the Sinatra app directly via Ruby. Here are the changes I made that got it to work with rackup:
config.ru
require 'rubygems'
require 'bundler'
Bundler.require
require File.expand_path 'app.rb', File.dirname(__FILE__)
run App
If you've subclassed, run the subclass, otherwise use Sinatra::Application
I also removed all the $:.unshifts that I found, as they're evil.

Resources