Here is a draft article based on your contribution:
Error: createInitializeGroupInstruction fails with InvalidInstruction – How to Create an NFT Collection Using Token Extensions
In this article, we will explore why you might encounter issues when trying to create an NFT collection on Solana using Token Extensions. We will provide you with a step-by-step guide on how to resolve these issues and successfully deploy your NFT collection.
Issue: createInitializeGroupInstruction fails with InvalidInstruction
When creating an NFT collection, you need to use the createInitializeGroupInstruction instruction to initialize a group of tokens. However, this instruction is notorious for failing with an InvalidInstruction error when deployed on Solana.
Solution Branches: A Solution
To address these challenges, we will dive into two solution branches:
- Follow the Group, Group Indicator, Member, Member Indicator lesson: This branch assumes that you have successfully completed uploading the group metadata off-chain to Irys.
- **Resolving the
createInitializeGroupInstructionfailure withInvalidInstruction: A separate article focused on this specific issue
Solution Branch 1: Follow the Group, Group Indicator, Member, Member Indicator lesson
In this solution branch, we will assume that you have successfully uploaded the group metadata off-chain to Irys and are ready to create an NFT collection. To resolve the createInitializeGroupInstruction failure with an InvalidInstruction, we will follow a series of steps.
Step 1: Verify Group Structure
Before creating the group statement, verify that your group structure is correct by checking the following:
- All group members have unique IDs.
- Each member has at least one owner.
- The group size matches the expected number.
If any of these checks fail, you may need to adjust your group structure before continuing.
Step 2: Create a Token Extension
Create a new token extension on Solana by running the following command:
solana-commands create token-extension --name NFT-token-extension
This will generate a file called “NFTTTokenExtension.json”. This file contains the metadata required for the token extension.
Step 3: Update Group Instructions

Update the group instructions to include the new token extension:
{
"instructions":
{
"instruction_id": "createInitializeGroupInstruction",
"type": "group_instruction".
"args": {
"group_name": "My NFT Collection"
"members":
{
"owner_id": "0x...Your token address.
} }
]
},
"extension_ids": ["NFTTTokenExtension"]
} }
]
} }
Step 4: Deploy the group instruction
Deploy the updated group instruction using the createInitializeGroupInstruction command:
solana - commands deploy -- address -- instruction - id createInitializeGroupInstruction -- args { { { 2010 - 2010 - 2011 - 2012 - 2013 - 2014 - 2015 - 2016 - 2017 - 2018 - 2018 -
"group_name": "My NFT Collection"
"members":
{
"owner_id": "0x...Your token address.
} }
]
} }
If you encounter an InvalidInstruction error, please refer to the solana-commands documentation for more information on how to handle this type of error.
Solution Branch 2: Resolving createInitializeGroupInstruction Failure with InvalidInstruction: A Separate Article
For those who are experiencing issues with group instructions failing, we will provide a separate article focused on resolving this specific issue. This article will go through detailed troubleshooting steps and potential solutions to help you overcome the InvalidInstruction error.