You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Version 1.19.0, the problem classifier cannot add a category by clicking #46744
This may match #45643, which reports the same Add Category failure on 1.19.0 with TypeError: crypto.randomUUID is not a function. It occurs when the category handler uses a browser API unavailable on a non-secure LAN HTTP address. [1]
On the affected page, open DevTools → Console and run these read-only checks:
If they return false and "undefined", and clicking Add logs that error, the workaround is to access Dify through HTTPS with a browser-trusted certificate, rather than http://<server-IP>. Maintainers have consolidated this classifier failure in #45147. [2]
If you're already using trusted HTTPS, please share your browser/version and the Console error produced when clicking Add, so we can distinguish your case from that failure.
Diagnosis: the Add button in the question classifier's class list calls crypto.randomUUID() to build the new class ID. That API exists only in secure contexts (HTTPS or localhost); a self-hosted 1.19.0 deployment served over plain HTTP has no crypto.randomUUID, so clicking Add throws TypeError: crypto.randomUUID is not a function and no category can be added - matching your screenshot.
Good news: this was fixed on main today by #46720 (the class list now uses the uuid package's v4, which works in every context). The fix is scheduled for the 1.20.0 release; 1.19.0 shipped before it landed. Nothing further to fix here, so I'll leave it - closing as already addressed on main (the maintainers can confirm).
That console error confirms the crypto.randomUUID() failure discussed above. Your SSH tunnel works because opening Dify at http://localhost:8000 gives the browser a trustworthy local context, unlike a plain HTTP LAN-IP address. This matches the cause documented in #46720.
As of November 19, the fix has merged into main: Question Classifier category IDs now use the uuid package instead of calling crypto.randomUUID() directly. The PR does not confirm a release version, so I would not promise 1.20.0 yet. You can keep using your localhost tunnel, or browser-trusted HTTPS, as the workaround. Fix details
Thanks for the report! Confirmed the root cause: the "Add" button in the question classifier calls crypto.randomUUID(), which only exists in secure contexts (HTTPS or localhost). On a self-hosted deployment served over plain HTTP it is undefined, so clicking Add throws and no class can be created.
I've opened #46815 to guard the call and fall back to a timestamp-based id, matching the pattern already used in use-document-actions.ts. The same unguarded call in the agent output-routes toggle is fixed too.
Spot on. crypto.randomUUID() will throw on plain HTTP / raw IP since the browser won't treat it as a secure context.
Just heads up on PR #46815: sticking strictly to a timestamp fallback can lead to duplicate keys if someone double-clicks fast or loops through a batch add. Something like Date.now() + '-' + Math.random().toString(36).substring(2, 9) or a quick uuid polyfill avoids those collision issues completely.
Also worth checking the agent output-routes toggle while you're in there, it runs into the exact same problem.
Activity
dosubot commentedon Nov 19, 2026
Hi @dengyazhou! I'm Dosu and I'm helping the Dify team.
This may match #45643, which reports the same Add Category failure on 1.19.0 with
TypeError: crypto.randomUUID is not a function. It occurs when the category handler uses a browser API unavailable on a non-secure LAN HTTP address. [1]On the affected page, open DevTools → Console and run these read-only checks:
If they return
falseand"undefined", and clicking Add logs that error, the workaround is to access Dify through HTTPS with a browser-trusted certificate, rather thanhttp://<server-IP>. Maintainers have consolidated this classifier failure in #45147. [2]If you're already using trusted HTTPS, please share your browser/version and the Console error produced when clicking Add, so we can distinguish your case from that failure.
To reply, just mention @dosu.
Docs are dead. Just use Dosu.
grinem commentedon Nov 19, 2026
Can you open your browser console (F12) when clicking "Add" and share the error log here?
Luckyou-d commentedon Nov 19, 2026
Diagnosis: the Add button in the question classifier's class list calls
crypto.randomUUID()to build the new class ID. That API exists only in secure contexts (HTTPS or localhost); a self-hosted 1.19.0 deployment served over plain HTTP has nocrypto.randomUUID, so clicking Add throwsTypeError: crypto.randomUUID is not a functionand no category can be added - matching your screenshot.Good news: this was fixed on
maintoday by #46720 (the class list now uses theuuidpackage'sv4, which works in every context). The fix is scheduled for the 1.20.0 release; 1.19.0 shipped before it landed. Nothing further to fix here, so I'll leave it - closing as already addressed on main (the maintainers can confirm).dengyazhou commentedon Nov 19, 2026
dengyazhou commentedon Nov 19, 2026
dosubot commentedon Nov 19, 2026
That console error confirms the
crypto.randomUUID()failure discussed above. Your SSH tunnel works because opening Dify athttp://localhost:8000gives the browser a trustworthy local context, unlike a plain HTTP LAN-IP address. This matches the cause documented in #46720.As of November 19, the fix has merged into
main: Question Classifier category IDs now use theuuidpackage instead of callingcrypto.randomUUID()directly. The PR does not confirm a release version, so I would not promise 1.20.0 yet. You can keep using your localhost tunnel, or browser-trusted HTTPS, as the workaround. Fix detailsTo reply, just mention @dosu.
Share context across your team and agents. Try Dosu.
dengyazhou commentedon Nov 19, 2026
I see.
fxia0018 commentedon Nov 20, 2026
Thanks for the report! Confirmed the root cause: the "Add" button in the question classifier calls
crypto.randomUUID(), which only exists in secure contexts (HTTPS orlocalhost). On a self-hosted deployment served over plain HTTP it isundefined, so clicking Add throws and no class can be created.I've opened #46815 to guard the call and fall back to a timestamp-based id, matching the pattern already used in
use-document-actions.ts. The same unguarded call in the agent output-routes toggle is fixed too.grinem commentedon Nov 20, 2026
Spot on.
crypto.randomUUID()will throw on plain HTTP / raw IP since the browser won't treat it as a secure context.Just heads up on PR #46815: sticking strictly to a timestamp fallback can lead to duplicate keys if someone double-clicks fast or loops through a batch add. Something like
Date.now() + '-' + Math.random().toString(36).substring(2, 9)or a quick uuid polyfill avoids those collision issues completely.Also worth checking the agent output-routes toggle while you're in there, it runs into the exact same problem.