Bug: Transaction vibration notifications not being sent for high-value transactions

Resolved 💬 3 comments Opened Dec 19, 2025 by afdelacruz Closed Feb 12, 2026

Summary

Active subscribers with device tokens registered are not receiving vibration notifications for transactions above their threshold amount, even though:

  • Webhooks are being received and processed ✅
  • Transactions are being stored ✅
  • Balances are being updated ✅
  • Device tokens are registered and active ✅

Evidence

User: mcguirecaroline15@gmail.com (active subscriber)

Settings:

  • vibrations_enabled: true
  • threshold_amount: $50
  • device_token: registered Dec 18, active
  • time_zone: Europe/Madrid

Transactions that should have triggered notifications:
| Transaction | Amount | Created | vibration_sent_at |
|-------------|--------|---------|-------------------|
| Airbnb | $574.79 | Dec 18 20:34 | NULL ❌ |
| Mecalito | $76.43 | Dec 18 20:34 | NULL ❌ |
| Mercadona | $85.76 | Dec 17 20:32 | NULL ❌ |

Production logs at 20:34-20:35 show:

  • Webhook received and stored ✅
  • Balance snapshots updated ✅
  • Widget refresh sent ✅
  • NO "VIBRATION CHECK" logs

Root Cause Hypotheses

  1. Transactions detected as duplicates - Vibrations only process for NEW transactions. If transactions already existed in DB, they wouldn't be checked for vibrations.
  1. Debug logs not captured - Vibration processing logs are at debug level which may not show in production.
  1. Bug in vibration flow - processVibrationsForNewTransactions() may not be called or newTransactions array is empty.

Additional Issues Found

Broken log statements in NotificationService.js:

// Line 65 - no interpolation
logger.info('VIBRATION CHECK []: amount=$, prefs=)}');

// Line 76 - no interpolation  
logger.info('VIBRATION []: SKIP - Amount $ < threshold $');

These should use template literals with actual values for debugging.

Files to Investigate

  • backend/services/NotificationService.js - Fix broken logs, check threshold logic
  • backend/services/WebhookProcessorService.js - Check processVibrationsForNewTransactions() is called
  • backend/services/TransactionService.js - Check how newTransactions vs duplicates are determined

Steps to Reproduce

  1. Have an active subscriber with device token and vibrations enabled
  2. Trigger a webhook with transactions above threshold
  3. Check if vibration_sent_at gets populated
  4. Check production logs for "VIBRATION CHECK" entries

Expected Behavior

Transactions above threshold should:

  1. Trigger "VIBRATION CHECK" log
  2. Pass threshold check
  3. Send push notification
  4. Update vibration_sent_at column

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗