{"record":{"id":"c24960c6a6147082","repo":"hyperledger/fabric","slug":"chaincode-address-not-provided","errorCode":null,"errorMessage":"chaincode address not provided","messagePattern":"chaincode address not provided","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/container/externalbuilder/instance.go","lineNumber":79,"sourceCode":"\n\treturn nil\n}\n\n// ChaincodeServerUserData holds \"connection.json\" information\ntype ChaincodeServerUserData struct {\n\tAddress            string   `json:\"address\"`\n\tDomain             string   `json:\"domain\"`\n\tDialTimeout        Duration `json:\"dial_timeout\"`\n\tTLSRequired        bool     `json:\"tls_required\"`\n\tClientAuthRequired bool     `json:\"client_auth_required\"`\n\tClientKey          string   `json:\"client_key\"`  // PEM encoded client key\n\tClientCert         string   `json:\"client_cert\"` // PEM encoded client certificate\n\tRootCert           string   `json:\"root_cert\"`   // PEM encoded peer chaincode certificate\n}\n\nfunc (c *ChaincodeServerUserData) ChaincodeServerInfo(cryptoDir string) (*ccintf.ChaincodeServerInfo, error) {\n\tif c.Address == \"\" {\n\t\treturn nil, errors.New(\"chaincode address not provided\")\n\t}\n\tconnInfo := &ccintf.ChaincodeServerInfo{Address: c.Address}\n\n\tconnInfo.ClientConfig.DialTimeout = time.Duration(c.DialTimeout)\n\tif connInfo.ClientConfig.DialTimeout == 0 {\n\t\tconnInfo.ClientConfig.DialTimeout = DialTimeout\n\t}\n\n\t// we can expose this if necessary\n\tconnInfo.ClientConfig.KaOpts = comm.DefaultKeepaliveOptions\n\n\tif !c.TLSRequired {\n\t\treturn connInfo, nil\n\t}\n\tif c.ClientAuthRequired && c.ClientKey == \"\" {\n\t\treturn nil, errors.New(\"chaincode tls key not provided\")\n\t}\n\tif c.ClientAuthRequired && c.ClientCert == \"\" {","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/core/container/externalbuilder/instance.go#L61-L97","documentation":"ChaincodeServerUserData.ChaincodeServerInfo builds the ChaincodeServerInfo used by the peer to connect to a chaincode server; it requires the chaincode to publish the address it listens on. An empty address makes the connection info unusable, so Fabric errors.","triggerScenarios":"connection.json written by the builder's release step lacks the `address` field or it is empty, and TLS/launch processing calls ChaincodeServerInfo.","commonSituations":"Chaincode-as-a-service container didn't emit connection.json; template omitted address; chaincode listens but never reports its endpoint; release script copies a partial connection.json.","solutions":["Ensure the chaincode writes connection.json including a non-empty `address` (host:port) in the release directory","Fix the release script so it copies the complete connection.json into the release dir","Verify the chaincode's CaaS config (CORE_CHAINCODE_ID, TLS settings) causes it to publish its address"],"exampleFix":"// before (connection.json)\n{\"client_cert\":\"...\"}\n// after\n{\"address\":\"chaincode:7052\",\"client_cert\":\"...\",\"root_cert\":\"...\"}","handlingStrategy":"validation","validationCode":"var ud ChaincodeServerUserData\njson.Unmarshal(connJSON, &ud)\nif ud.Address == \"\" {\n    return errors.New(\"connection.json must include a non-empty address\")\n}","typeGuard":null,"tryCatchPattern":"info, err := ud.ChaincodeServerInfo(cryptoDir)\nif err != nil && strings.Contains(err.Error(), \"address not provided\") {\n    return fmt.Errorf(\"chaincode did not publish its endpoint; check release step emitted connection.json: %w\", err)\n}","preventionTips":["Always include address (host:port) in connection.json for CaaS chaincode","Test the builder's release output contains all required fields","Confirm the chaincode container actually listens on the advertised address"],"tags":["chaincode-as-a-service","connection","configuration","missing-field"],"backgroundTag":"missing-chaincode-address","analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}