{"record":{"id":"1d8abc71c77511fc","repo":"ethereum/go-ethereum","slug":"filter-id-error-filter-get-can-t-be-chained-s","errorCode":null,"errorMessage":"Filter ID Error: filter().get() can't be chained synchronous, please provide a callback for the get() method.","messagePattern":"Filter ID Error: filter\\(\\)\\.get\\(\\) can't be chained synchronous, please provide a callback for the get\\(\\) method\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"internal/jsre/deps/web3.js","lineNumber":3632,"sourceCode":"    if (utils.isFunction(callback)) {\n        if (this.filterId === null) {\n            // If filterId is not set yet, call it back\n            // when newFilter() assigns it.\n            this.getLogsCallbacks.push(callback);\n        } else {\n            this.implementation.getLogs(this.filterId, function(err, res){\n                if (err) {\n                    callback(err);\n                } else {\n                    callback(null, res.map(function (log) {\n                        return self.formatter ? self.formatter(log) : log;\n                    }));\n                }\n            });\n        }\n    } else {\n        if (this.filterId === null) {\n            throw new Error('Filter ID Error: filter().get() can\\'t be chained synchronous, please provide a callback for the get() method.');\n        }\n        var logs = this.implementation.getLogs(this.filterId);\n        return logs.map(function (log) {\n            return self.formatter ? self.formatter(log) : log;\n        });\n    }\n\n    return this;\n};\n\nmodule.exports = Filter;\n\n\n},{\"../utils/utils\":20,\"./formatters\":30}],30:[function(require,module,exports){\n'use strict'\n\n/*\n    This file is part of web3.js.","sourceCodeStart":3614,"sourceCodeEnd":3650,"githubUrl":"https://github.com/ethereum/go-ethereum/blob/6bb0588ad8e7f922e4ad5580f51265a4097af08f/internal/jsre/deps/web3.js#L3614-L3650","documentation":"inputAddressFormatter normalizes an address argument before it is sent to RPC. It accepts a valid direct IBAN (converted to 0x address), a strict 0x-prefixed 20-byte hex address, or a bare 40-hex-char address (0x added). Anything else — wrong length, non-hex characters, bad checksums that make it neither form — throws 'invalid address'.","triggerScenarios":"Calling any address-taking web3 method (sendTransaction to, getBalance, contract methods with address params) with a malformed string: 39 or 41 hex chars, unquoted hex treated as a number, missing 0x with odd characters, empty string, or an ICAP string that is not direct/valid.","commonSituations":"Copying an address with a truncated character, passing undefined/null variable, string concatenation errors ('0x' + addr where addr already had 0x is fine but double prefixes are not), or passing an ENS-like name where a raw address is required in this old web3 version.","solutions":["Print/inspect the exact value passed and compare length: must be 40 hex chars, optionally 0x-prefixed.","Fix the source of the address (config typo, truncation, encoding).","Validate with web3.isAddress(addr) before calling the API.","If using ICAP, ensure it is a direct IBAN or resolve it to an address first."],"exampleFix":"// before\neth.sendTransaction({from: a, to: '0x' + shortHex39chars, value: 1});\n\n// after\nif (!web3.isAddress(to)) throw 'bad address';\neth.sendTransaction({from: a, to: to, value: 1});","handlingStrategy":"type-guard","validationCode":"function normalizeAddress(a) {\n  if (typeof a !== 'string') throw new Error('address must be a string');\n  a = a.trim();\n  if (/^0x[0-9a-fA-F]{40}$/.test(a)) return a;\n  if (/^[0-9a-fA-F]{40}$/.test(a)) return '0x' + a;\n  throw new Error('invalid address: ' + a);\n}","typeGuard":"function isSendableAddress(a) {\n  return typeof a === 'string' && web3.isAddress(a.trim());\n}","tryCatchPattern":"try { eth.getBalance(addr); }\ncatch (e) {\n  if (e.message === 'invalid address') { /* log offending addr, fix source */ }\n  else throw e;\n}","preventionTips":["Validate addresses with web3.isAddress at system boundaries.","Never pass untrusted strings directly into address-typed RPC params.","Watch for truncation when storing addresses (fixed 42-char with 0x)."],"tags":["web3","address","input-validation"],"backgroundTag":null,"analyzedSha":"6bb0588ad8e7f922e4ad5580f51265a4097af08f","analyzedAt":"2026-08-15T10:06:53.996Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}