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