Skip to content

internet-court/internet-court-skill / vendored/sendaifun/glam

Solana vault management via GLAM Protocol. Triggers: glam, glam-cli, glam-sdk, vault create/manage, tokenized vault, share class, DeFi vault, treasury, asset management, access control, delegate permissions, Jupiter swap, Kamino lending/borrow/vaults/farms, staking (Marinade/native/SPL/Sanctum/LST), cross-chain USDC (CCTP), timelock, subscription/redemption, NAV pricing, token transfer. Supports CLI and TypeScript SDK.

docs/troubleshooting.md

View on GitHub
# GLAM Troubleshooting

## Installation

| Error                                        | Solution                                                                                          |
| -------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| `EACCES: permission denied` (npm install)    | Use `npx @glamsystems/glam-cli` instead, or fix npm prefix: `npm config set prefix ~/.npm-global` |
| `Cannot find module '@glamsystems/glam-sdk'` | Install peer deps: `npm install @solana/web3.js @coral-xyz/anchor`                                |

## Configuration

Config file: `~/.config/glam/config.json`

```json
{
  "keypair_path": "~/.config/solana/id.json",
  "json_rpc_url": "https://api.mainnet-beta.solana.com"
}
```

| Error                                                      | Solution                                                                |
| ---------------------------------------------------------- | ----------------------------------------------------------------------- |
| `Keypair file not found` / `keypairPath is not configured` | Create config file above. Create keypair if needed: `solana-keygen new` |
| `Invalid secret key`                                       | Keypair must be JSON array of 64 numbers: `[123,45,67,...]`             |

## Transactions

| Error                                                               | Solution                                                                  |
| ------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| `Attempt to debit an account but found no record of a prior credit` | Check `solana balance` and `glam-cli vault token-balances`                |
| `Transaction simulation failed`                                     | Verify integration is enabled: `glam-cli vault view`                      |
| `Transaction was not confirmed or block height exceeded/expired`    | Check if transaction is landed. Retry, or switch to a faster RPC endpoint |
| `exceeded CUs meter at BPF instruction`                             | SDK: pass `{ computeUnitLimit: 400_000 }` as options                      |

## Permissions

| Error                                        | Solution                                                                                                               |
| -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `Signer is not authorized`                   | 1) Check you're using vault owner's keypair (`glam-cli vault view`) 2) Grant delegate permission 3) Enable integration |
| `Delegate does not have required permission` | `glam-cli delegate list` to check, then `glam-cli delegate grant <PUBKEY> <PERMS> --protocol <PROTO>`                  |
| `Asset not in vault allowlist`               | `glam-cli vault allowlist-asset <MINT> --yes`                                                                          |

## RPC

| Error                    | Solution                                                                                                  |
| ------------------------ | --------------------------------------------------------------------------------------------------------- |
| `429 Too Many Requests`  | Switch to a paid RPC endpoint in config                                                                   |
| `Connection refused`     | Check RPC URL: `glam-cli env`                                                                             |
| `Account does not exist` | Wrong vault address, vault closed, or wrong cluster. Verify with `glam-cli vault view` and `glam-cli env` |

## Integration-Specific

### Jupiter

| Error                         | Solution                                                                        |
| ----------------------------- | ------------------------------------------------------------------------------- |
| `No route found for swap`     | Try smaller amount; check `glam-cli jupiter view-policy` for allowlisted tokens |
| `Slippage tolerance exceeded` | Increase: `--slippage-bps 100` (1%), or reduce trade size                       |

### Kamino

| Error                          | Solution                                                                          |
| ------------------------------ | --------------------------------------------------------------------------------- |
| `Lending market not found`     | Use correct market address (Main: `7u3HeHxYDLhnCoErrtycNokbQYbWGzLs6JSDqGAv5PfF`) |
| `Obligation account not found` | `glam-cli kamino-lend init --yes` (required once)                                 |

## Getting Help

1. Check vault state: `glam-cli vault view`
2. GitHub issues: https://github.com/glamsystems/glam-cli/issues
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall