The project is attached through my github and it builds successfully, when I click "Open App" I get this an "Application Error"...
My "log" on Heroku looks like:
Node.js app detected
Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NPM_CONFIG_PRODUCTION=true
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)
Resolving node version 6.x...
Downloading and installing node 6.11.2...
Using default npm version: 3.10.10
Restoring cache
Loading 2 from cacheDirectories (default):
- node_modules
- bower_components (not cached - skipping)
Building dependencies
Installing node modules (package.json)
Caching build
Clearing previous node cache
Saving 2 cacheDirectories (default):
- node_modules
- bower_components (nothing to cache)
Build succeeded!
Discovering process types
Procfile declares types -> (none)
Default types for buildpack -> web
Compressing...
Done: 42.5M
Launching...
Released v10
https://ken-neiheisel-studio.herokuapp.com/ deployed to Heroku
And my package.json
Not sure exactly what the problem is?
Recently had same problem using Heroku for the 1st time, where everything looked right, the Build completed fine, yet I couldn't seem to not get the "Procfile declares types -> (none)" error in the log. I tried everything then realized I must have previously bad version of Procfile in that project that was invisible to me. I was looking at my visible Folders in Windows, where the Procfile was perfect.
To fix I deleted my Procfile from the projecct folder. Did a fresh git add . and a fresh git commit -m "xxx" to load all the files to git/heroku...leaving Procfile out intentionally. That served to clear out the bad version of Procfile that was stored or cached in git or heroku. Then I added a new Procfile to the folder. Another git add . and commit -m, and finally all the weird errors surrounding the Procfile cleared and the App loaded to heroku/web.
Related
Hi we are seeing wrong go version is downloaded when i push my binary file to cf
Steps followed to push code
run go build command
GOOS="linux" GOARCH=amd64 go build ${LDFLAGS} -o localdeploy/some-app main.go
cd localdeploy
cf push -f manifest.yml
Note: localdeploy folder contains manifest.yml and some-app binary file
Go.mod file
go 1.16
require (
github.com/cloudfoundry-community/go-cfenv v1.18.0
github.com/gin-gonic/gin v1.8.1
github.com/google/uuid v1.3.0
github.com/rs/zerolog v1.28.0
github.com/stretchr/testify v1.8.0
)
manifest file.yml
applications:
- name: some-app-1000-snapshot
command: ./some-app
stack: cflinuxfs3
buildpacks:
- https://github.com/cloudfoundry/binary-buildpack.git
Then i see following logs downloading go 1.15.5 instead of go 1.16
Below are the logs getting when pushed to cf --- application is working but why it is downloading 1.15 instead of 1.16 which is present in my mod file
Staging app and tracing logs...
-----> Download go 1.15.5
-----> Running go build supply
/tmp/buildpackdownloads/d612ac0e3047b21e80ecfeae72c39f81 ~
~
-----> Binary Buildpack version 1.0.46
-----> Download go 1.15.5
-----> Running go build finalize
/tmp/buildpackdownloads/d612ac0e3047b21e80ecfeae72c39f81 ~```
The binary buildpack doesn't install anything for your application. It is effectively a no-op buildpack.
Since you have compiled your application locally, the version of Go that is used for your binary is the version installed locally on your computer. You control that version based on what you have installed locally.
The output of the binary buildpack is confusing here, because you do see it downloading an older Go version. The reason this happens is because the buildpack itself is written in Go and you have the buildpack definition in your manifest.yml pointing to the source code of the buildpack. Thus to run the buildpack, it has to compile itself first. It needs Go to do that, so it downloads Go, builds itself, then runs itself. That's what you're seeing where it says Download go 1.15.5.
Most (all?) CloudFoundry installations are going to have the binary buildpack by default, so you don't need to reference the source. Run cf buildpacks and get the name of the binary buildpack from the list. It'll be something like binary-buildpack or binary_buildpack. Edit your manifest.yml and replace https://github.com/cloudfoundry/binary-buildpack.git with that value.
Now when you push, it'll use the existing buildpack which is already compiled and you shouldn't see those messages about Go being downloaded.
When trying to deploy a branch on a Heroku app, I'm getting the following error:
Host key verification failed.
fatal: Could not read from remote repository.
There is one exception to this verification failed: I can deploy my branch on one specific pre-existing app with no issue. However, other than that specific app, I can't seem to deploy the branch - even when I create entirely new apps.
Heroku has a support page for this particular issue here: https://help.heroku.com/SP5I8HXO/host-key-verification-error-when-accessing-private-github-repository
However, it's not clear to me what I should do once I generate the PAT. Also, it's not clear to me why this issue would show up on review apps (part of the same pipeline as the one app that's working) and on entirely new apps.
How do I resolve this issue?
Edit:
Here's the complete deployment log.
Building on the Heroku-18 stack
Determining which buildpack to use for this app
Node.js app detected
Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
USE_YARN_CACHE=true
NODE_ENV=production
NODE_MODULES_CACHE=true
NODE_VERBOSE=false
Installing binaries
engines.node (package.json): 16.x
engines.npm (package.json): unspecified (use default)
engines.yarn (package.json): 1.22.x
Resolving node version 16.x...
Downloading and installing node 16.13.1...
Using default npm version: 8.1.2
Resolving yarn version 1.22.x...
Downloading and installing yarn (1.22.17)
Installed yarn 1.22.17
Installing dependencies
Installing node modules (yarn.lock)
yarn install v1.22.17
[1/4] Resolving packages...
warning react-scripts > webpack-dev-server > chokidar > fsevents#1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
[2/4] Fetching packages...
error Command failed.
Exit code: 128
Command: git
Arguments: ls-remote --tags --heads ssh://git#github.com/ljharb/qs.git
Directory: /tmp/build_5650c4ab
Output:
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
I recently solved this issue which occurred when switching over to yarn from npm.
The solution was to clear the buildpack cache.
I was deploying using a github actions script, here is what I did.
In the file .github/workflows/deploy.yml which configured the deployment to heroku through github actions I added buildpack: false.
This cleared the buildpack cache in heroku and then the deployment completed successfully.
Afterwards I enabled buildpack caching again and all was well.
Heroku's documentation isn't entirely clear:
Heroku does not have the private keys necessary to access your private Github repositories, and as such, attempts to access those private repos will fail.
This affects access via SSH, i.e. URLs named like git#github.com:username/repo.git.
The suggestion to use a token instead also requires that you change to an HTTPS URL. You can copy your HTTPS URL from your repository, via the "Code" dropdown:
Click on "HTTPS", then copy the URL. Or, you can just reformat your existing URL so that it matches https://github.com/username/repo.git.
The token you generated can be used in place of a password when cloning via HTTPS, but you need to provide it to Heroku somehow. URLs have a built-in mechanism for this, called the "authority".
To add the username username and personal access token token to the URL, add username:token# between https:// and github.com:
https://username:token#github.com/username/repo.git
Give that URL to Heroku and try again.
I have added this pdftk buildpack to my free app on Heroku: https://github.com/fxtentacle/heroku-pdftk-buildpack.git.
I am unable to deploy my application to Heroku:
Preparing runtime environment...
-----> Checking for additional extensions to install...
-----> heroku-pdftk-buildpack app detected
cp: cannot stat 'binaries-heroku-18/*': No such file or directory
! Push rejected, failed to compile heroku-pdftk-buildpack app.
! Push failed
Also, I have added heroku/php and set the index of this buildpack to 1. When I go to my app's temporary URL, Laravel runs, but for some reasons, pdftk doesn't seem to run. Has anybody faced the same issue?
That buildpack hasn't been updated for the heroku-18 stack. Its compile script tries to copy precompiled binaries from binaries-$STACK/ into /app/bin/, but only contains binary directories for cedar-14 and heroku-16.
You could roll your app back to heroku-16, which will be supported until April, 2021, but of course this will also change other package versions:
heroku apps:stacks:set heroku-16 --app myapp
This would be very similar to going from Ubuntu 18.04 to Ubuntu 16.04, but it's likely to be your simplest solution.
Alternatively, you could fork the pdftk buildpack you found and update it for Ubuntu 18.04, but that isn't likely to be straightforward.
pdftk was removed from Ubuntu's official repositories because it depends on a deprecated library called gcj. The buildpack you're trying to use includes libgcj for cedar-14 and heroku-16 in their respective binary directories. You'll have to include that as well if you want to update the buildpack.
Also, I have added heroku/php and set the index of this buildpack to 1. When I go to my app's temporary URL, Laravel runs, but for some reasons, pdftk doesn't seem to run. Has anybody faced the same issue?
The error you're seeing is preventing your application from being deployed. You're not seeing a new version of the application with pdftk, but whatever was last deployed successfully. You'll have to resolve the build issue before you can use pdftk.
I followed this article (http://derekbarber.ca/blog/2014/11/20/using-pdftk-with-rails-on-heroku/) and got PDFTK working on Heroku-18, though on a Rails app.
Code excerpted below, HT #derek-barber.
mkdir -p [my_project]/vendor/pdftk/lib [my_project]vendor/pdftk/bin
cd /tmp
git clone https://github.com/millie/pdftk-source.git
cd pdftk-source
tar xzvf pdftk.tar.gz
mv bin/pdftk [my_project]/vendor/pdftk/bin/
mv lib/libgcj.so.12 [my_project]/vendor/pdftk/lib/
cd [my_project]
git add -f vendor/pdftk/
git commit -m "Add pdftk dependencies"
git push heroku master
heroku config:set LD_LIBRARY_PATH=/app/.heroku/vendor/lib:/app/vendor/pdftk/lib
heroku config:set PATH=/app/.heroku/python/bin:/usr/local/bin:/usr/bin:/bin:/app/vendor/p
Once this PR is merged: https://github.com/fxtentacle/heroku-pdftk-buildpack/pull/9 then the buildpack should work with heroku-18 stack.
Maybe leave a comment to the repo owner asking them to merge?
For now, you could use the forked & updated version: https://github.com/Aesthetikx/heroku-pdftk-buildpack which works with heroku-18 stack.
If you are using an app.json file, then point the pdftk buildpack to the forked version:
"buildpacks": [
...,
{
"url": "https://github.com/fxtentacle/heroku-pdftk-buildpack.git"
}
]
I am trying to make a copy of this Elm web-app with Heroku. When I click 'Deploy App' however, the build log displays this:
-----> Source app detected
-----> Creating profile.d script
SOURCE_VERSION:
Script installed to .profile.d/source_version.sh
-----> Elm app detected
-----> Retrieving 0.18.0
https://s3.amazonaws.com/heroku-buildpack-elm/assets/elm/0.18.0/elm:
2018-10-22 04:07:13 ERROR 403: Forbidden.
! Push rejected, failed to compile Elm app.
! Push failed
I have checked the app.json file and I didn't notice anything strange with it. Could this be related to the issues that Github is having right now (in Australia at least)? Am I doing something wrong? As soon as Github have fixed their issue I will try making an issue there, but the last commit was 2 years ago so that probably wouldn't do much. Thanks.
The documentation here says that heroku with pre-compile assets during deployement in Rails4.
However ,
I dont see the precompile assets message.
Using thin (1.6.1)
Using twitter-bootstrap-rails (2.2.8)
Using uglifier (2.3.1)
Using will_paginate (3.0.4)
Your bundle is complete! It was installed into ./vendor/bundle
Bundle completed (1.37s)
Cleaning up the bundler cache.
-----> Writing config/database.yml to read from DATABASE_URL
Detected manifest file, assuming assets were compiled locally
-----> Discovering process types
Procfile declares types -> (none)
Default types for Ruby -> console, rake, web, worker
I am facing issues with bootstrap in my app, where the nav bar wont load properly + some other nuances and I think its the asset precompile issue.
I am using Rails4, Ruby2.0
I have assets enabled in application.rb
config.assets.enabled = true
Precompiling manually did not help
heroku run rake assets:precompile
Had this same problem. I had precompiled locally for some reason and then pushed to Heroku.
Saw Heroku give the line "Detected manifest file, assuming assets were compiled locally" which made me realize it wasn't precompiling all the things.
When I did a "git add ." and committed, I saw that it was adding a bunch of public files. Pushing that to Heroku got it to work. So I had to precompile and git add everytime, basically doing Heroku's work for it and making a mess in my public folder. It got the job done, but was a poor fix.
I looked for the "manifest" that heroku mentioned and eventually found a ".sprockets-manifest..." file in the public directory.
Deleted that and Heroku was once again my friend.
Found this question as part of my research so I thought I'd share what I found in case anyone else sees this, or has any elaborational thoughts.
Now I have to go and see if .sprockets-manifest was important to anything else ....
I struggled with the asset pipeline for a while. There seems to be a bit of confusion as to how the asset pipeline works among newer Rubyists. In my experience, this is my workflow to the asset pipeline for Heroku.
Make sure that assets work locally on localhost (required for Heroku)
Delete the public/assets folder in the Rails directory with rm -rf ./public/assets
Make a new assets directory with mkdir public/assets
Run the rake assets:precompile command
You should see a list of assets being precompiled in your command line
Once assets are precompiled, you should commit the changes via the following commands: git add -A then git commit -am "commit message goes here"
Finally, push to heroku via git push heroku master
NOTE: This bears repeating -- make sure your assets work normally on localhost before pushing to Heroku.
Deleting the public/assets folder helped. Also I ran heroku run rake assets:clean.
After that I could see:
----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
The navbar loads fine now !
The message Detected manifest file, assuming assets were compiled locally is shown if there is .sprockets-manifest-*.json or manifest-*.json in public assets. So either removing individual file or whole public/assets works.
The source code for buildpack is here