Heroku Toolbelt is currently updating issue - heroku-toolbelt

My Heroku Toolbelt is stuck updating.
When I run heroku in a console it says
Heroku Toolbelt is currently updating.
I have tried to uninstall and re-install but still the same issue.
I also tried to remove it with revo uninstaller.
Any ideas on how to fix?

Instead of completely uninstalling and reinstalling, I deleted a file called "updating" in "C:\Users\Profile-name\.heroku" and it started responding to commands again

I had the same issue with the older buggy Heroku toolbelt version. Except my heroku commands were not running from local but from Semaphore as a sequence of deploy steps.
Just running a update command first thing seems to solve the issue. Of this helps with your local toolbelt as well.
heroku update

The 5 minute update by heroku can be bypassed by removing the background_update! line from updater.rb or updating the toolbelt to version 3.15.2. That version will only lock if there really is an update instead of every 5 minutes.

Uninstall Toolbelt.
Manually delete
C:\Program Files (x86)\Heroku
C:\Users\Profile-name\ .heroku
Re-install toolbelt.

As of version 0.3.15 of heroku toolbelt, heroku toolbelt will fail if an autoupdate is already in progress. Heroku toolbelt will check every 5 minutes for an update, so back-to-back heroku commands will fail unless another single heroku command has been run within the last 5 minutes. This behavior was introduced by this commit:
https://github.com/heroku/heroku/commit/023c84d15cde5958631b240eeaadec01a3b49031
I noticed this because it breaks heroku_san which typically makes multiple heroku commands back-to-back. Unfortunately, I don't see a workaround. It would help toolbelt could provide some sort of option to disable autoupdate or increase the time period for checks.

Related

How can I have my previous code through rollback on Heroku?

I have a problem with my app when I uploaded it on heroku, I used the rollback to go back to a previous version without errors and it seems to be fine when I give it open app.
However, the code in pycharm shows the same errors, and if I commit, I get the errors of the latest version as if the code does not have the previous version, can I do something to recover that code?
You can just rollback to whatever previous version you like and then use
heroku git:clone -a APP-NAME
to get your code back.

Apache Superset error when installing locally using Docker Compose

I'm trying to install to my Ubuntu 20.04 local machine using docker-compose. When I run sudo docker-compose -f docker-compose-non-dev.yml up, I got several errors and the process keep giving errors and did not end, so I aborted. Can you please tell me what the problem is?
The errors I get during Init Step 1/4 [Starting] -- Applying DB migrations are:
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) >relation "logs" does not exist
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) >relation "ab_permission_view_role" does not exist
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) >relation "report_schedule" does not exist
I had the same same issue on Mac OS. And similar issues have been reported in the GitHub issues page as well, but it was not reproducible by everyone.
There is a possibility that something may have gone wrong in the first run.
Try running docker-compose down -v and then run docker compose up.
If the above fails, try upgrading your docker installation. Installing a new version solved my problem.
I had the same issue (Mac OS Monterey) where I had an instance of docker running Postgres for one of my apps, so when Superset started, it was looking at that instance of Postgres which obviously didn't have the appropriate databases/tables/views/etc.
So just stopping that other instance and restarting the Superset containers fixed the errors and properly started Superset. #embarrassed #oops
I experienced the same issue but these errors were at the end of a long string of cascading errors. I had this error consistently across all runs.
Looking at the first error, it seems like the initialisation script is not waiting for PostgreSQL to be ready and starts transacting right away. If the first transactions fail, many others fail subsequently. In my case the database needed a few more seconds to be ready so, I just added a sleep 60 at the beginning of docker/docker-bootstrap.sh to give time to PostgreSQL to start before other services start working.
I deleted the previously-created docker volumes and ran docker-compose -f docker-compose-non-dev.yml up again and now all works fine.

Django-Heroku Deployment Procfile

I've created a basic Django app and I wanted to deploy it with Heroku. I have followed all the instructions given on Heroku but there was one error I made which was naming the file "procfile" instead of "Procfile". Now the website has been deployed but it only opens up to an application error. Upon checking the log, I have found the error code to be H14. I have since renamed the "procfile" to "Procfile" but the change doesnt seem to be integrated. How do I fix this?
Add the change on your repository, commit it, and push the applicable branch to Heroku. Finally, try to run Heroku again.

Django Analytical Google Analytics Display Advertising working on development, staging but not production

Running Django 1.6 and Analytical 0.16.0
I have the following in my settings.py
GOOGLE_ANALYTICS_PROPERTY_ID = env_var('GOOGLE_ANALYTICS_PROPERTY_ID')
GOOGLE_ANALYTICS_DISPLAY_ADVERTISING = True
and the google analytics code shows up as expected when I run the site locally and on the staging server (ie. running the doubleclick dc.js analytics script), however when running on production it still shows the default Google Analytics ga.js script.
It isn't affected by DEBUG being on or off and as I can tell the settings and env are the same on production and staging servers (both runnning on Heroku). Can anyone offer an explanation of why this might be the case?
edit: SOLVED. Turns out I was still running Analytical 0.15.0 on the production server. I had wrongly assumed that heroku automatically installed the latest version if the version wasn't specified in the pip requirements.
Check that Heroku is running the same versions of each program:
heroku pip freeze
It turns out it was still running an old version of django-analytical as the version number wasn't specified in the pip requirements file. Heroku won't upgrade an existing program unless explicitly specified. Changing the requirements.txt to the following solved it.
django-analytical==0.16.0

django non-rel rollback

I cancelled a deployment to GAE while using django non-rel's manage.py deploy.
Now when I try to redeploy it says Another transaciton is already in progress and use appcfg to rollback.
But django non-rel doesn't have appcfg.py so how can I rollback or fix this issue?
I've scoured the internet and can't find any answers. I've waited about half an hour and it still displays this message.
manage.py deploy calls appcfg.py in order to deploy.
appcfg.py is in the SDK. you must have the SDK installed somewhere if "manage.py deploy" is working. you can look around for it, or download the SDK again.
There's no reason you don't have access to appcfg.py
If you need more help finding it, add details about what platform you're running on, where you installed the appengine SDK and where your python folder is.
What do you mean by "I don't have access to appcfg.py"?
Try going to cmd (for windows), navigate to your app directory, and type in the following:
appcfg.py rollback .
Hit return (enter key) and see if that works. If not, what does it display?