Gramps Web & Gramps 6.0: Beta Testers Wanted

The Gramps Web Docker development images (tag latest-devel) are now based on the development version of Gramps Web API 3.0, which is based on Gramps 6.0.1. Before tagging a release, it would be great to get some feedback from people trying it out.

Please back up your tree before testing! You can download a Gramps XML export or synchronize with a local Gramps 5.2 instance before switching to the new version.

How to upgrade

If you use Docker, it’s enough to use the latest-devel tag of the image, pull a new image, and restart your container. The Gramps Web interface should display a message that the Gramps database needs to be upgraded to a new schema (just like the Gramps 5.1->5.2 upgrade last year).

Please report success and failure!

In case of success, please report the following:

  • database backend (SQLite, PostgreSQL, or SharedPostgreSQL)
  • single-tree or multi-tree setup

In case of problems, please share the logs of your Gramps Web and your Celery container (whichever shows an error).

Thanks for your support!

4 Likes

(And please also report success/failure with the Gramps Web Sync addon after upgrading both Gramps Web and Gramps Desktop :blush:)

2 Likes

I ran a docker compose pull, but my Gramps Web is still version 5.2.4

I’m not sure how to use latest-devel, apparently my docker compose pull command doesn’t have this option.

$ docker compose --help pull

Usage:  docker compose pull [OPTIONS] [SERVICE...]

Pull service images

Options:
      --dry-run                Execute command in dry run mode
      --ignore-buildable       Ignore images that can be built
      --ignore-pull-failures   Pull what it can and ignores images with pull failures
      --include-deps           Also pull services declared as dependencies
      --policy string          Apply pull policy ("missing"|"always")
  -q, --quiet                  Pull without printing progress information

Must I edit the docker-compose.yaml file?

Hi, yes, if you use the docker compose file as in the documentation, it has image: ghcr.io/gramps-project/grampsweb:latest, which means it will use the latest release image. If you change that to image: ghcr.io/gramps-project/grampsweb:latest-devel and pull again, it will use the development image.

Using an nginx reverse proxy docker-compose.yml, I changed the
image label to latest-devel for the grampsweb service, then did this:

$ sudo docker-compose pull
$ sudo docker-compose up -d
$ sudo docker-compose restart

All of that seemed to work just fine. When I went to the web site, I did indeed get the upgrade database page; however, when I pushed the upgrade button, all I get is a llittle red x and a popup message saying:

module ‘gramps.gen.lib’ has no attribute ‘7’

I thought perhaps this was because the browser still thought I was logged in, so I logged out and back in, but got the same result.

This is on Debian 12.10, with an sqlite db, and a single db. I did not change any of the other image tags, so everything except redis used the defaults; redis used 7.2.4-alpine.

What info can I get to help with debugging?

And THANK YOU for doing this work, and being so quick! I can’t tell you how much I appreciate it.

2 Likes

Hey @DavidMStraub
Seing the same as @ahs3
Here’s the logs

$ docker compose logs
WARN[0000] /home/gramps/docker-compose.yaml: `version` is obsolete
grampsweb  |
grampsweb  | (__main__.py:8): Gtk-CRITICAL **: 15:55:52.170: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
grampsweb  | Two Gramps application data directories exist.
grampsweb  | INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
grampsweb  | INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
grampsweb  | [2025-04-25 15:55:55 +0000] [10] [INFO] Starting gunicorn 23.0.0
grampsweb  | [2025-04-25 15:55:55 +0000] [10] [INFO] Listening at: http://0.0.0.0:5000 (10)
grampsweb  | [2025-04-25 15:55:55 +0000] [10] [INFO] Using worker: sync
grampsweb  | [2025-04-25 15:55:55 +0000] [11] [INFO] Booting worker with pid: 11
grampsweb  | [2025-04-25 15:55:55 +0000] [12] [INFO] Booting worker with pid: 12
grampsweb  | [2025-04-25 15:55:55 +0000] [13] [INFO] Booting worker with pid: 13
grampsweb  | [2025-04-25 15:55:55 +0000] [14] [INFO] Booting worker with pid: 14
grampsweb  | [2025-04-25 15:55:55 +0000] [15] [INFO] Booting worker with pid: 15
grampsweb  | [2025-04-25 15:55:55 +0000] [16] [INFO] Booting worker with pid: 16
grampsweb  | [2025-04-25 15:55:55 +0000] [17] [INFO] Booting worker with pid: 17
grampsweb  | [2025-04-25 15:55:55 +0000] [18] [INFO] Booting worker with pid: 18
grampsweb  | Two Gramps application data directories exist.
[** 6 identical line deleted **]
grampsweb  | Two Gramps application data directories exist.
grampsweb  |
grampsweb  | (gunicorn:11): Gtk-CRITICAL **: 15:56:10.835: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
[** 6 identical lines deleted **]
grampsweb  |
grampsweb  | (gunicorn:17): Gtk-CRITICAL **: 15:56:11.298: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
grampsweb_redis  | 1:C 25 Apr 2025 15:55:47.079 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
grampsweb_redis  | 1:C 25 Apr 2025 15:55:47.079 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
grampsweb_redis  | 1:C 25 Apr 2025 15:55:47.080 * Redis version=7.2.4, bits=64, commit=00000000, modified=0, pid=1, just started
grampsweb_redis  | 1:C 25 Apr 2025 15:55:47.080 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
grampsweb_redis  | 1:M 25 Apr 2025 15:55:47.083 * monotonic clock: POSIX clock_gettime
grampsweb_redis  | 1:M 25 Apr 2025 15:55:47.092 * Running mode=standalone, port=6379.
grampsweb_redis  | 1:M 25 Apr 2025 15:55:47.104 * Server initialized
grampsweb_redis  | 1:M 25 Apr 2025 15:55:47.105 * Ready to accept connections tcp
nginx-proxy-acme  | Info: running acme-companion version v2.5.2-21-g65d14ed
nginx-proxy-acme  | Info: 4096 bits RFC7919 Diffie-Hellman group found, generation skipped.
nginx-proxy-acme  | Reloading nginx proxy (nginx-proxy)...
nginx-proxy-acme  | 2025/04/25 15:55:50 Generated '/etc/nginx/conf.d/default.conf' from 5 containers
nginx-proxy-acme  | 2025/04/25 15:55:50 [notice] 44#44: signal process started
nginx-proxy-acme  | 2025/04/25 15:55:50 Generated '/app/letsencrypt_service_data' from 5 containers
nginx-proxy-acme  | 2025/04/25 15:55:50 Running '/app/signal_le_service'
nginx-proxy-acme  | 2025/04/25 15:55:50 Watching docker events
nginx-proxy-acme  | 2025/04/25 15:55:50 Contents of /app/letsencrypt_service_data did not change. Skipping notification '/app/signal_le_service'
nginx-proxy-acme  | Creating/renewal mountbanne.dk certificates... (mountbanne.dk)
nginx-proxy-acme  | [Fri Apr 25 15:55:51 UTC 2025] Domains not changed.
nginx-proxy-acme  | [Fri Apr 25 15:55:51 UTC 2025] Skipping. Next renewal time is: 2025-05-25T18:33:29Z
nginx-proxy-acme  | [Fri Apr 25 15:55:51 UTC 2025] Add '--force' to force renewal.
nginx-proxy-acme  | Sleep for 3600s
grampsweb_celery  |
grampsweb_celery  | (__main__.py:8): Gtk-CRITICAL **: 15:55:52.848: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
grampsweb_celery  | Two Gramps application data directories exist.
grampsweb_celery  | INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
nginx-proxy       | Info: running nginx-proxy version 1.7.0-31-g4534241
nginx-proxy       | Warning: A custom dhparam.pem file was provided. Best practice is to use standardized RFC7919 DHE groups instead.
nginx-proxy       | Warning: TRUST_DOWNSTREAM_PROXY is not set; defaulting to "true". For security, you should explicitly set TRUST_DOWNSTREAM_PROXY to "false" if there is not a trusted reverse proxy in front of this proxy.
nginx-proxy       | Warning: The default value of TRUST_DOWNSTREAM_PROXY might change to "false" in a future version of nginx-proxy. If you require TRUST_DOWNSTREAM_PROXY to be enabled, explicitly set it to "true".
nginx-proxy       | forego      | starting dockergen.1 on port 5000
nginx-proxy       | forego      | starting nginx.1 on port 5100
grampsweb_celery  | INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
grampsweb_celery  | Two Gramps application data directories exist.
grampsweb_celery  |
grampsweb_celery  | (celery:1): Gtk-CRITICAL **: 15:55:59.365: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
grampsweb_celery  | /usr/local/lib/python3.11/dist-packages/celery/platforms.py:841: SecurityWarning: You're running the worker with superuser privileges: this is
grampsweb_celery  | absolutely not recommended!
grampsweb_celery  |
grampsweb_celery  | Please specify a different user using the --uid option.
grampsweb_celery  |
grampsweb_celery  | User information: uid=0 euid=0 gid=0 egid=0
grampsweb_celery  |
grampsweb_celery  |   warnings.warn(SecurityWarning(ROOT_DISCOURAGED.format(
grampsweb_celery  |
grampsweb_celery  |  -------------- celery@efa3c0f706c1 v5.5.1 (immunity)
grampsweb_celery  | --- ***** -----
grampsweb_celery  | -- ******* ---- Linux-6.8.10-300.fc40.x86_64-x86_64-with-glibc2.36 2025-04-25 15:55:59
grampsweb_celery  | - *** --- * ---
grampsweb_celery  | - ** ---------- [config]
grampsweb_celery  | - ** ---------- .> app:         default:0x7fd5e6b6add0 (.default.Loader)
grampsweb_celery  | - ** ---------- .> transport:   redis://grampsweb_redis:6379/0
grampsweb_celery  | - ** ---------- .> results:     redis://grampsweb_redis:6379/0
grampsweb_celery  | - *** --- * --- .> concurrency: 2 (prefork)
grampsweb_celery  | -- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
grampsweb_celery  | --- ***** -----
grampsweb_celery  |  -------------- [queues]
grampsweb_celery  |                 .> celery           exchange=celery(direct) key=celery
grampsweb_celery  |
grampsweb_celery  |
grampsweb_celery  | [tasks]
grampsweb_celery  |   . gramps_webapi.api.tasks.check_repair_database
grampsweb_celery  |   . gramps_webapi.api.tasks.delete_objects
grampsweb_celery  |   . gramps_webapi.api.tasks.export_db
grampsweb_celery  |   . gramps_webapi.api.tasks.export_media
grampsweb_celery  |   . gramps_webapi.api.tasks.generate_report
grampsweb_celery  |   . gramps_webapi.api.tasks.import_file
grampsweb_celery  |   . gramps_webapi.api.tasks.import_media_archive
grampsweb_celery  |   . gramps_webapi.api.tasks.media_ocr
grampsweb_celery  |   . gramps_webapi.api.tasks.process_transactions
grampsweb_celery  |   . gramps_webapi.api.tasks.search_reindex_full
grampsweb_celery  |   . gramps_webapi.api.tasks.search_reindex_incremental
grampsweb_celery  |   . gramps_webapi.api.tasks.send_email_confirm_email
grampsweb_celery  |   . gramps_webapi.api.tasks.send_email_new_user
grampsweb_celery  |   . gramps_webapi.api.tasks.send_email_reset_password
grampsweb_celery  |   . gramps_webapi.api.tasks.upgrade_database_schema
grampsweb_celery  |   . gramps_webapi.api.tasks.upgrade_undodb_schema
grampsweb_celery  |
grampsweb_celery  | [2025-04-25 15:56:00,549: INFO/MainProcess] Connected to redis://grampsweb_redis:6379/0
grampsweb_celery  | [2025-04-25 15:56:00,566: INFO/MainProcess] mingle: searching for neighbors
grampsweb_celery  | [2025-04-25 15:56:01,597: INFO/MainProcess] mingle: all alone
grampsweb_celery  | [2025-04-25 15:56:01,629: INFO/MainProcess] celery@efa3c0f706c1 ready.

Ah ok, I think I know what the problem is, will fix it soon. I think (although I don’t see the error in the log) it happens when the undo (revision) database is converted which is after the Gramps database itself is converted. If that’s the case, I would expect that when you refresh the browser, you actually have a working Gramps Web, except that in the revision view, you won’t be able to see the details of the latest revisions. Can you confirm that?

I have refreshed, I have restarted the browser, no matter what - it’s still the same

This is using my standard browser Brave

Hmm, just tried with the Safari browser, and here it looks fine!!

Will clean up up all caching in Brave and see what happens

I can’t get Brave to work, but that’s a browser problem.
Using the Safari browser everything seems to work fine in Gramps Web 6.0.1
Graphs seems a bit slow, maybe some indexes needs to be updated?

Not sure why graphs would be slower, interesting observation.

The error you encountered during upgrade should now be fixed in master and the new image (still building…) should be available in 30 minutes (see Workflow runs · gramps-project/gramps-web-api · GitHub).

You can finish the incomplete migration of the revision database by running the command:

docker compose run grampsweb python3 -m gramps_webapi grampsdb migrate-undodb

When I tried the upgrade, it was with Firefox; even cleared all the site cookies and still got the error message.

I also tried this with Google chrome and got the same error.

I don’t think Safari will run on Fedora 42/x86_64 but I’ll poke around
to see what I can find :-D.

BTW, I did a pull with the :latest tag instead of :latest-devel and everything went back to 5.2.4 with no harm done (as I suspected it
would).

The migrate-undodb command does not seem to exist in latest-devel?

$ sudo docker-compose run grampsweb python3 -m gramps_webapi grampsdb migrate-undodb
Creating debian_grampsweb_run ... done

(__main__.py:9): Gtk-CRITICAL **: 22:02:29.368: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
Two Gramps application data directories exist.
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
Two Gramps application data directories exist.

(__main__.py:1): Gtk-CRITICAL **: 22:02:35.782: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
Usage: python3 -m gramps_webapi grampsdb [OPTIONS] COMMAND [ARGS]...
Try 'python3 -m gramps_webapi grampsdb --help' for help.

Error: No such command 'migrate-undodb'.
ERROR: 2

The help text indicates there is only a migrate command. Maybe a versioning problem somewhere? I did the image pull just a couple of minutes before running this (about 22:00 UTC).

$ sudo docker-compose images
   Container            Repository            Tag          Image Id       Size  
--------------------------------------------------------------------------------
grampsweb          ghcr.io/gramps-        latest-devel   b3416601d00b   4.837 GB
                   project/grampsweb                                            
grampsweb_celery   ghcr.io/gramps-        latest-devel   b3416601d00b   4.837 GB
                   project/grampsweb                                            
grampsweb_redis    redis                  7.2.4-alpine   a1811fcf7480   46.07 MB
nginx-proxy        nginxproxy/nginx-      latest         ef2332c729c6   211.9 MB
                   proxy                                                        
nginx-proxy-acme   nginxproxy/acme-       latest         8d8f039faf49   47.67 MB
                   companion 

I was fooled by Safari. When I connected to Gramps Web in Safari it was using a guest account and this worked well.
When I logout and login as admin I get the same situation as in Brave.
The Family Tree you are trying to load is in a schema version not supported by this version of Gramps Web. Therefore you cannot load this Family Tree without upgrading its schema. This action cannot be undone.
Running upgrade database doesn’t change anything.

For completeness, I’m running Gramps Web on Fedora server version 40

I completely cleaned up everything - images, volumes etc, and created a new instance using latest-devel in the docker-compose.yaml
Gramps Web version 6.0.1 starts fine and I create the admin account.
But when I try to load an export/backup from Gramps Desktop it fails immediately with this error message:

Any clue what to look for?

With a completely empty database in Gramps Web I created two places, one contained in the other. Added 1 person with a birth event and place.
In Person list and in Place list nothing shows up, but I can see the birth event in the Event list.
Also tried to sync from Gramps desktop, that also fails.

@ahs3 that was probably 2 minutes too early. The hash of the correct image is d5f0bf3dab3f2c75120177b1867f848d35cd80a4e88842d2810643dee371096d. Can you please try again?

@csam I don’t think the error with the database path has anything to do with the upgrade. I suspect you deleted the Gramps database directories but not the user database; or you still had a token with a non-existing (deleted) tree in your browser’s local storage.

Can you please provide errors in the logs and/or browser dev console?

How does it fail?

Yeah, that sounds like something I’d do – missed it by that much :-).

Hrm. Sorry, @DavidMStraub – just now did a pull (26 Apr, 20:29 UTC) and got the same old image with the b3416601d00b hash. I’m still using the latest-devel tag; does that need to change? From the compose file:

image: ghcr.io/gramps-project/grampsweb:latest-devel

That’s really strange. What is the output of docker pull ghcr.io/gramps-project/grampsweb:latest-devel? For me:

latest-devel: Pulling from gramps-project/grampsweb
Digest: sha256:d5f0bf3dab3f2c75120177b1867f848d35cd80a4e88842d2810643dee371096d
Status: Image is up to date for ghcr.io/gramps-project/grampsweb:latest-devel
ghcr.io/gramps-project/grampsweb:latest-devel

I have completely removed everything (docker compose down --volumes --rmi all and docker system prune --all). So starting with an empty system and yet I see some strange errors in the logs:

$ docker logs grampsweb_celery
(__main__.py:8): Gtk-CRITICAL **: 15:13:48.085: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
Two Gramps application data directories exist.
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.runtime.migration] Running upgrade e5e738d09fa7 -> e176543c72a8, Add tree column to User
ERROR [alembic.util.messaging] Online migration expected to match one row when updating 'e5e738d09fa7' to 'e176543c72a8' in 'alembic_version'; 0 found
FAILED: Online migration expected to match one row when updating 'e5e738d09fa7' to 'e176543c72a8' in 'alembic_version'; 0 found
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/app/src/gramps_webapi/__main__.py", line 351, in <module>
    cli(
  File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 1161, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 1082, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 1697, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 1697, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 1443, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 788, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/src/gramps_webapi/__main__.py", line 225, in migrate_db
    subprocess.run(cmd, env=env, check=True)
  File "/usr/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'alembic', 'upgrade', 'head']' returned non-zero exit status 255.

What causes the “Two Gramps application directories exists” ?
and
why running a migration if there no old database?

A little later in the log:

[2025-04-27 15:14:06,392: INFO/MainProcess] Connected to redis://grampsweb_redis:6379/0
[2025-04-27 15:14:06,404: INFO/MainProcess] mingle: searching for neighbors
[2025-04-27 15:14:07,429: INFO/MainProcess] mingle: all alone
[2025-04-27 15:14:07,457: INFO/MainProcess] celery@63268c105030 ready.
[2025-04-27 15:15:09,521: INFO/MainProcess] Task gramps_webapi.api.tasks.import_file[32ef6e6a-d077-47a3-9231-baffd9ef0ee6] received
[2025-04-27 15:15:16,583: ERROR/ForkPoolWorker-1] Task gramps_webapi.api.tasks.import_file[32ef6e6a-d077-47a3-9231-baffd9ef0ee6] raised unexpected: ValueError("Database path '129d0fa3-6ada-49d5-a145-50862339765d'for family tree 'unnamed tree' not found in database directory /root/.local/share/gramps/grampsdb")

Let me know if you want the full logs
Regards
Claus

Ok I think Gramps is getting confused about directories and storing stuff in directories that are not volumes. I think it’s related to this commit by @Nick-Hall that changed the behaviour between 6.0.0 and 6.0.1. I will need some time to thoroughly check how we need to modify the configuration and/or Dockerfile to make things work again. (It’s probably a very easy fix, but I won’t manage today.)

why running a migration if there no old database?

This is the user database schema migration script that always runs on startup, it’s unrelated to the Gramps database upgrade.