apps/docs/connectors/troubleshooting.mdx
Quick guide to resolve common connector issues with authentication, syncing, and permissions.
Check if your connectors are working properly:
<CodeGroup>const connections = await client.connections.list({
containerTags: ['user-123']
});
connections.forEach(conn => {
console.log(`${conn.provider}: ${conn.email} - Connected ${conn.createdAt}`);
});
// Check for stuck documents
const documents = await client.connections.listDocuments('notion', {
containerTags: ['user-123']
});
const failed = documents.filter(doc => doc.status === 'failed');
if (failed.length > 0) {
console.log(`⚠️ ${failed.length} documents failed to sync`);
}
connections = client.connections.list(container_tags=['user-123'])
for conn in connections:
print(f"{conn.provider}: {conn.email} - Connected {conn.created_at}")
# Check for stuck documents
documents = client.connections.list_documents(
'notion',
container_tags=['user-123']
)
failed = [doc for doc in documents if doc.status == 'failed']
if failed:
print(f"⚠️ {len(failed)} documents failed to sync")
# List all connections
curl -X POST "https://api.supermemory.ai/v3/connections/list" \
-H "Authorization: Bearer $SUPERMEMORY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"containerTags": ["user-123"]}'
# Check document status
curl -X POST "https://api.supermemory.ai/v3/documents/list" \
-H "Authorization: Bearer $SUPERMEMORY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"containerTags": ["user-123"], "source": "notion"}'
Problem: "Invalid redirect URI" error after user grants permissions
Solution: Ensure your redirect URL matches EXACTLY what's configured in your OAuth app:
// correct - exact match with OAuth app settings
const connection = await client.connections.create('notion', {
redirectUrl: 'https://yourapp.com/auth/notion/callback',
containerTags: ['user-123']
});
// Wrong - URL doesn't match
// redirectUrl: 'https://yourapp.com/callback'
Prevention:
Problem: Documents stuck in "queued" or "extracting" status for over 30 minutes
Solution: Trigger a manual sync:
// Force sync for stuck documents
await client.connections.import('notion', {
containerTags: ['user-123']
});
If documents consistently fail:
Problem: Some documents show "permission denied" or aren't syncing
Solution: Re-authenticate with proper permissions:
// Delete and recreate connection
await client.connections.deleteByProvider('google-drive', {
containerTags: ['user-123']
});
const newConnection = await client.connections.create('google-drive', {
redirectUrl: 'https://yourapp.com/callback',
containerTags: ['user-123']
});
// User must re-authenticate
window.location.href = newConnection.authLink;
Problem: Hundreds of documents taking hours to sync
Solution: Set reasonable document limits:
const connection = await client.connections.create('onedrive', {
redirectUrl: 'https://yourapp.com/callback',
containerTags: ['user-123'],
documentLimit: 500 // Start with fewer documents
});
Shared Drive Issues
Shared drives require special permissions. Make sure:
Database Not Syncing
Notion databases need explicit permission. If databases aren't syncing:
Workspace Access
For full workspace access, a workspace admin must:
Business vs Personal Accounts
Business accounts may have additional restrictions:
Real-time Sync Not Working
If emails aren't syncing in real-time but scheduled/manual sync works:
await client.connections.import('gmail', {
containerTags: ['user-123']
});
Missing Refresh Token
If Gmail stops syncing after initial setup:
// Re-authenticate to get fresh tokens
await client.connections.deleteByProvider('gmail', {
containerTags: ['user-123']
});
const newConnection = await client.connections.create('gmail', {
redirectUrl: 'https://yourapp.com/callback',
containerTags: ['user-123']
});
Scale Plan Required Error
Gmail connector requires Scale Plan or Enterprise Plan. If you see access errors: