BUG REPORT — Al Quran (Tafsir & By Word)
Audio Manager Infinite Loading Spinner
App: Al Quran v0.5.11 (Build 4)
Platform: Linux (Fedora) — Flatpak (org.gtaf.quran)
Runtime: org.freedesktop.Platform 23.08
Severity: High — Audio Manager completely unusable
Reproducibility: 100%
Date: 7 April 2026
DESCRIPTION
Tapping "Audio Manager" in Settings shows a loading spinner that
never resolves. No error is shown to the user. Audio management
(downloading reciters, managing files) is completely inaccessible.
STEPS TO REPRODUCE
1. Open the app and navigate to Settings.
2. Scroll to Miscellaneous and tap Audio Manager.
3. Loading spinner appears and never completes.
ROOT CAUSE
Running via terminal (flatpak run org.gtaf.quran) reveals unhandled
exceptions. The server API now returns a field as String that
QariData.fromJson expects as int, causing a type mismatch. Since
there is no try-catch, the Future never completes and the UI hangs.
Primary error:
Unhandled Exception: type 'String' is not a subtype of type 'int'
of 'index'
#0 new QariData.fromJson
(package:quran_flutter/model/QariData.dart:10)
#1 RemoteRepository.getQariList
(package:quran_flutter/repository/RemoteRepository.dart:20)
#2 AudioProvider.downloadAndSaveQariJson
(package:quran_flutter/provider/AudioProvider.dart:1120)
#3 AudioProvider.getQariList
(package:quran_flutter/provider/AudioProvider.dart:1103)
#4 _AudioManagerPageState._loadQari
(package:quran_flutter/pages/AppDrawer/settings/
AudioManagerPage.dart:246)
This same error fires from three code paths:
- AudioProvider.loadData (line 303)
- DataProvider.loadDefaultQariJsonIfNotExist (line 441)
- _AudioManagerPageState._loadQari (line 246)
Secondary error (app update check, non-blocking):
Unhandled Exception: type '_Map<String, dynamic>' is not a subtype
of type 'String?'
#0 DataProvider.checkForAppUpdate
(package:quran_flutter/provider/DataProvider.dart:283)
SUGGESTED FIX
1. In QariData.fromJson (line 10), use tolerant parsing such as
int.tryParse(json['field'].toString()) to handle both int and
String values from the API.
2. Wrap Qari list loading in try-catch blocks so failures show an
error message rather than an infinite spinner.
3. Update DataProvider.checkForAppUpdate (line 283) to handle the
changed API response format (Map instead of String?).
4. Review all fromJson constructors for defensive type coercion.
ENVIRONMENT
Installation: Flatpak via GNOME Software
OS: Fedora Linux
Audio backend: mpv v0.37.0 via media_kit
Install date: 4 May 2025
NOTES
- The rest of the app works well; only audio features are affected.
- "media_kit: WARNING: package:media_kit_native_event_loop not found"
logged at startup but appears unrelated.
- Gdk-CRITICAL warning is a known Flutter/GTK issue, also unrelated.