So, it seems it is trying to spend a UTXO that wouldn't exist if your
new transaction was actually
created confirmed.
The tx was created and the UTXO was already exist if my third paragraph on this post make sense to you. There were only one unconfirmed tx and those confirmed txes were confirmed long ago in that specific address (wallet)
Sorry... re-reading that, I used the wrong word... it shouldn't have said created, it should have said "confirmed". I think it is an "impossible loop" type situation. The
new transaction is spending a UTXO (We'll call it UTXO-A) that can't exist if this new transaction was added to the blockchain, as it is ALSO spending a UTXO that was used to create the transaction that actually creates UTXO-A.
It's a weird "double spend"-type scenario... and possibly just related to the order in which the server is parsing your transaction for validity.
The scenario that I can think of, would be something like this:
1. You create a transaction, that spends UTXO-X, that creates UTXO-A... but this is not confirmed.
2. You then create a 2nd transaction, that tries to spend UTXO-A,
while also spending UTXO-X.
3. The server, while parsing the transaction, notes that you're spending UTXO-A and checks to see how this was created, then notes that you're spending UTXO-X... if that happened, then UTXO-A couldn't exist.
BOOM! you get the "bad-txns-spends-conflicting-tx" error... I'm not 100% sure if this is actually correct, but is one scenario I can think of that would trigger this specific error.
I have this HD wallet but when I spend then I pick an address, take its private key and restore the single address wallet to spend from it. This specific address had more than enough balance which I was suppose to spend. And before spending the issue raised tx, I sent another tx few hours ago which had very low fee (believe me it was only 1.9 sat/B LOL) and for this reason it was unconfirmed at the time I was initiating the 2nd tx. So when I tried the 2nd tx, I always ended up with the errors I mentioned on my OP (@nc50lc, there were always the green icons on the left and one unconfirmed tx).
...
I am most certain about it which concludes that if you have an unconfirmed tx then you can not initiate another tx? (this is actually the same happened here. Later once the unconfirmed tx confirmed then I was able to create the 2nd tx. )
No, that isn't the case at all... You can actually create long chains of unconfirmed transactions. I suspect your issue is possibly caused because of the way you're creating "single" address wallets... from single keys derived from an HD wallet??!?
If you're using Electrum, and want to pick and choose exactly which address you want to send from or, more correctly, which specific UTXO(s) you want to spend, you
should be using the "Coin Control" features within Electrum. If you use the menu option: "View -> Show Coins", and then select the "Coins" tab, Electrum shows each individual UTXO that your wallet currently controls. You can select as many or as few UTXOs as you want (using CTRL or SHIFT + left click etc)... then right click on the selected coin(s) and select "Spend". This will create a transaction that spends ONLY the selected UTXOs.
That would be a much much much easier way to go about doing what it is that you appear to be trying to do... Why exactly are you creating single address wallets to spend from an HD wallet?