Rails Flutter Server Health Check 4 Issues

Rails + Flutter App Server Health Check: 4 Issues Found and Fixed at Once

After uploading a test build of the app and running it myself, 4 things broke simultaneously. Google login failure, AI itinerary generation returning wrong results, app crash on tapping the notification button, and the popular destinations section completely empty. Here is the process of finding and fixing each cause. 1. Google SSO Fails While Apple Login Succeeds Symptoms Apple Sign-In works normally but Google Sign-In returns a 500 error. The client only shows a login failure toast. ...

2025-10-15 · 6 min read · Seunghan
Flutter Sync Queue Aggressive Error Handling

Fixing Unnecessary Error Exposure in Flutter Sync Queue

While implementing a Transactional Outbox pattern for offline sync in a mobile app, I discovered that “sync failed” errors were repeatedly shown to users even though synchronization had actually completed successfully. Symptoms The app repeatedly threw the following error: AppException: Failed to push changes: AppException: Push completed with failures; retry count: 2, pending changes remain in queue. Checking server logs confirmed that sync pull was working normally and the data was already synchronized. ...

2025-10-04 · 5 min read · Seunghan
Flutter Rails Auth Session Persistence Debugging

Flutter + Rails Auth Session Keeps Dropping - 3 Causes and Solutions

Login sessions keep dropping in a Flutter BLoC app. Tokens are stored in SecureStorage, automatic renewal on 401 is implemented via Dio interceptors – so why? Starting from server logs, I found 3 causes and fixed all of them. Here is the full process. Tech Stack Mobile: Flutter + BLoC pattern + Dio HTTP + SecureStorage Server: Rails 8 API + ActionCable WebSocket Auth: SHA-256 digest-based access token + JTI refresh token (90 days) Real-time: ActionCable WebSocket (token-based auth) Symptoms Works fine right after login API requests start failing with 401 after some time Token refresh seems to work, but WebSocket disconnects App eventually transitions to unauthenticated state Cause 1: Ghost of Legacy Code - Residual DTA Methods Discovery Server logs showed intermittent user.tokens-related errors during token refresh. The project had migrated from devise_token_auth (DTA) to a custom token system, but token_refresh_service.rb still had DTA-era code. ...

2025-09-27 · 5 min read · Seunghan
Flutter Glassappbar Tabbar Overflow Colors White Lightmode

Flutter UI Full Audit — GlassAppBar TabBar Overflow and Colors.white Light Mode Bug

When you build a Flutter app long enough, there are two bugs you inevitably encounter at least once. One is the bottom overflowed by N pixels error, the other is text becoming invisible against the background in light mode. Both have simple causes, but until you do a full audit of all screens, it’s easy to just think “something’s off on a few screens.” It wasn’t until I swept through all 50 pages of the app that the pattern became clear. ...

2025-09-24 · 4 min read · Seunghan
Flutter Bloc Infinite Scroll Pagination

Flutter BLoC Infinite Scroll Implementation — Layer-by-Layer Design Without External Packages

Loading the entire list upfront is slow. I needed infinite scroll that naturally loads the next batch of data as the user scrolls. Packages like infinite_scroll_pagination exist, but fitting them into an existing BLoC structure sometimes means redesigning your state to match the package’s approach, which can actually make things more complex. Since it’s perfectly achievable with just ScrollController and no external dependencies, I went that route. Why Offset-Based There are two pagination approaches. ...

2025-09-20 · 6 min read · Seunghan
Ios Sso Entitlements Testflight Errors

iOS TestFlight Deployment Debugging: From SSO Errors to Entitlements Mismatch

Here are the errors repeatedly encountered while uploading multiple Flutter apps to TestFlight. 1. Apple Sign-In Error 1000 SignInWithAppleAuthorizationException(AuthorizationErrorCode.unknown, The operation couldn't be completed. (com.apple.AuthenticationServices.AuthorizationError error 1000.)) Cause This occurs because the Sign in with Apple capability is missing from Runner.entitlements. Solution Both places must be configured. 1. ios/Runner/Runner.entitlements <key>com.apple.developer.applesignin</key> <array> <string>Default</string> </array> 2. Apple Developer Console developer.apple.com -> Identifiers -> Select app Bundle ID -> Check Sign in with Apple -> Save ...

2025-08-30 · 4 min read · Seunghan
Flutter Deprecated Api Mass Fix

Flutter Deprecated API Mass Fix - withOpacity, DropdownButtonFormField, Switch, and More

If you maintain a Flutter project long enough, the day comes when flutter analyze spits out hundreds of deprecated warnings. Everything works fine functionally, but when warnings pile up, real problems get buried. Here are the patterns from cleaning up 200+ deprecated warnings in one go. Diagnosis: Assess the Situation with flutter analyze flutter analyze --no-pub Adding --no-pub skips pub package re-analysis for speed. Categorizing the output reveals that most warnings are a few repeating patterns. ...

2025-07-20 · 4 min read · Seunghan
Flutter Dead Ui Fix Xcode26 Widget Bug

Connecting Unimplemented Flutter UI Components + Xcode 26 Beta WidgetKit Install Bug Workaround

Dealt with two problems back-to-back while working on a Flutter app. One was a UI-level issue – connecting components that were just shells with onTap: () {}. The other was a problem in Xcode 26.2 beta where the app itself wouldn’t install on the simulator due to extensions. 1. Connecting Non-Functional UI Components A common situation during Flutter development: screens are all built, but buttons have onPressed: () {}, cards have onTap: () {}, and there’s no actual behavior. ...

2025-07-16 · 4 min read · Seunghan
Flutter Bloc Complex State Management

Flutter BLoC - Designing State Management for Complex Q&A Sessions

A BLoC that just loads and displays a list isn’t hard. The challenge comes when you need to manage session-based workflows in a single BLoC – things like “create a session -> add questions -> receive answers -> complete.” Draw the States First Before coding the BLoC, define the states first. Listing all the states the UI needs to display for this workflow: Initial (nothing loaded) Session list loading Session list displayed Creating new session Session detail loading Session detail displayed (with question list) Adding question Submitting answer Error abstract class ReviewQaState {} class ReviewQaInitial extends ReviewQaState {} class ReviewQaLoading extends ReviewQaState {} class ReviewQaSessionListLoaded extends ReviewQaState { final List<QaSession> sessions; ReviewQaSessionListLoaded(this.sessions); } class ReviewQaSessionLoaded extends ReviewQaState { final QaSession session; final List<ReviewQuestion> questions; ReviewQaSessionLoaded({required this.session, required this.questions}); } class ReviewQaQuestionAdded extends ReviewQaState { final ReviewQuestion question; ReviewQaQuestionAdded(this.question); } class ReviewQaError extends ReviewQaState { final String message; ReviewQaError(this.message); } State classes need to be this specific so the UI can branch clearly with if (state is ReviewQaSessionLoaded). ...

2025-07-06 · 4 min read · Seunghan
Firebase Phone Auth Not Working Diagnosis

Flutter Firebase Phone Auth - SMS Not Arriving? From Diagnosis to Code Fix

After integrating phone number verification into a Flutter app, I faced the situation of “the verification code isn’t arriving.” And when pressing the dev bypass button to skip verification and attempt signup, the server returned “Phone number verification not completed.” Documenting both issues together. Understanding the Structure First The Flutter Firebase Phone Auth flow works like this: Flutter -> FirebaseAuth.verifyPhoneNumber() -> Firebase sends SMS directly | User enters the code | Flutter -> Verify code with Firebase -> Get ID Token | Flutter -> Send firebase_token to backend -> Server verifies token -> Creates PhoneVerification record | Flutter -> Signup request -> Server checks PhoneVerification -> Creates user The key point is that Firebase handles SMS delivery directly. It’s not a structure where Rails or another backend calls Twilio. ...

2025-07-02 · 4 min read · Seunghan
Privacy Policy Terms Disclaimer Contact