That's probably because you haven't synced up to the point where the input transactions shows up.
Try this:
signrawtransaction "hexstring" "[{\"txid\":\"id\",\"vout\":n,\"scriptPubKey\":\"hex\"}]" "[\"privatekey\"]" "ALL"
^^That's what I was trying to do but keep getting parsing error. Didn't know I have to use "\" between quotes. This works without having to sync.
in my idea, the hexstring already have the info of txid and vout.
and I don't know what is scriptPubKey where to get it ?
Get the raw hex of 20f90f035cf6efb4c5ebb7c5c5f3459323f4b3ee9c9f2fdefa45d6d8e95d8e0c and decode it using
decoderawtransaction.
In your case it would be:
0100000001fd0173e6af05ee6c36c970e6483edef1a30373a0a2244dc495aee7efdc58da7801000 0008b483045022100a308300f01eb5a349ccefb294475989e297eb83966a37620605da43d19d096 52022059790e9334e2da1f16de4b58d8623462d7b7c3559bd7479ecc41ba2ce8cafa25014104fef b5625a6c70cf33ca6b4e1ddea093e145410899c051bb6c85beff66532e57a074e8b249c5ebf5593 24162dc2ca6d8c1b5c3e2d986975c3dfd1b2b945e0ed09ffffffff02c0d40100000000001976a91 490c7eedb3d0d26faa21ade8372a456633e950ff488ac64a35601000000001976a914cc2866e100 23714b13e316d4dff34570ac9ff53b88ac00000000
Decode that and you'll get:
{
"txid": "20f90f035cf6efb4c5ebb7c5c5f3459323f4b3ee9c9f2fdefa45d6d8e95d8e0c",
"size": 258,
"version": 1,
"locktime": 0,
"vin": [
{
"txid": "78da58dcefe7ae95c44d24a2a07303a3f1de3e48e670c9366cee05afe67301fd",
"vout": 1,
"scriptSig": {
"asm": "3045022100a308300f01eb5a349ccefb294475989e297eb83966a37620605da43d19d0965202205 9790e9334e2da1f16de4b58d8623462d7b7c3559bd7479ecc41ba2ce8cafa25[ALL] 04fefb5625a6c70cf33ca6b4e1ddea093e145410899c051bb6c85beff66532e57a074e8b249c5eb f559324162dc2ca6d8c1b5c3e2d986975c3dfd1b2b945e0ed09",
"hex": "483045022100a308300f01eb5a349ccefb294475989e297eb83966a37620605da43d19d09652022 059790e9334e2da1f16de4b58d8623462d7b7c3559bd7479ecc41ba2ce8cafa25014104fefb5625 a6c70cf33ca6b4e1ddea093e145410899c051bb6c85beff66532e57a074e8b249c5ebf559324162 dc2ca6d8c1b5c3e2d986975c3dfd1b2b945e0ed09"
},
"sequence": 4294967295
}
],
"vout": [
{
"value": 0.00120000,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 90c7eedb3d0d26faa21ade8372a456633e950ff4 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a91490c7eedb3d0d26faa21ade8372a456633e950ff488ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [
"1ECXpDRh4tzva6EUViV8pmpHYAvsCo9mzE"
]
}
},
{
"value": 0.22455140,
"n": 1,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 cc2866e10023714b13e316d4dff34570ac9ff53b OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a914cc2866e10023714b13e316d4dff34570ac9ff53b88ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [
"1KcVFJffbe63xsZ631evetdkLvXgFp7N5r"
]
}
}
]
}
So the scriptpubkey for the output you're using is 76a91490c7eedb3d0d26faa21ade8372a456633e950ff488ac.