fluttercommunity / fluttercommunity/flutter_launcher_icons

[BUG] NoConfigFoundException

Open
#482 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
2.1k
Forks
426
PR merge metrics
No merged PRs in 30d

Description

Unhandled exception:

✗ ERROR: NoConfigFoundException
No configuration found in flutter_launcher_icons.yaml or in pubspec.yaml. In case file exists in different directory use --file option
#0 createIconsFromArguments (package:flutter_launcher_icons/main.dart:82:7)
#1 main (file:///Users/kevinhhliu/.pub-cache/hosted/pub.flutter-io.cn/flutter_launcher_icons-0.11.0/bin/flutter_launcher_icons.dart:7:26)
#2 main (file:///Users/kevinhhliu/.pub-cache/hosted/pub.flutter-io.cn/flutter_launcher_icons-0.11.0/bin/main.dart:7:26)
#3 _delayEntrypointInvocation. (dart:isolate-patch/isolate_patch.dart:295:32)
#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)

use the 0.11.0 version
i found that use
flutter_icons:
xxx
works!

this is because i view the source code 'flutter_launcher_icons_config.dart':
/// Loads flutter launcher icons config from `pubspec.yaml` file
static FlutterLauncherIconsConfig? loadConfigFromPubSpec(String prefix) {
try {
final pubspecFile = File(path.join(prefix, constants.pubspecFilePath));
if (!pubspecFile.existsSync()) {
return null;
}
final pubspecContent = pubspecFile.readAsStringSync();
return yaml.checkedYamlDecode(
pubspecContent,
(json) {
// todo: add support for new scheme https://github.com/fluttercommunity/flutter_launcher_icons/issues/373
return json == null || json['**flutter_icons**'] == null
? null
: FlutterLauncherIconsConfig.fromJson(json['**flutter_icons**']);
},
allowNull: true,
);
} on yaml.ParsedYamlException catch (e) {
throw InvalidConfigException(e.formattedMessage);
} catch (e) {
rethrow;
}
}
}

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in flutter_launcher_icons_config.dart at loadConfigFromPubSpec and then inspect createIconsFromArguments in package:flutter_launcher_icons/main.dart around line 82. Reproduce the NoConfigFoundException with the 0.11.0 configuration shown in the issue and compare the supported configuration keys. Done means the reported configuration is recognized without the exception and icon generation proceeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile-dev, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.