Appearance
Connector Troubleshooting
Diagnose and resolve common issues with Google Drive, Gmail, Notion, and OneDrive connectors
Quick guide to resolve common connector issues with authentication, syncing, and permissions.
Quick Health Check
Check if your connectors are working properly:
typescript
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`);
}python
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")bash
# List all connections
curl -X POST " \
-H "Authorization: Bearer $SUPERMEMORY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"containerTags": ["user-123"]}'
# Check document status
curl -X POST " \
-H "Authorization: Bearer $SUPERMEMORY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"containerTags": ["user-123"], "source": "notion"}'Common Issues
OAuth Callback Fails
Problem: "Invalid redirect URI" error after user grants permissions
Solution: Ensure your redirect URL matches EXACTLY what's configured in your OAuth app:
typescript
// correct - exact match with OAuth app settings
const connection = await client.connections.create('notion', {
redirectUrl: '
containerTags: ['user-123']
});
// Wrong - URL doesn't match
// redirectUrl: 'Prevention:
- Use HTTPS for production URLs
- Copy the exact URL from your OAuth app settings
- Test the flow in development first
Documents Not Syncing
Problem: Documents stuck in "queued" or "extracting" status for over 30 minutes
Solution: Trigger a manual sync:
typescript
// Force sync for stuck documents
await client.connections.import('notion', {
containerTags: ['user-123']
});If documents consistently fail:
- Check if files are over 50MB (may timeout)
- Verify you have permission to access the documents
- Ensure the document type is supported
Permission Denied Errors
Problem: Some documents show "permission denied" or aren't syncing
Solution: Re-authenticate with proper permissions:
typescript
// Delete and recreate connection
await client.connections.deleteByProvider('google-drive', {
containerTags: ['user-123']
});
const newConnection = await client.connections.create('google-drive', {
redirectUrl: '
containerTags: ['user-123']
});
// User must re-authenticate
window.location.href = newConnection.authLink;Sync Takes Too Long
Problem: Hundreds of documents taking hours to sync
Solution: Set reasonable document limits:
typescript
const connection = await client.connections.create('onedrive', {
redirectUrl: '
containerTags: ['user-123'],
documentLimit: 500 // Start with fewer documents
});Provider-Specific Issues
Google Drive
Shared Drive Issues
Shared drives require special permissions. Make sure:
- User has access to the shared drive
- OAuth app has drive.readonly scope
- User is a member of the shared drive
Notion
Database Not Syncing
Notion databases need explicit permission. If databases aren't syncing:
- Go to Notion workspace settings
- Find your integration under "Connections"
- Click on the integration
- Select specific pages/databases to share
- Re-sync after granting access
Workspace Access
For full workspace access, a workspace admin must:
- Approve the integration
- Grant access to all pages
- Enable "Read content" permission
OneDrive
Business vs Personal Accounts
Business accounts may have additional restrictions:
- Admin consent might be required
- Some SharePoint sites may be restricted
- Compliance policies may block certain files
Gmail
Real-time Sync Not Working
If emails aren't syncing in real-time but scheduled/manual sync works:
- Real-time sync uses Google Cloud Pub/Sub webhooks
- Watch subscriptions expire after 7 days (supermemory auto-renews)
- Only INBOX label triggers real-time updates
- Trigger a manual sync to verify the connection is healthy:
typescript
await client.connections.import('gmail', {
containerTags: ['user-123']
});Missing Refresh Token
If Gmail stops syncing after initial setup:
- The user may have revoked app access in Google Account settings
- Delete and recreate the connection
- Ensure user completes full OAuth consent flow
typescript
// Re-authenticate to get fresh tokens
await client.connections.deleteByProvider('gmail', {
containerTags: ['user-123']
});
const newConnection = await client.connections.create('gmail', {
redirectUrl: '
containerTags: ['user-123']
});Scale Plan Required Error
Gmail connector requires Scale Plan or Enterprise Plan. If you see access errors:
- Verify your organization has the required plan
- Contact support to upgrade your plan
Best Practices
- Set reasonable document limits - Start with 500-1000 documents
- Use descriptive container tags - Makes debugging easier
- Monitor failed documents - Check weekly for sync issues
- Handle rate limits gracefully - Implement exponential backoff
- Test OAuth in development - Ensure redirect URLs work before production