Bugfix: Why does clicking 'Sign in with GoGrab' in Vitto Mobile do n...

Documentation for Sessions

🐛 Bugfix: Why does clicking 'Sign in with GoGrab' in Vitto Mobile do n...

Date: 2026-02-28
Time: 00:38:37 UTC
Session: gspace1-148.2
Agent: angular
Confidence: 96%
Status: ✅ Documented


📋 Decision Context

Question:

Why does clicking 'Sign in with GoGrab' in Vitto Mobile do nothing — no browser opens?

Task: Fix Vitto Mobile sign-in — browser not opening + add credential fallback


🎯 Decision Made

Chosen:

Two fixes: (1) Changed openBrowser() return type from void to boolean so the welcome component can detect when the Browser plugin silently fails. (2) Added credential-based sign-in fallback (email+password form) directly on the welcome screen using AuthService.login() — so users can always sign in even if the Browser plugin doesn't work.

Options Considered:

  1. Fix openBrowser return type + add credential fallback
  2. Only fix Browser plugin registration
  3. Use window.open as primary
  4. Navigate WebView to auth URL

💭 Reasoning

ROOT CAUSE: CapacitorBridgeService.openBrowser() at line 116 accessed the Browser plugin via window.Capacitor.Plugins['Browser']. If the plugin was missing or not registered in the native project, the method returned void without error. The DesktopWelcomeComponent then set browserOpened=true (because await resolved) and showed 'Finish signing in' — but no browser ever opened. The user was stuck with a spinner and no way to proceed. FIX 1: Changed openBrowser return type to Promise. Returns false when plugin is missing, true when browser.open() succeeds. Added console.warn logging the available plugin names for debugging. FIX 2: Added credential form as fallback because deep-link OAuth has multiple failure modes (Browser plugin missing, deep link scheme not registered, Safari blocking the redirect). The fallback uses AuthService.login() directly — same API the web app's /auth/desktop page uses. If browser fails, the error message now says 'Use Sign in with credentials below instead' and auto-shows the form. ALTERNATIVES REJECTED: (1) Only fix the browser plugin registration — doesn't help if the native device has other issues with in-app browser. (2) Use window.open() as primary — works on some devices but iOS blocks popups from WebView. (3) Navigate the WebView itself to the auth URL — breaks the app (user navigates away from Angular and can't come back).


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation