After installing emacs 28.1 and auctex 13.1 I can't open .tex-files any longer.
If I enter in emacs Ctrl-x -f Blau-2022-03-20.tex I get
Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
replace-regexp-in-string("\[ \\11\\15\\n%\]" "" nil)
LaTeX-xparse-macro-parse(mac)
LaTeX-xparse-auto-cleanup()
run-hooks(TeX-auto-cleanup-hook)
TeX-auto-parse()
run-hooks(TeX-update-style-hook)
TeX-update-style(t)
#f(compiled-function () #\<bytecode -0x12260f12797895d8\>)()
run-hooks(find-file-hook)
after-find-file(nil t)
find-file-noselect-1(#\<buffer Blau-2022-03-20.tex\> "\~/Desktop/Eigene Dokumente/Briefe/Blau- 2022-03-20...." nil nil "\~/Desktop/Eigene Dokumente/Briefe/Blau-2022-03-20...." (790801 2051))
find-file-noselect("\~/Desktop/Eigene Dokumente/Briefe/Blau-2022-03-20...." nil nil t)
find-file("\~/Desktop/Eigene Dokumente/Briefe/Blau-2022-03-20...." t)
funcall-interactively(find-file "\~/Desktop/Eigene Dokumente/Briefe/Blau-2022-03-20...." t)
call-interactively(find-file nil nil)
command-execute(find-file)
an can't open the file at all. If I click on the four dots, .tex appears.
BTW: It works with .tex~-files.
I have no idea what I could try, it worked for decades...
The question has been asked since 2014, but all solutions I found didn't work for me.
PS: It works if I enter myfile.tex for a second time. So after Ctr-x -f myfile.tex I get the strange message, but after another Ctr-x -f myfile.tex I can open the file as usual.
I ran into a similar problem which drove me to distraction.
In the end, I discovered that the error message was misleading. I'm using a Mac and the file was in a MS OneDrive folder. I didn't have a local copy of the file and I didn't have OneDrive running. When I realised the problem after much wasting of time, I turned on OneDrive and had exactly the symptom you had -- first time, I got the error message, and second time it worked. My hypothesis is that the first time I did this, the file was not there hence the error message, but it prompted download of the file, and by the second time the file was stored locally and it worked.