TransactionPool.Remember: transactionGroup: [0] had zero Group but was submitted in a group of 2

Sorry , could you find something on this? I’m currently running into the same error.

:grinning: UPDATE : I could solve the problem. It seems that the problem is the order of the code. I just copy this boilerplate for atomic transfers but I had to do some changes.

Summary:
1- build transaction with makePaymentTxnWithSuggestedParams
2- next call algosdk.assignGroupID([transaction1,transaction2]) no necessary to save it into a variable as repo does.
3- sign both txns
4- push signed txns into array groupedSignedTxns =
5- call => await algodClient.sendRawTransaction(groupedSignedTxns).do()

I’ll put my code here just to make it even more explicit:

const algosdk = require('algosdk');

var client = null;
async function setupClient() {
    if (client == null) {
        const token = { 'X-API-key': 'EMgRQXIAN67gCYG9lGQB5aQJmokDqZqc2JM7zsgO' };
        const server = "https://testnet-algorand.api.purestake.io/ps2";
        const port = "";
        let algodClient = new algosdk.Algodv2(token, server, port);
        client = algodClient;
    } else {
        return client;
    }
    return client;
}


function recoverAccount1() {
    var account1_mnemonic = "PUT HERE YOUR MNEMONIC";
    const passphrase = account1_mnemonic;
    let myAccount = algosdk.mnemonicToSecretKey(passphrase);
    return myAccount;
}

function recoverAccount2() {
    var account2_mnemonic = "PUT HERE YOUR MNEMONIC";
    const passphrase = account2_mnemonic;
    let myAccount = algosdk.mnemonicToSecretKey(passphrase);
    return myAccount;
}

// function used to wait for a tx confirmation
const waitForConfirmation = async function (algodclient, txId) {
    let response = await algodclient.status().do();
    let lastround = response["last-round"];
    console.log(`Waiting for transaction confirmation for txn ${txId}`);
    while (true) {
        const pendingInfo = await algodclient.pendingTransactionInformation(txId).do();
        if (pendingInfo["confirmed-round"] !== null && pendingInfo["confirmed-round"] > 0) {
            //Got the completed Transaction
            console.log("Transaction " + txId + " confirmed in round " + pendingInfo["confirmed-round"]);
            break;
        }
        lastround++;
        await algodclient.statusAfterBlock(lastround).do();
    }
    console.log('Transaction confirmed');
};


async function submitGroupTransactions() {

    try {
        const receiver = "GD64YIY3TWGDMCNPP553DZPPR6LDUSFQOIJVFDPPXWEG3FVOJCCDBBHU5A";
        let algodClient = await setupClient();
        let myAccountA = await recoverAccount1();
        let myAccountB = await recoverAccount2();
        console.log("My account B address: %s", myAccountB.addr)
        console.log("My account A address: %s", myAccountA.addr)

        let suggestedParams = await algodClient.getTransactionParams().do();
        
        let transactionAccA = algosdk.makeAssetTransferTxnWithSuggestedParam(myAccountA.addr, receiver, myAccountB.addr, undefined,1000000,  undefined, 13300122, suggestedParams)
        let transactionAccB = algosdk.makeAssetTransferTxnWithSuggestedParam(myAccountB.addr, receiver, myAccountA.addr, undefined,1000000,  undefined, 13300122, suggestedParams)

        algosdk.assignGroupID([transactionAccA,transactionAccB]);

        let signedTxA = transactionAccA.signTxn(myAccountA.sk)
        let signedTxB = transactionAccB.signTxn(myAccountB.sk)

        let groupedSignedTxns = []
        groupedSignedTxns.push(signedTxA)
        groupedSignedTxns.push(signedTxB)

        let tx = (await algodClient.sendRawTransaction(groupedSignedTxns).do());
        console.log("Transaction : " + tx.txId);

        await waitForConfirmation(algodClient, tx.txId);

    } catch (err) {
        console.log("err", err);
    }
}
submitGroupTransactions();

Few last things to take into account:

  • remember your addresses need balance to send the txn : here you can faucet them
  • boilerplate has a different connection to algoCliento from what’s in the code above

Hope this help you or someone in future!