You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I'm encountering errors when running retrofit_generator in my Flutter project. The build process fails with the following severe errors related to the generated iOS plugin files:
Error Logs
Builtbuild_runner:build_runner.
[INFO] Generating build script completed, took 939ms
[INFO] Precompiling build script... completed, took 9.4s
[INFO] Buildingnew asset graph completed, took 3.5s
[INFO] Checkingfor unexpected pre-existing outputs. completed, took 3.4s
[INFO] GeneratingSDK summary completed, took 12.7s
[SEVERE] retrofit_generator on example/ios/.symlinks/plugins/url_launcher_ios/pigeons/messages.dart:
line 1, column 959 of asset:package_name/example/ios/.symlinks/plugins/url_launcher_ios/pigeons/messages.dart: Could not resolve annotation for `abstractclassUrlLauncherApi`.
╷
1 │ @HostApi()
│ ^^^^^^^^^^
╵
[SEVERE] retrofit_generator on example/ios/.symlinks/plugins/webview_flutter_wkwebview/pigeons/web_kit.dart:
line 1, column 9999 of asset:package_name/example/ios/.symlinks/plugins/webview_flutter_wkwebview/pigeons/web_kit.dart: Could not resolve annotation for `abstractclassURLRequestextendsNSObject`.
╷
1 │ @ProxyApi(swiftOptions: SwiftProxyApiOptions(name: 'URLRequestWrapper'))
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
[SEVERE] retrofit_generator on example/ios/.symlinks/plugins/shared_preferences_foundation/pigeons/messages.dart:
line 1, column 204 of asset:package_name/example/ios/.symlinks/plugins/shared_preferences_foundation/pigeons/messages.dart: Could not resolve annotation for `abstract class LegacyUserDefaultsApi`.
╷
1 │ ┌ @ConfigurePigeon(PigeonOptions(
2 │ │ dartOut: 'lib/src/messages.g.dart',
3 │ │ dartTestOut: 'test/test_api.g.dart',
4 │ │ swiftOut:
5 │ │ 'darwin/shared_preferences_foundation/Sources/shared_preferences_foundation/messages.g.swift',
6 │ │ copyrightHeader: 'pigeons/copyright_header.txt',
7 │ └ ))
╵
[SEVERE] retrofit_generator on example/ios/.symlinks/plugins/package_info_plus/example/integration_test/package_info_plus_web_test.dart:
line 1, column 548 of asset:package_name/example/ios/.symlinks/plugins/package_info_plus/example/integration_test/package_info_plus_web_test.dart: Could not resolve annotation for `void main()`.
╷
1 │ @GenerateMocks([http.Client, ui_web.AssetManager])
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
[SEVERE] retrofit_generator on example/ios/.symlinks/plugins/url_launcher_ios/test/url_launcher_ios_test.dart:
line 1, column 703 of asset:package_name/example/ios/.symlinks/plugins/url_launcher_ios/test/url_launcher_ios_test.dart: Could not resolve annotation for `void main()`.
╷
1 │ @GenerateMocks(<Type>[UrlLauncherApi])
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
[SEVERE] retrofit_generator on example/ios/.symlinks/plugins/connectivity_plus/test/connectivity_plus_linux_test.dart:
line 1, column 379 of asset:package_name/example/ios/.symlinks/plugins/connectivity_plus/test/connectivity_plus_linux_test.dart: Could not resolve annotation for `void main()`.
╷
1 │ @GenerateMocks([NetworkManagerClient])
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
[SEVERE] retrofit_generator on example/ios/.symlinks/plugins/webview_flutter_wkwebview/test/legacy/web_kit_cookie_manager_test.dart:
line 1, column 673 of asset:package_name/example/ios/.symlinks/plugins/webview_flutter_wkwebview/test/legacy/web_kit_cookie_manager_test.dart: Could not resolve annotation for `void main()`.
╷
1 │ ┌ @GenerateMocks(<Type>[
2 │ │ WKHTTPCookieStore,
3 │ │ WKWebsiteDataStore,
4 │ └ ])
╵
[SEVERE] retrofit_generator on example/ios/.symlinks/plugins/webview_flutter_wkwebview/test/legacy/web_kit_webview_widget_test.dart:
To Reproduce
Run flutter pub get
Execute dart pub run build_runner build --delete-conflicting-outputs
The errors appear during code generation
Expected behavior
The code generation should complete successfully without annotation resolution errors.
Environment
[✓] Flutter (Channel stable, 3.29.0, on macOS 12.7.6 21H1320 darwin-x64, locale en-GB)
[✓] Android toolchain - develop forAndroid devices (AndroidSDK version 35.0.0-rc3)
[!] Xcode- develop for iOS and macOS (Xcode14.2)
!Flutter recommends a minimum Xcode version of 15.
Download the latest version or update via the MacAppStore.
!CocoaPods1.12.1 out of date (1.16.2 is recommended).
CocoaPods is a package manager for iOS or macOS platform code.
WithoutCocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/to/platform-pluginsTo update CocoaPods, see https://guides.cocoapods.org/using/getting-started.html#updating-cocoapods
[✓] Chrome- develop for the web
[✓] AndroidStudio (version 2023.2)
[✓] AndroidStudio (version 2024.2)
[✓] AndroidStudio (version 2024.1)
[✓] IntelliJIDEAUltimateEdition (version 2023.2.2)
[✓] VSCode (version 1.96.4)
[✓] Connected device (4 available)
[✓] Network resources
Additional context
This issue prevents me from building the iOS app.
Sometimes, similar annotation resolution errors appear on Linux and Windows as well.
Deleting .symlinks, running flutter clean, and regenerating the build files didn't resolve the issue.
The issue seems to be related to Pigeon annotations in generated files, possibly affecting retrofit_generator or how the Flutter plugins interact.
I have tried upgrading/downgrading dependencies, but the issue persists.
I am using retrofit_generator: ^9.1.9 and build_runner: ^2.4.15
The text was updated successfully, but these errors were encountered:
Description
I'm encountering errors when running
retrofit_generator
in my Flutter project. The build process fails with the following severe errors related to the generated iOS plugin files:Error Logs
To Reproduce
flutter pub get
dart pub run build_runner build --delete-conflicting-outputs
Expected behavior
The code generation should complete successfully without annotation resolution errors.
Environment
Additional context
.symlinks
, runningflutter clean
, and regenerating the build files didn't resolve the issue.retrofit_generator
or how the Flutter plugins interact.retrofit_generator: ^9.1.9
andbuild_runner: ^2.4.15
The text was updated successfully, but these errors were encountered: