Paraphrased the WAL documentation:


It was not possible to open read-only WAL databases.  Beginning with version 3.22.0 (2018-01-22), a read-only WAL-mode database file can be opened if the -shm and -wal files already exists or those files can be created or the database is immutable.