Describe the problem/error/question
Hello, I want to share a definitive root cause and a stable workaround for the persistent DOMMatrix is not defined
error. This issue affects the Extract from File
node when processing PDFs on self-hosted instances. The problem started exactly in n8n version 1.98.0 and continues in newer versions like 1.99.0.
What is the error message (if any)?
DOMMatrix is not defined
Please share your workflow
The problem is not with any specific workflow, but with the n8n version itself. After a deep investigation, we found the root cause:
Root Cause:
In n8n version 1.98.0
, the pdfjs-dist
dependency was upgraded to a new major version (~5.3.31). This new version requires browser-native APIs (like DOMMatrix
), which are not available in server-side environments like Docker. This is why the error started exactly at that version.
The Solution / Workaround
The only stable and reliable solution right now is to downgrade and pin your n8n version to 1.97.1
.
For Docker users, use the image tag: n8n.io/n8nio/n8n:1.97.1
This version uses an older pdfjs-dist
library that does not have this browser-dependency issue.
Important consideration: By downgrading to 1.97.1
, you might re-introduce other bugs that were fixed in v1.98.0
. In my case, another node (Information Extractor
) which worked in v1.98.0
started failing in v1.97.1
. I was able to solve that specific issue by changing its internal settings (switching to a different LLM model). Be aware that you might be trading one problem for another, but the PDF extraction issue is often a more critical blocker.
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Share the output returned by the last node
The node fails completely and does not return a data output, only the error message mentioned above.
Information on your n8n setup
- **n8n version:1.97.1
- **Database (default: SQLite):Postgres
- **n8n EXECUTIONS_PROCESS setting (default: own, main):main
- **Running n8n via (Docker, npm, n8n cloud, desktop app):Docker (via Coolify)
- **Operating system:Ubuntu 24.04.2 LTS