{"record":{"id":"3277f680435b558e","repo":"shadow1ng/fscan","slug":"oracle-ttc-unexpected-message-d","errorCode":null,"errorMessage":"oracle TTC unexpected message %d","messagePattern":"oracle TTC unexpected message (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/services/oracle_raw.go","lineNumber":1622,"sourceCode":"\t\t\t}\n\t\t}\n\tcase 15:\n\t\tif _, err := s.getInt(2, true, true); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tlength, err := s.getInt(2, true, true)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif _, err = s.getInt(2, true, true); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif length > 0 {\n\t\t\t_, err = s.getClr()\n\t\t\treturn err\n\t\t}\n\tdefault:\n\t\treturn fmt.Errorf(\"oracle TTC unexpected message %d\", msg)\n\t}\n\treturn nil\n}\n\nfunc (s *oracleSession) readSummary() (*oracleSummary, error) {\n\tsum := &oracleSummary{}\n\tvar err error\n\tif s.hasEOSCapability {\n\t\tif _, err = s.getInt(4, true, true); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tif s.ttcVersion >= 3 && s.hasFSAPCapability {\n\t\tif _, err = s.getInt(2, true, true); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\tif _, err = s.getInt(4, true, true); err != nil {","sourceCodeStart":1604,"sourceCodeEnd":1640,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/plugins/services/oracle_raw.go#L1604-L1640","documentation":"While processing TTC (Two-Task Common) round-trip messages, the library received a message type it has no handler for in its switch. It aborts the round-trip with the numeric message type. This means the server sent an unexpected/unsupported TTC message during a statement execution or fetch.","triggerScenarios":"A TTC round-trip reads a message byte that falls into the switch's default branch — e.g. an unexpected error, auth, or proprietary message during execute/fetch — instead of the handled result/row/summary message types.","commonSituations":"Server-side events the library doesn't model (e.g. implicit result sets on newer Oracle versions, end-of-call markers from a version mismatch); protocol desync after a previous parse error; connecting to Oracle versions that send extra TTC messages this implementation doesn't recognize.","solutions":["Note the reported message number and check whether the target Oracle version emits messages the library version doesn't handle; upgrade the library.","Disable features that add TTC messages (e.g. DBMS_OUTPUT streaming, implicit results) if they correlate with the failure.","Capture TNS traffic to identify the unexpected message and report it upstream as a protocol incompatibility."],"exampleFix":"// before\nrows, _ := stmt.QueryContext(ctx, q) // fails on implicit-result-capable call\n// after: avoid calls returning implicit result sets, or upgrade lib\nrows, _ := stmt.QueryContext(ctx, q) // with library >= version supporting msg type","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"err := runQuery(ctx, q)\nif err != nil && strings.Contains(err.Error(), \"TTC unexpected message\") {\n    // desync risk: recycle the connection instead of retrying on it\n    conn.Close()\n    return runQuery(ctx, q) // fresh connection\n}","preventionTips":["Recycle pooled connections after any protocol-level error","Avoid newer-server features (implicit result sets) until the library supports them","Keep the library updated alongside Oracle server upgrades"],"tags":["oracle","protocol","ttc","unexpected-message"],"backgroundTag":"unexpected-response-shape","analyzedSha":"95cc12e753bf43de7004e5aef42a9ffba3934303","analyzedAt":"2026-09-06T17:07:30.094Z","contentChangedAt":"2026-09-06T17:07:30.094Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}