Sending ether from one address to another using web3js. Getting issue of "account unlock with HTTP access is forbidden"
2 Answers
Probably the unlocking process for you account has not completed at the time of transaction.
May be there is a solution in this answer: Error: account unlock with HTTP access is forbidden when unlock an account in Geth console
When you launch a private network using geth, by default as a security measure unlocking account via HTTP is forbidden, you can overcome this issue with a simple flag that you should provide when launching the network:
--allow-insecure-unlock
Example:
geth --allow-insecure-unlock
Ensure this flag is added when launching the private network
--allow-insecure-unlock -> Allow insecure account unlocking when account-related RPCs are exposed by http