Skip to content

Pixel Device Testing Guide โ€‹

Quick reference for testing Lantern on Google Pixel with Chrome.

Prerequisites โ€‹

  • Google Pixel phone
  • Chrome browser
  • Lantern dev site: dev.ourlantern.app
  • Test account (or create new one)

Quick Test (5 minutes) โ€‹

1. Test Login Persistence (THE KEY FIX) โ€‹

Step 1: Login
  โ€ข Open dev.ourlantern.app on Pixel Chrome
  โ€ข Sign in with email/passphrase
  โ€ข Wait for dashboard to load
  โ€ข โœ… Should see your lantern name immediately

Step 2: Close app completely
  โ€ข Swipe up from bottom (Android nav)
  โ€ข Swipe up on Chrome card to force-close
  
Step 3: Reopen app
  โ€ข Tap Chrome icon to open
  โ€ข Navigate to dev.ourlantern.app
  โ€ข โœ… Should already be logged in!
  โ€ข โœ… Dashboard shows immediately (no login form)
  โ€ข โœ… Lantern name visible within 1-2 seconds

Why this matters: Before the fix, user would be logged out and need to re-login. Now login persists across app close.

2. Reload Speed Test โ€‹

Open Console first:
  โ€ข Chrome > Menu > More Tools > Developer Tools
  โ€ข Tap "Console" tab
  
Step 1: Watch console on reload
  โ€ข Tap address bar, press Enter to reload
  โ€ข Watch for logs in Console:
    โœ… "Mobile: true, Pixel: true"
    โœ… "Auth state changed"
    โœ… "Public profile loaded"
    โœ… All within 1-2 seconds
    
Step 2: Check performance
  โ€ข Before: "โš ๏ธ Could not fully load profile" + slow
  โ€ข After: All loads complete, no warnings

3. Service Worker Check โ€‹

Without DevTools (simple check):
  โ€ข Settings > Apps > Chrome > Storage
  โ€ข If you see significant used space = Service Worker active โœ…

With DevTools:
  โ€ข Chrome DevTools > Application tab
  โ€ข Service Workers > Should see /sw.js
  โ€ข Status: "activated and running"
  โ€ข โœ… Confirm registered and running

4. Offline Test (Bonus) โ€‹

Step 1: Load app while online
  โ€ข Should be fully functional
  
Step 2: Go offline
  โ€ข Settings > Network & Internet > Airplane mode ON
  
Step 3: Navigate app
  โ€ข Dashboard should still show (cached)
  โ€ข Profile data should be visible
  โ€ข Chat history visible (if cached)
  
Step 4: Go online
  โ€ข Airplane mode OFF
  โ€ข App syncs automatically
  โ€ข โœ… Data updates

What Changed (For Context) โ€‹

BeforeAfter
Close app โ†’ logoutClose app โ†’ stay logged in
Reload: 2-3 secondsReload: 600-800ms
Slow on mobileFast on Pixel
Service worker failsService worker retries

Debug Commands in Console โ€‹

javascript
// Check device config
window.getDeviceConfig()
// Returns: {isMobile: true, isPixel: true, ...}

// Check auth state
firebase.auth().currentUser
// Returns: {uid: "...", email: "...", ...} or null

// Force refresh IndexedDB
// Settings > Apps > Chrome > Storage > Clear All
// Then reload app

Troubleshooting โ€‹

Still logging out after close?

  1. Check Chrome settings: Settings > Apps > Chrome > Permissions
  2. Make sure NOT in incognito mode
  3. Check Storage: App > Storage > IndexedDB > firebaseLocalStorageDb exists

Still slow on reload?

  1. First load will be slow (expected, no cache yet)
  2. Second load should be ~600-800ms
  3. If still slow: Check Network tab, look for slow requests

Service Worker not showing?

  1. Refresh page (pull down)
  2. Wait 2 seconds
  3. Check again in DevTools > Application > Service Workers
  4. If still missing: Settings > Apps > Chrome > Storage > Clear All

Before/After Comparison โ€‹

Before (โŒ Had issues): โ€‹

Force close Chrome โ†’ reopen โ†’ Login form (not logged in anymore)
Reload page โ†’ 2-3 seconds waiting
Console: "โš ๏ธ Could not fully load profile"
Service worker: Sometimes registered, sometimes not

After (โœ… Fixed): โ€‹

Force close Chrome โ†’ reopen โ†’ Dashboard (still logged in!)
Reload page โ†’ ~600ms, smooth load
Console: Clean, no warnings
Service worker: Reliably registered with retry logic

Report Issues โ€‹

If you see any of these, please report with exact message:

  • โŒ Still getting logout after close
  • โŒ Reload still taking >1 second
  • โŒ Service Worker fails to register
  • โŒ Profile not loading at all
  • โŒ Cache/storage errors in console

Include:

  1. Exact error message from console
  2. Device model (Pixel 6, 7, etc.)
  3. Chrome version (Settings > About Chrome)
  4. Steps to reproduce

Quick Performance Check โ€‹

Optimal results on Pixel:

  • Load time (first): 2-3 seconds
  • Load time (subsequent): 600-800ms
  • Login persistence: โœ… Survives force-close
  • Service Worker: โœ… Always registered
  • Offline: โœ… Shows cached dashboard

If you're seeing these metrics, the optimization is working! ๐ŸŽ‰

Built with VitePress