[GH-ISSUE #1222] No Popup after API-Key creation #827

Closed
opened 2026-02-25 23:43:43 +03:00 by kerem · 10 comments
Owner

Originally created by @hagen-bauer-regioit on GitHub (Oct 24, 2025).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/1222

I am running healthcheck selfhosted. When I create an api key there is no dialog box to copy the key. It just creates the key. I Assume this happens after the last update to 3.11.2. There is no error in the Browser console and it is the same behaviour on Chrome and Firefox. I do get popups when revoking a key.
Any hints where to look for errors would be appreciated

Hagen

Originally created by @hagen-bauer-regioit on GitHub (Oct 24, 2025). Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/1222 I am running healthcheck selfhosted. When I create an api key there is no dialog box to copy the key. It just creates the key. I Assume this happens after the last update to 3.11.2. There is no error in the Browser console and it is the same behaviour on Chrome and Firefox. I do get popups when revoking a key. Any hints where to look for errors would be appreciated Hagen
kerem closed this issue 2026-02-25 23:43:43 +03:00
Author
Owner

@cuu508 commented on GitHub (Oct 27, 2025):

Thanks for the report!

I'm assuming the issue is when creating a ping key, not the API key?

For API keys, we need to display the dialog because Healthchecks stores API keys in a hashed form and so can only show them right after the generation.

Healthchecks stores ping keys in plain text, and so can show them to the user at any time. The user can reveal the full ping key by clicking on the masked version (I'm guessing this is unintuitive, hence the issue). I didn't add a popup for ping keys because they don't strictly need it. But for the sake of consistency, I've added it now, looks like so:

Image
<!-- gh-comment-id:3450887910 --> @cuu508 commented on GitHub (Oct 27, 2025): Thanks for the report! I'm assuming the issue is when creating a ping key, not the API key? For API keys, we *need* to display the dialog because Healthchecks stores API keys in a hashed form and so can only show them right after the generation. Healthchecks stores ping keys in plain text, and so can show them to the user at any time. The user can reveal the full ping key by clicking on the masked version (I'm guessing this is unintuitive, hence the issue). I didn't add a popup for ping keys because they don't strictly need it. But for the sake of consistency, I've added it now, looks like so: <img width="985" height="505" alt="Image" src="https://github.com/user-attachments/assets/5d0a3a1a-e63c-4a77-9d0a-f2df92dec6fd" />
Author
Owner

@hagen-bauer-regioit commented on GitHub (Oct 28, 2025):

@cuu508 There is NO dialog box when creating an API key and I can also not view a mask version of a ping key.

<!-- gh-comment-id:3454795634 --> @hagen-bauer-regioit commented on GitHub (Oct 28, 2025): @cuu508 There is NO dialog box when creating an API key and I can also not view a mask version of a ping key.
Author
Owner

@cuu508 commented on GitHub (Oct 28, 2025):

@hagen-bauer-regioit ah, I see. In that case, my first suspect would be old JS cached by the browser. Could you try opening web developer tools (this usually disables cache) and revoke/create an API key then?

Also, in your Healthchecks instance, is the DEBUG setting set to False? With DEBUG=False Healthchecks uses django-compressor to combine JS and CSS files, which should also take care of cache invalidation. With DEBUG=True (or django-compressor disabled some other way), I would expect the browser to cache static files and cause issues similar to what you describe.

<!-- gh-comment-id:3455054388 --> @cuu508 commented on GitHub (Oct 28, 2025): @hagen-bauer-regioit ah, I see. In that case, my first suspect would be old JS cached by the browser. Could you try opening web developer tools (this usually disables cache) and revoke/create an API key then? Also, in your Healthchecks instance, is the DEBUG setting set to False? With DEBUG=False Healthchecks uses django-compressor to combine JS and CSS files, which should also take care of cache invalidation. With DEBUG=True (or django-compressor disabled some other way), I would expect the browser to cache static files and cause issues similar to what you describe.
Author
Owner

@hagen-bauer-regioit commented on GitHub (Oct 28, 2025):

Debug is set to False and disabling cache via developer tools didnt help either :-(

<!-- gh-comment-id:3455494808 --> @hagen-bauer-regioit commented on GitHub (Oct 28, 2025): Debug is set to False and disabling cache via developer tools didnt help either :-(
Author
Owner

@cuu508 commented on GitHub (Oct 28, 2025):

What version of Healthchecks are you running? If you are using docker, what image and version are you using?

<!-- gh-comment-id:3455515504 --> @cuu508 commented on GitHub (Oct 28, 2025): What version of Healthchecks are you running? If you are using docker, what image and version are you using?
Author
Owner

@hagen-bauer-regioit commented on GitHub (Oct 28, 2025):

I updated to 3.11.2 using this procedure

VER=v3.11.2
echo $VER
cd healthchecks/
git fetch
git checkout $VER
./manage.py migrate
pip3.11 install jwt
 ./manage.py migrate
 ./manage.py makemigrations
 ./manage.py migrate
<!-- gh-comment-id:3455526408 --> @hagen-bauer-regioit commented on GitHub (Oct 28, 2025): I updated to 3.11.2 using this procedure ``` VER=v3.11.2 echo $VER cd healthchecks/ git fetch git checkout $VER ./manage.py migrate pip3.11 install jwt ./manage.py migrate ./manage.py makemigrations ./manage.py migrate ```
Author
Owner

@cuu508 commented on GitHub (Oct 28, 2025):

Unfortunately so far I haven't been able to reproduce the issue.

I tried the following steps:

git clone git@github.com:healthchecks/healthchecks.git
cd healthchecks/
git fetch
git checkout v3.11.2
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
./manage.py migrate
./manage.py createsuperuser
./manage.py collectstatic
DEBUG=False ./manage.py compress
DEBUG=False ./manage.py runserver

I then logged in using the same credentials as in manage.py createsuperuser, created an API key and saw the popup.

<!-- gh-comment-id:3455556978 --> @cuu508 commented on GitHub (Oct 28, 2025): Unfortunately so far I haven't been able to reproduce the issue. I tried the following steps: ```bash git clone git@github.com:healthchecks/healthchecks.git cd healthchecks/ git fetch git checkout v3.11.2 python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt ./manage.py migrate ./manage.py createsuperuser ./manage.py collectstatic DEBUG=False ./manage.py compress DEBUG=False ./manage.py runserver ``` I then logged in using the same credentials as in `manage.py createsuperuser`, created an API key and saw the popup.
Author
Owner

@cuu508 commented on GitHub (Oct 28, 2025):

You have ./manage.py makemigrations in the list of your commands, and you are also installing jwt. Do you have any local modifications or extra files? Anything interesting in local_settings.py?

<!-- gh-comment-id:3455565254 --> @cuu508 commented on GitHub (Oct 28, 2025): You have `./manage.py makemigrations` in the list of your commands, and you are also installing jwt. Do you have any local modifications or extra files? Anything interesting in local_settings.py?
Author
Owner

@cuu508 commented on GitHub (Oct 28, 2025):

And another question, after upgrading to v3.11.2, did you run manage.py collectstatic and manage.py compress? (see "Management commands that need to be run during each deployment" here).

<!-- gh-comment-id:3455577033 --> @cuu508 commented on GitHub (Oct 28, 2025): And another question, after upgrading to v3.11.2, did you run `manage.py collectstatic` and `manage.py compress`? (see "Management commands that need to be run during each deployment" [here](https://github.com/healthchecks/healthchecks?tab=readme-ov-file#running-in-production)).
Author
Owner

@hagen-bauer-regioit commented on GitHub (Oct 28, 2025):

the jwt installation was necessary because there was someting missing and the "make migration" was something manage.py migrate told be to do.

but its working now. I have now run

pip install -r requirements.txt
./manage.py migrate
./manage.py compress --force
systemctl restart healthcheck

I have not seen this as part of the upgrade and misintetpretated "part of every deployment".

I will try to make a better documentation for my next upgrade and maybe this will help to add a dedicated "update/upgrade" chapter.

<!-- gh-comment-id:3455636399 --> @hagen-bauer-regioit commented on GitHub (Oct 28, 2025): the jwt installation was necessary because there was someting missing and the "make migration" was something manage.py migrate told be to do. but its working now. I have now run ``` pip install -r requirements.txt ./manage.py migrate ./manage.py compress --force systemctl restart healthcheck ``` I have not seen this as part of the upgrade and misintetpretated "part of every deployment". I will try to make a better documentation for my next upgrade and maybe this will help to add a dedicated "update/upgrade" chapter.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#827
No description provided.