{"record":{"id":"7333e43bb90dfaea","repo":"projectdiscovery/nuclei","slug":"dialers-not-initialized-for-s-7333e4","errorCode":null,"errorMessage":"dialers not initialized for %s","messagePattern":"dialers not initialized for (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/js/libs/mssql/fingerprint.go","lineNumber":114,"sourceCode":"}\n\n// @memo\nfunc fingerprintMssql(ctx context.Context, executionId string, host string, port int) (MSSQLInfo, error) {\n\tinfo := MSSQLInfo{\n\t\tHost:      host,\n\t\tPort:      port,\n\t\tProtocol:  \"mssql\",\n\t\tTransport: \"tcp\",\n\t}\n\tif host == \"\" || port <= 0 {\n\t\treturn info, fmt.Errorf(\"invalid host or port\")\n\t}\n\tif !protocolstate.IsHostAllowed(executionId, host) {\n\t\treturn info, protocolstate.ErrHostDenied.Msgf(host)\n\t}\n\tdialer := protocolstate.GetDialersWithId(executionId)\n\tif dialer == nil {\n\t\treturn info, fmt.Errorf(\"dialers not initialized for %s\", executionId)\n\t}\n\n\tconn, err := dialer.Fastdialer.Dial(ctx, \"tcp\", net.JoinHostPort(host, fmt.Sprintf(\"%d\", port)))\n\tif err != nil {\n\t\treturn info, err\n\t}\n\tdefer func() {\n\t\t_ = conn.Close()\n\t}()\n\n\t_ = conn.SetDeadline(time.Now().Add(mssqlFingerprintTimeout))\n\tif _, err := conn.Write(preLoginRequest); err != nil {\n\t\treturn info, err\n\t}\n\n\t// Read TDS header first, then remaining payload by Length field.\n\theader := make([]byte, 8)\n\tif _, err := io.ReadFull(conn, header); err != nil {","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/js/libs/mssql/fingerprint.go#L96-L132","documentation":"Returned by mssql.FingerprintMssql when protocolstate.GetDialersWithId(executionId) returns nil, i.e. no dialer set is registered for the current execution ID. Dialers are created when nuclei initializes a template execution; a nil result means the fingerprint code is running outside that lifecycle or with a stale/unknown execution ID.","triggerScenarios":"Invoking the mssql lib from a standalone goja runtime or SDK path that never initialized protocolstate dialers; executing after the engine recycled the execution context; version mismatch between the JS libs and the host binary.","commonSituations":"Embedding nuclei as a library and calling JS libs directly; unit tests exercising fingerprintMssql without engine setup. Not user-fixable from a template — during a normal nuclei run it indicates an engine or integration bug.","solutions":["Run the template through the nuclei engine so dialers are initialized per execution","Upgrade nuclei to the current release (dialer/execution-id wiring has changed across versions)","SDK users: ensure protocolstate initialization happens before template execution","If reproducible on a stock run, file an issue with template and version"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const info = mssql.FingerprintMssql(host, port);\n} catch (e) {\n  if (String(e).includes('dialers not initialized')) {\n    // engine not initialized for this execution: not recoverable from the template\n    throw new Error('mssql lib requires a nuclei-initialized runtime');\n  }\n  throw e;\n}","preventionTips":["Run JS protocol code within the nuclei engine lifecycle","Keep engine and JS libs in sync (same release)","Embedders must initialize protocolstate dialers first"],"tags":["runtime","internal","mssql","initialization","fingerprinting"],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}