|
| 1 | +# Troubleshooting |
| 2 | + |
| 3 | +> Common issues and solutions for PumpKit bots. Can't find your answer? [Open a discussion](https://github.com/nirholas/pumpkit/discussions). |
| 4 | +
|
| 5 | +--- |
| 6 | + |
| 7 | +## Installation Issues |
| 8 | + |
| 9 | +### `Cannot find module '@pumpkit/core'` |
| 10 | + |
| 11 | +Make sure you're in the monorepo root and have installed dependencies: |
| 12 | + |
| 13 | +```bash |
| 14 | +cd pumpkit |
| 15 | +npm install |
| 16 | +``` |
| 17 | + |
| 18 | +If running a specific package, use the workspace flag: |
| 19 | + |
| 20 | +```bash |
| 21 | +npm run dev --workspace=@pumpkit/monitor |
| 22 | +``` |
| 23 | + |
| 24 | +### TypeScript compilation errors |
| 25 | + |
| 26 | +```bash |
| 27 | +npm run build |
| 28 | +``` |
| 29 | + |
| 30 | +If errors persist, clean and rebuild: |
| 31 | + |
| 32 | +```bash |
| 33 | +rm -rf packages/*/dist |
| 34 | +npm run build |
| 35 | +``` |
| 36 | + |
| 37 | +--- |
| 38 | + |
| 39 | +## Telegram Bot Issues |
| 40 | + |
| 41 | +### Bot not responding to commands |
| 42 | + |
| 43 | +1. **Check bot token** — Verify `TELEGRAM_BOT_TOKEN` in `.env` matches [@BotFather](https://t.me/BotFather) |
| 44 | +2. **Check polling vs webhook** — grammy defaults to long polling. If deploying behind a reverse proxy, configure webhooks |
| 45 | +3. **Check bot permissions** — For channel bots, the bot must be added as an admin |
| 46 | +4. **Check logs** — Look for grammy errors in stdout |
| 47 | + |
| 48 | +```bash |
| 49 | +# Run locally with verbose logging |
| 50 | +LOG_LEVEL=debug npm run dev --workspace=@pumpkit/monitor |
| 51 | +``` |
| 52 | + |
| 53 | +### Channel bot not posting |
| 54 | + |
| 55 | +- The bot must be a **channel administrator** with "Post Messages" permission |
| 56 | +- `TELEGRAM_CHANNEL_ID` must include the `-100` prefix for supergroups: `-1001234567890` |
| 57 | +- Test with a direct message first to confirm the bot is alive |
| 58 | + |
| 59 | +### Rate limiting from Telegram |
| 60 | + |
| 61 | +Telegram limits bots to ~30 messages/second. If you're posting claim alerts for high-volume tokens: |
| 62 | + |
| 63 | +- Batch messages with a queue |
| 64 | +- Use `parse_mode: "HTML"` to combine multiple alerts into one message |
| 65 | +- Consider a minimum claim threshold to filter noise |
| 66 | + |
| 67 | +### Grammy `GrammyError: Call to 'sendMessage' failed` |
| 68 | + |
| 69 | +Common causes: |
| 70 | +- Bot was removed from the group/channel |
| 71 | +- Message too long (Telegram limit: 4096 chars) |
| 72 | +- Invalid HTML formatting (unclosed tags) |
| 73 | +- Bot blocked by user (for DM bots) |
| 74 | + |
| 75 | +--- |
| 76 | + |
| 77 | +## Solana RPC Issues |
| 78 | + |
| 79 | +### `Error: 429 Too Many Requests` |
| 80 | + |
| 81 | +You're hitting RPC rate limits: |
| 82 | + |
| 83 | +1. Use a dedicated RPC provider (Helius, QuickNode, Triton) |
| 84 | +2. Batch requests with `getMultipleAccountsInfo` |
| 85 | +3. Add retry logic with exponential backoff |
| 86 | + |
| 87 | +```typescript |
| 88 | +const [acctA, acctB] = await connection.getMultipleAccountsInfo([pdaA, pdaB]); |
| 89 | +``` |
| 90 | + |
| 91 | +### `Error: failed to get info about account` |
| 92 | + |
| 93 | +- The bonding curve may not exist yet (token not created) |
| 94 | +- The mint address may be wrong |
| 95 | +- The token may have graduated and the account closed |
| 96 | + |
| 97 | +### WebSocket connection drops |
| 98 | + |
| 99 | +Solana RPC WebSockets can be unstable. PumpKit bots should: |
| 100 | + |
| 101 | +- Auto-reconnect on disconnect (monitor bot does this) |
| 102 | +- Use `onLogs` with a confirmed commitment level |
| 103 | +- Have a fallback HTTP polling mode |
| 104 | + |
| 105 | +--- |
| 106 | + |
| 107 | +## Railway Deployment Issues |
| 108 | + |
| 109 | +### Build fails on Railway |
| 110 | + |
| 111 | +- Ensure `Dockerfile` is in the package root |
| 112 | +- Check that `tsconfig.json` `outDir` matches the Dockerfile `CMD` path |
| 113 | +- Verify all env vars are set in Railway dashboard |
| 114 | + |
| 115 | +### Bot crashes with `ENOMEM` |
| 116 | + |
| 117 | +Railway Hobby plan has 512MB RAM. Solutions: |
| 118 | + |
| 119 | +- Use `--max-old-space-size=384` in your start command |
| 120 | +- Reduce concurrent RPC connections |
| 121 | +- Use SQLite instead of in-memory stores for large datasets |
| 122 | + |
| 123 | +### Health check fails |
| 124 | + |
| 125 | +Railway expects an HTTP health endpoint. PumpKit core provides one: |
| 126 | + |
| 127 | +```typescript |
| 128 | +import { startHealthServer } from '@pumpkit/core'; |
| 129 | + |
| 130 | +startHealthServer({ port: parseInt(process.env.PORT || '3000') }); |
| 131 | +``` |
| 132 | + |
| 133 | +--- |
| 134 | + |
| 135 | +## Claim Detection Issues |
| 136 | + |
| 137 | +### Claims not being detected |
| 138 | + |
| 139 | +1. **Check program IDs** — Ensure you're monitoring all 3 Pump programs: |
| 140 | + - Pump: `6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P` |
| 141 | + - PumpAMM: `pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA` |
| 142 | + - PumpFees: `pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ` |
| 143 | +2. **Check event parsing** — Log raw transaction data to verify events are being decoded |
| 144 | +3. **Check RPC commitment** — Use `confirmed` or `finalized`, not `processed` |
| 145 | + |
| 146 | +### Wrong token displayed for claim |
| 147 | + |
| 148 | +One social fee PDA can be a shareholder in multiple `SharingConfig` accounts (one per token). The `SocialFeeIndex` maps PDA → Set of mints. When multiple mints match: |
| 149 | + |
| 150 | +- All candidate mints are fetched |
| 151 | +- The highest market cap token is displayed as primary |
| 152 | +- All linked tokens are shown in the message |
| 153 | + |
| 154 | +### First-claim detection resets after redeploy |
| 155 | + |
| 156 | +Local state is lost on redeploy. Solutions: |
| 157 | + |
| 158 | +- Persist claim state to disk (PumpKit uses JSON files in `/data/`) |
| 159 | +- Cross-check with on-chain lifetime data via `getCreatorVaultBalanceBothPrograms` |
| 160 | +- Use the `-1` sentinel value for ambiguous first claims |
| 161 | + |
| 162 | +--- |
| 163 | + |
| 164 | +## Still Stuck? |
| 165 | + |
| 166 | +1. Check [FAQ](./faq.md) for quick answers |
| 167 | +2. Check [Error Reference](./errors.md) for specific error codes |
| 168 | +3. [Open a discussion](https://github.com/nirholas/pumpkit/discussions) on GitHub |
| 169 | +4. Review [RPC Best Practices](./rpc-best-practices.md) for connection issues |
0 commit comments