heroku push rejected. error fetching custom buildpack - angularjs

I am trying to push an angularJS web app to heroku for the very first time and unable to do so because of this error. I have done decent amount of research on this error on/off SO, tried a few things but to no avail. I am not sure about what 'buildpack' it is referring to. App runs fine on localhost:8000. Appreciate your help.
$ git push heroku master
Counting objects: 2122, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1890/1890), done.
Writing objects: 100% (2122/2122), 3.25 MiB | 138.00 KiB/s, done.
Total 2122 (delta 236), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Fetching custom git buildpack... failed
remote:
remote: ! Push rejected, error fetching custom buildpack
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to evening-wildwood-9283.
remote:
To https://git.heroku.com/evening-wildwood-9283.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/evening-wildwood-9283.git'

Related

firebase deployment issue with a react app

I'm trying to deploy my react app on firebase but i get this error:
Error: Failed to list Firebase projects. See firebase-debug.log for more info.
and in the firebase-debug.log file this shows:
[info] First, let's associate this project directory with a Firebase project.
[info] You can create multiple project aliases by running firebase use --add,
[info] but for now we'll just set up a default project.
[info]
[debug] [2021-03-20T19:18:31.200Z] > refreshing access token with scopes: []
[debug] [2021-03-20T19:18:31.202Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token
[debug] [2021-03-20T19:18:32.948Z] <<< HTTP RESPONSE 200 {"expires":"Mon, 01 Jan 1990 00:00:00
GMT","cache-control":"no-cache, no-store, max-age=0, must-revalidate","date":"Sat, 20 Mar 2021 19:18:28 GMT","pragma":"no-cache","content-type":"application/json; charset=utf-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","server":"scaffolding on HTTPServer2","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"","accept-ranges":"none","transfer-encoding":"chunked"}
[debug] [2021-03-20T19:18:33.023Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects pageSize=100
[debug] [2021-03-20T19:18:35.619Z] Failed to make request: invalid json response body at https://firebase.googleapis.com/v1beta1/projects?pageSize=100 reason: Unexpected token < in JSON at position 0
[debug] [2021-03-20T19:18:37.235Z] FirebaseError: Failed to make request: invalid json response body at https://firebase.googleapis.com/v1beta1/projects?pageSize=100 reason: Unexpected token < in JSON at position 0
at Client.request (C:\Users\john tucker\AppData\Roaming\npm\node_modules\firebase-tools\lib\apiv2.js:109:19)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
[error]
[error] Error: Failed to list Firebase projects. See firebase-debug.log for more info.
I have already tried to logout and login and made sure that my app exists in the firebase console .
I also get this error when I type firebase init in the terminal :
(node:12720) UnhandledPromiseRejectionWarning: FirebaseError: Failed to make request to https://firebase-public.firebaseio.com/cli.json
at Client.doRequest (C:\Users\john tucker\AppData\Roaming\npm\node_modules\firebase-tools\lib\apiv2.js:211:19)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:12720) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:12720) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
You have to follow this steps to deploy your react app online with fire-base hosting :
npm run build => Run the following command to create a build directory with a production build of your app
npm install -g firebase-tools => To host your site with Firebase Hosting, you need the Firebase command-line tool (CLI). Run the following npm command to install the CLI on your system globally
firebase login => If you're not logged in, you'll be asked to enter the credentials for your google account.
firebase init => to initialize firebase in your react app
firebase deploy => Firebase will now run the deploying process and will give you a unique URL where your app is deployed

Project is not pushed in Heroku

So I want to push all the new changes of my project in Heroku. However, all the changes are pushed straight away to my own GitHub repository instead of Heroku.
I am getting this
git push heroku production:master
Everything up-to-date
With remote -v
heroku git#github.com:theo82/expensify-react-app.git (fetch)
heroku git#github.com:theo82/expensify-react-app.git (push)
origin git#github.com:theo82/expensify-react-app.git (fetch)
origin git#github.com:theo82/expensify-react-app.git (push)
my realeases in Heroku's git are
v10 Set FIREBASE_API_KEY, FIREBASE_AUTH_DOMAIN, FIREBASE_DATABASE_URL, FIREBASE_PROJECT_ID, FIREBA… email#gmail.com 2020/06/04 08:56:20 +0300 (~ 23m ago)
v9 Remove KEY config vars email#gmail.com 2020/06/04 08:52:11 +0300 (~ 27m ago)
v8 Set KEY config vars email#gmail.com 2020/06/04 08:45:03 +0300 (~ 34m ago)
v7 Deploy 3284670f email#gmail.com 2020/05/28 08:01:17 +0300
v6 Deploy 8a0c21d0 email#gmail.com 2020/05/27 19:36:41 +0300
v5 Deploy b128207e email#gmail.com 2020/05/27 18:01:10 +0300
v4 Deploy 21c22fda email#gmail.com 2020/05/25 19:26:36 +0300
v3 Deploy 36ba978f email#gmail.com 2020/05/22 09:39:14 +0300
v2 Enable Logplex email#gmail.com 2020/05/22 08:58:26 +0300
v1 Initial release email#gmail.com 2020/05/22 08:58:26 +0300
Surely, I messed up something but I can't see where. I tried the solution posted here, but still have the same problem. How can I fix it?
Thanks,
Theo.
Your heroku git remote is wrongly configured.
$ git remote -v
heroku git#github.com:theo82/expensify-react-app.git (fetch)
heroku git#github.com:theo82/expensify-react-app.git (push)
origin git#github.com:theo82/expensify-react-app.git (fetch)
origin git#github.com:theo82/expensify-react-app.git (push)
They are all pointing to your GitHub. You need to fix the Heroku remote. First remove the Heroku remote
$ git remote rm heroku
$ git remote -v
origin git#github.com:theo82/expensify-react-app.git (fetch)
origin git#github.com:theo82/expensify-react-app.git (push)
Determine the link of your Heroku remote.
add the Heroku remote.
$ git remote add heroku https://git.heroku.com/yourappname.git
$ git remote -v
heroku https://git.heroku.com/yourappname.git (fetch)
heroku https://git.heroku.com/yourappname.git (push)
origin git#github.com:theo82/expensify-react-app.git (fetch)
origin git#github.com:theo82/expensify-react-app.git (push)
Push with git push heroku master

Bad Gateway 502 - Google App Engine - [CRITICAL] WORKER TIMEOUT

I was working on deploying my web application via Google App Engine when I encountered a 502 Bad Gateway Error(Nginx). After running gcloud app logs read, I tracked the error down to be:
2020-05-12 00:15:59 default[20200511t163633] "GET /input/summary" 200
2020-05-12 00:16:38 default[20200511t163633] [2020-05-12 00:16:38 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:9)
2020-05-12 00:16:38 default[20200511t163633] [2020-05-12 00:16:38 +0000] [9] [INFO] Worker exiting (pid: 9)
2020-05-12 00:16:38 default[20200511t163633] [2020-05-12 00:16:38 +0000] [15] [INFO] Booting worker with pid: 15
2020-05-12 00:16:38 default[20200511t163633] "POST /input/summary" 502
For those wondering, my app.yaml looks like this:
runtime: custom
env: flex
runtime_config:
python_version: 3
resources:
cpu: 4
memory_gb: 16
disk_size_gb: 25
readiness_check:
app_start_timeout_sec: 900
My Dockerfile looks like this:
FROM gcr.io/google-appengine/python
RUN virtualenv /env -p python3.7
ENV VIRTUAL_ENV /env
ENV PATH /env/bin:$PATH
ADD requirements.txt /app/requirements.txt
RUN pip3 install -r /app/requirements.txt
ADD . /app
RUN apt-get update \
&& apt-get install tesseract-ocr -y
EXPOSE 8080
ENTRYPOINT ["gunicorn", "--bind=0.0.0.0:8080", "main:app"]
I am running the app through:
if __name__ == '__main__':
app.run(debug=True, host='0.0.0.0', port=8080)
Everything seems to work fine on localhost but the problems arise when I deploy to Google App Engine. Does anyone know what may be the root of the issue? Thanks in Advance!
Is it failing to deploy? Or does the deploy succeed, but the server fails to run?
If its failing to deploy, you may be hitting the 10 minute timeout that deploy jobs have to finish. You can increase this number by setting your local gcloud config.
gcloud config set app/cloud_build_timeout 1200s

Gunicorn Command Line Error inGoogle App Engine Standard Environment

I'm getting an endless stream of the following errors after deploying a Flask/Python3/Postgres app to app engine standard environment. The warning about Psycopg2 package is of concern, but not what's causing the app to fail to run. Rather, it's the invalid command line arguments to gunicorn, which are supplied by GAE, not by me. Is anyone able to deploy a Python3 Flask that uses Postgres to the Standard environment successfully?
Here's the log file output:
2018-12-11 02:51:37 +0000] [3738] [INFO] Booting worker with pid: 3738
2018-12-11 02:51:37 default[20181210t140744] /env/lib/python3.7/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
2018-12-11 02:51:37 default[20181210t140744] """)
2018-12-11 02:51:38 default[20181210t211942] usage: gunicorn [-h] [--debug] [--args]
2018-12-11 02:51:38 default[20181210t211942] gunicorn: error: unrecognized arguments: main:app --workers 1 -c /config/gunicorn.py
2018-12-11 02:51:38 default[20181210t211942] [2018-12-11 02:51:38 +0000] [882] [INFO] Worker exiting (pid: 882)
By default, if entrypoint is not defined in app.yaml, App Engine will look for an app called app in main.py. If you look at the official code sample in Github, it addresses it in the main.py file by declaring:
app = Flask(__name__)
Alternatively, this can be configured by adding an entrypoint to app.yaml pointing to another file. For example, if you declare app in a file called prod:
entrypoint: gunicorn -b :$PORT prod.app
You'll find additional details about the entrypoint configuration here.
From the comment and answer above, It looked like the problem had to be in my app. I confirmed that by running gunicorn locally on a bare-bones app without difficulty, but failing when running the real app.
One culprit turned out to be the use of argparse, which I was using so I could add a "debug" argument to the command line when working locally. Moving that code to the if __name__ == '__main__': section made the app run fine when using gunicorn locally.
But it still fails when deployed to GAE:
2018-12-12 20:09:16 default[20181212t094625] [2018-12-12 20:09:16 +0000] [8145] [INFO] Booting worker with pid: 8145
2018-12-12 20:09:16 default[20181212t094625] /env/lib/python3.7/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
2018-12-12 20:09:16 default[20181212t094625] """)
2018-12-12 20:09:16 default[20181212t094625] [2018-12-12 20:09:16 +0000] [8286] [INFO] Booting worker with pid: 8286
2018-12-12 20:09:16 default[20181212t094625] /env/lib/python3.7/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
2018-12-12 20:09:16 default[20181212t094625] """)
2018-12-12 20:09:19 default[20181212t094625] usage: gunicorn [-h] [--debug] [--args]
2018-12-12 20:09:19 default[20181212t094625] gunicorn: error: unrecognized arguments: -b :8081 main:app
2018-12-12 20:09:19 default[20181212t094625] [2018-12-12 20:09:19 +0000] [8145] [INFO] Worker exiting (pid: 8145)
Here’s app.yaml (minus the environment variable for SendGrid):
runtime: python37
env: standard
#threadsafe: true
entrypoint: gunicorn --workers 2 --bind :5000 main:app
#runtime_config:
# python_version: 3
# This beta setting is necessary for the db hostname parameter to be able to handle a URI in the
# form “/cloudsql/...” where ... is the instance given here:
beta_settings:
cloud_sql_instances: provost-access-148820:us-east1:cuny-courses

Unknown artifact sbtplugin Super safe compiler with scala 2.12

In my sbt project in Scala 2.12 I am using IntelliJ IDEA and want to import scalatest.
In order to install the recommended SuperSafe Community Edition Scala compiler plugin. I followed the instruction here.
My plugin.sbt:
addSbtPlugin("com.artima.supersafe" % "sbtplugin" % "1.1.2")
the error showed by the Intellij import is:
SBT project import
[warn] [FAILED ] com.artima.supersafe#sbtplugin;1.1.2!sbtplugin.jar(src): (0ms)
[warn] ==== typesafe-ivy-releases: tried
[warn] https://repo.typesafe.com/typesafe/ivy-releases/com.artima.supersafe/sbtplugin/scala_2.10/sbt_0.13/1.1.2/srcs/sbtplugin-sources.jar
[warn] ==== sbt-plugin-releases: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.artima.supersafe/sbtplugin/scala_2.10/sbt_0.13/1.1.2/srcs/sbtplugin-sources.jar
[warn] ==== local: tried
[warn] /Users/salvob/.ivy2/local/com.artima.supersafe/sbtplugin/scala_2.10/sbt_0.13/1.1.2/srcs/sbtplugin-sources.jar
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/artima/supersafe/sbtplugin_2.10_0.13/1.1.2/sbtplugin-1.1.2-sources.jar
[warn] ==== Artima Maven Repository: tried
[warn] http://repo.artima.com/releases/com/artima/supersafe/sbtplugin_2.10_0.13/1.1.2/sbtplugin-1.1.2-sources.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: FAILED DOWNLOADS ...
Maybe incompatility with new Scala Version?
Try the following:
When we add the plug-in in projects/build.sbt:
addSbtPlugin("com.artima.supersafe" % "sbtplugin" % "1.1.2")
We must not add the above plug-in anywhere else
Add to ~/.sbt/0.13/global.sbt
resolvers += "Artima Maven Repository" at "http://repo.artima.com/releases"
Do not add this resolver anywhere else
Make sure you have an empty line before and after each of the sbt lines
HTHs

Resources