Cannot run development project Ente Auth - Android --flavor independent

Hi, curious is here. I cannot run develop environment follow this document: https://github.com/ente-io/ente/tree/main/auth#%EF%B8%8F-develop I will provide step by step to reproduce Start to run in android - Get the source
git clone https://github.com/ente-io/ente.git
cd ente/auth
git clone https://github.com/ente-io/ente.git
cd ente/auth
flutter pub get
flutter run -t lib/main.dart --flavor independent -d emulator-5554
flutter pub get
flutter run -t lib/main.dart --flavor independent -d emulator-5554
Then it get error output
Error: Couldn't resolve the package 'flutter_gen' in 'package:flutter_gen/gen_l10n/app_localizations.dart'.
lib/ui/tools/app_lock.dart:6:8: Error: Not found: 'package:flutter_gen/gen_l10n/app_localizations.dart'
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
^
lib/l10n/l10n.dart:2:8: Error: Not found: 'package:flutter_gen/gen_l10n/app_localizations.dart'
import "package:flutter_gen/gen_l10n/app_localizations.dart";
^
lib/l10n/l10n.dart:4:1: Error: Not found: 'package:flutter_gen/gen_l10n/app_localizations.dart'
export "package:flutter_gen/gen_l10n/app_localizations.dart";
^
lib/l10n/l10n.dart:7:3: Error: Type 'AppLocalizations' not found.
AppLocalizations get l10n => AppLocalizations.of(this);
^^^^^^^^^^^^^^^^
lib/ui/account/logout_dialog.dart:66:44: Error: Type 'AppLocalizations' not found.
Future<void> _logout(BuildContext context, AppLocalizations l10n) async {
^^^^^^^^^^^^^^^^
...
Error: Couldn't resolve the package 'flutter_gen' in 'package:flutter_gen/gen_l10n/app_localizations.dart'.
lib/ui/tools/app_lock.dart:6:8: Error: Not found: 'package:flutter_gen/gen_l10n/app_localizations.dart'
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
^
lib/l10n/l10n.dart:2:8: Error: Not found: 'package:flutter_gen/gen_l10n/app_localizations.dart'
import "package:flutter_gen/gen_l10n/app_localizations.dart";
^
lib/l10n/l10n.dart:4:1: Error: Not found: 'package:flutter_gen/gen_l10n/app_localizations.dart'
export "package:flutter_gen/gen_l10n/app_localizations.dart";
^
lib/l10n/l10n.dart:7:3: Error: Type 'AppLocalizations' not found.
AppLocalizations get l10n => AppLocalizations.of(this);
^^^^^^^^^^^^^^^^
lib/ui/account/logout_dialog.dart:66:44: Error: Type 'AppLocalizations' not found.
Future<void> _logout(BuildContext context, AppLocalizations l10n) async {
^^^^^^^^^^^^^^^^
...
GitHub
ente/auth at main · ente-io/ente
✨ End-to-end encrypted cloud for photos, videos and 2FA secrets. - ente-io/ente
24 Replies
Ducky
Ducky5mo ago
The error about missing 'flutter_gen' and 'app_localizations.dart' occurs because the Flutter localization files have not been generated yet. To fix this, after cloning the repo and running flutter pub get, you need to generate the localization files by running:
flutter gen-l10n
flutter gen-l10n
This command generates the flutter_gen localization package including app_localizations.dart. Then you can run the app with:
flutter run -t lib/main.dart --flavor independent -d emulator-5554
flutter run -t lib/main.dart --flavor independent -d emulator-5554
If you want to connect to a self-hosted server during development, use the command with the endpoint dart-define as shown in the official guide:
flutter run --dart-define=endpoint=http://localhost:8080 --flavor independent --debug -t lib/main.dart
flutter run --dart-define=endpoint=http://localhost:8080 --flavor independent --debug -t lib/main.dart
For full instructions on building and running the Ente Auth Android app in development, see https://help.ente.io/self-hosting/guides/mobile-build#android and the README at https://github.com/ente-io/ente/tree/main/auth#%EF%B8%8F-develop In summary: 1. Clone repo and enter auth folder 2. Run flutter pub get 3. Run flutter gen-l10n to generate localization files 4. Run the flutter app with the appropriate flavor and dart-define flags This will resolve the missing flutter_gen package and localization import errors.
Building mobile apps | Ente Help
Connecting to your custom self-hosted server when building the Ente mobile apps from source
GitHub
ente/auth at main · ente-io/ente
✨ End-to-end encrypted cloud for photos, videos and 2FA secrets. - ente-io/ente
Ducky
Ducky5mo ago
<@&1364141260708909117> User still needs help in #Cannot run development project Ente Auth - Android --flavor independent
atyper
atyperOP5mo ago
after run
flutter gen-l10n
flutter gen-l10n
output are
Because l10n.yaml exists, the options defined there will be used instead.
To use the command line arguments, delete the l10n.yaml file in the Flutter project.


"be": 244 untranslated message(s).
"bg": 9 untranslated message(s).
"ca": 9 untranslated message(s).
"cs": 9 untranslated message(s).
"da": 38 untranslated message(s).
"el": 29 untranslated message(s).
"es": 6 untranslated message(s).
"et": 410 untranslated message(s).
"fa": 87 untranslated message(s).
"fi": 241 untranslated message(s).
"gu": 328 untranslated message(s).
"he": 144 untranslated message(s).
"hi": 304 untranslated message(s).
"hu": 4 untranslated message(s).
"id": 8 untranslated message(s).
"ja": 8 untranslated message(s).
"ka": 332 untranslated message(s).
"km": 323 untranslated message(s).
"ko": 16 untranslated message(s).
"lt": 1 untranslated message(s).
"lv": 348 untranslated message(s).
"ml": 383 untranslated message(s).
"or": 412 untranslated message(s).
"ro": 230 untranslated message(s).
"ru": 6 untranslated message(s).
"sk": 36 untranslated message(s).
"sl": 8 untranslated message(s).
"sv": 17 untranslated message(s).
"ta": 411 untranslated message(s).
"te": 412 untranslated message(s).
"th": 412 untranslated message(s).
"ti": 120 untranslated message(s).
"uk": 18 untranslated message(s).
"vi": 6 untranslated message(s).
"zh": 9 untranslated message(s).
To see a detailed report, use the untranslated-messages-file
option in the l10n.yaml file:
untranslated-messages-file: desiredFileName.txt
<other option>: <other selection>


This will generate a JSON format file containing all messages that
need to be translated.
Because l10n.yaml exists, the options defined there will be used instead.
To use the command line arguments, delete the l10n.yaml file in the Flutter project.


"be": 244 untranslated message(s).
"bg": 9 untranslated message(s).
"ca": 9 untranslated message(s).
"cs": 9 untranslated message(s).
"da": 38 untranslated message(s).
"el": 29 untranslated message(s).
"es": 6 untranslated message(s).
"et": 410 untranslated message(s).
"fa": 87 untranslated message(s).
"fi": 241 untranslated message(s).
"gu": 328 untranslated message(s).
"he": 144 untranslated message(s).
"hi": 304 untranslated message(s).
"hu": 4 untranslated message(s).
"id": 8 untranslated message(s).
"ja": 8 untranslated message(s).
"ka": 332 untranslated message(s).
"km": 323 untranslated message(s).
"ko": 16 untranslated message(s).
"lt": 1 untranslated message(s).
"lv": 348 untranslated message(s).
"ml": 383 untranslated message(s).
"or": 412 untranslated message(s).
"ro": 230 untranslated message(s).
"ru": 6 untranslated message(s).
"sk": 36 untranslated message(s).
"sl": 8 untranslated message(s).
"sv": 17 untranslated message(s).
"ta": 411 untranslated message(s).
"te": 412 untranslated message(s).
"th": 412 untranslated message(s).
"ti": 120 untranslated message(s).
"uk": 18 untranslated message(s).
"vi": 6 untranslated message(s).
"zh": 9 untranslated message(s).
To see a detailed report, use the untranslated-messages-file
option in the l10n.yaml file:
untranslated-messages-file: desiredFileName.txt
<other option>: <other selection>


This will generate a JSON format file containing all messages that
need to be translated.
Then re-run
flutter run -t lib/main.dart --flavor independent -d emulator-5554
flutter run -t lib/main.dart --flavor independent -d emulator-5554
Or even
flutter run --dart-define=endpoint=http://localhost:8080 --flavor independent --debug -t lib/main.dart
flutter run --dart-define=endpoint=http://localhost:8080 --flavor independent --debug -t lib/main.dart
Still get output error the same above.
vishnu
vishnu5mo ago
@Prateek would you know what's up?
Prateek
Prateek5mo ago
The problem is with localization generation, you can try this: https://github.com/orgs/community/discussions/57903#discussioncomment-6159386
GitHub
Target of URI doesn't exist: 'package:flutter_gen/genl10n/gallery...
Select Topic Area Question Body I am now using flutter gallary in my project, this is the package reference: import &#39;package:flutter_gen/gen_l10n/gallery_localizations.dart&#39;; but it shows: ...
atyper
atyperOP5mo ago
Thanks a lot, let me try.
Ducky
Ducky5mo ago
-# If your issue is resolved, you can use the Mark as Solved button or type /solved to close the thread.
atyper
atyperOP5mo ago
I cannot see the folder "flutter_gen" as in github disscussion described. I try multiples way and retry or cleaned the local source already.
atyper
atyperOP5mo ago
Is that this file generated?
Untracked files:
(use "git add <file>..." to include in what will be committed)
ios/Flutter/ephemeral/
-> lib/l10n/arb/app_localizations.dart
Untracked files:
(use "git add <file>..." to include in what will be committed)
ios/Flutter/ephemeral/
-> lib/l10n/arb/app_localizations.dart
Not that file. I also change the import in every single error file to "lib/l10n/arb/app_localizations.dart" > it still remains the error
../../../../.pub-cache/hosted/pub.dev/figma_squircle-0.5.3/lib/src/smooth_rectangle_border.dart:189:23: Error: The method 'hashValues' isn't defined for the class 'SmoothRectangleBorder'.
- 'SmoothRectangleBorder' is from 'package:figma_squircle/src/smooth_rectangle_border.dart' ('../../../../.pub-cache/hosted/pub.dev/figma_squircle-0.5.3/lib/src/smooth_rectangle_border.dart').
Try correcting the name to the name of an existing method, or defining a method named 'hashValues'.
int get hashCode => hashValues(side, borderRadius, borderAlign);
^^^^^^^^^^
../../../../.pub-cache/hosted/pub.dev/figma_squircle-0.5.3/lib/src/smooth_rectangle_border.dart:189:23: Error: The method 'hashValues' isn't defined for the class 'SmoothRectangleBorder'.
- 'SmoothRectangleBorder' is from 'package:figma_squircle/src/smooth_rectangle_border.dart' ('../../../../.pub-cache/hosted/pub.dev/figma_squircle-0.5.3/lib/src/smooth_rectangle_border.dart').
Try correcting the name to the name of an existing method, or defining a method named 'hashValues'.
int get hashCode => hashValues(side, borderRadius, borderAlign);
^^^^^^^^^^
Or even 2nd error disappear > the localization error takes too much code change to run Sorry, I cannot run in debug mode Android. Can you reproduced my issue @Prateek ? As I described step by step and It cannot be run in 01 hit document.
atyper
atyperOP5mo ago
This is another reproduce step, I only use terminal. https://asciinema.org/a/3igloRZWhRw0pbS4kCzCex0bN
asciinema.org
untitled
Recorded by neich
Prateek
Prateek5mo ago
I will check tomorrow
Neeraj
Neeraj5mo ago
Are you using the correct flutter version (as specified in the read me)?
atyper
atyperOP5mo ago
Sorry sir I cannot see flutter version require in these READMEs 1. https://github.com/ente-io/ente/blob/main/auth/README.md 2. https://github.com/ente-io/ente/blob/main/README.md 3. https://github.com/orgs/community/discussions/57903 --- As I research the source code I assume we using version 3.24.3 - From this file: https://github.com/ente-io/ente/blob/main/.github/workflows/auth-release.yml - And this commit message: https://github.com/ente-io/ente/commit/a65493192f26a333723682684ecf5cdeee38c5cb And yes, I tried once before, the errors remain the same.
atyper
atyperOP5mo ago
I think my environment got troubles so I want to copy your environment or the instruction should be more clear or at least some of dev members can reproduce my scratch way to run this. By the way, I will try learning to use FVM as the commit message said in: https://github.com/ente-io/ente/commit/a65493192f26a333723682684ecf5cdeee38c5cb I suspect that ente-auth dev members using FVM and run normally. Let see If I can be them... or not.
GitHub
[auth] specify flutter version (#5636) · ente-io/ente@a654931
Description Allows to explicitly set the flutter version you want to use, by utilizing fvm. dart pub global activate fvm fvm install 3.24.3 fvm use 3.24.3 fvm flutter ...
Prateek
Prateek5mo ago
I ran into the same issue on Ente Photos folder but it is happening when I user flutter 3.32 and not older version like 3.27, are you sure you are not using the latest stable flutter i.e. 3.32?
atyper
atyperOP5mo ago
Hi, I am back. I run development successfully by using
fvm flutter use 3.24.3 independent
fvm flutter use 3.24.3 independent
Thanks for your help I am not sure about the scenerio in the past that I use flutter v3.24.3 native terminal then the issue still remain. By the way 1. Should we update document for this? 2. Are there any roadmaps for latest flutter version or Root cause?
Ducky
Ducky5mo ago
📊 Ducky's Performance Report
Real-time stats below:
🤖 Bot Uptime
3 days, 17:15:16
📡 Ping
43ms
🖥️ Server Uptime
3717 days, 6:35:00
💾 Resources
RAM: 81.15MB CPU: 0.91% Disk: 0.57GB
📶 Network
↓ 713372.29KB / ↑ 42022.2KB
Thanks for checking on me! quack quack
Ducky
Ducky5mo ago
Thread marked as solved. It will be closed in <t:1750396991:R>.
atyper
atyperOP5mo ago
@Ducky /unsolve
Ducky
Ducky5mo ago
Quack :lilducky: This thread is now closed.
Prateek
Prateek5mo ago
We'll upgrade flutter next month if everything works out. Fvm configuration is wrong that's why you are facing this when using terminal, it is not something we can solve by documenting.
Ducky
Ducky5mo ago
Thread has been reopened and unmarked as solved.
Brogio
Brogio5mo ago
Did you want this to be unsolved?
Ducky
Ducky5mo ago
Thread marked as solved. It will be closed in <t:1750588382:R>. This thread is now closed.

Did you find this page helpful?