Skip to content

fix(mobile): resolve simulator firebase crash and task repository pagination typecast - #134

Merged
Decuayer merged 1 commit into
mainfrom
bugfix/SDDC-80-fcm-init-and-task-pagination
Aug 30, 2026
Merged

fix(mobile): resolve simulator firebase crash and task repository pagination typecast#134
Decuayer merged 1 commit into
mainfrom
bugfix/SDDC-80-fcm-init-and-task-pagination

Conversation

@Decuayer

@Decuayer Decuayer commented Aug 30, 2026

Copy link
Copy Markdown
Owner

🎯 Jira / Task Reference

  • Jira Issue: SDDC-80
  • Component: mobile

📝 Summary of Changes

Fixes two critical runtime issues on mobile client startup:

  1. Firebase Initialization Crash: Resolved unhandled [core/no-app] No Firebase App '[DEFAULT]' has been created exception by adding safe initialization check (_resolveMessagingSafely) in FcmNotificationService for environments lacking iOS plist / development configurations.
  2. Task Repository Pagination Typecast: Resolved type '_Map<String, dynamic>' is not a subtype of type 'List<dynamic>' in type cast by adding _extractListFromData helper in TaskRepository to support both flat list and PagedResult { items: [...] } backend response contracts.

🏷️ Type of Change

  • 🚀 Feature: New functionality or operational workflow
  • 🐛 Bug Fix: Non-breaking fix for an identified defect
  • ♻️ Refactor: Code restructuring without behavior alteration
  • Performance: Speed, query, or memory consumption optimization
  • 🛠️ Chore / Infra: Dependencies, Docker, CI/CD, or tooling updates
  • 📖 Documentation: README, API specs, or code documentation updates
  • ⚠️ Breaking Change: Requires schema migration or API contract changes

🧪 Testing & Verification

Automated Tests

  • Mobile tests executed: flutter test (All 20 tests passed)
  • Linter & formatting passed: flutter analyze (No issues found)

Manual Test Steps

  1. Launch mobile app in iOS Simulator without Firebase configuration; verify app boots successfully to Onboarding/Login without white-screen crash.
  2. Log in with a Team account; verify Response Team Portal loads active tasks and history without typecast SnackBar errors.
  3. Log in with an Employee account; verify rapid emergency grid functions seamlessly.

📋 Pre-Merge Checklist

  • My code adheres to the project's Clean Architecture & style guidelines.
  • I have self-reviewed my own code before requesting review.
  • Database migrations are backwards-compatible (not applicable).
  • Sensitive secrets / tokens are NOT committed (verified .env exclusions).
  • Jira status updated to In Review.

…ecast

- Add safe fallback to FcmNotificationService when Firebase is not initialized
- Update TaskRepository to safely extract items from paginated PagedResult responses
- Prevent unhandled runtime exceptions during employee/team home initialization

Relates to SDDC-80
@Decuayer
Decuayer merged commit b47ce46 into main Aug 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant