Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tool_crash] locatedAotPath may be null if AOT snapshot is not located by SizeAnalyzer #73493

Open
chaitanya-bhagavan opened this issue Jan 7, 2021 · 3 comments
Labels
c: crash Stack traces logged to the console P2 Important issues not at the top of the work list team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels. triaged-tool Triaged by Flutter Tool team

Comments

@chaitanya-bhagavan
Copy link

Command

flutter build ios --flavor stage --analyze-size

Steps to Reproduce

  1. ...
  2. ...
  3. ...

Logs

NoSuchMethodError: NoSuchMethodError: The method 'join' was called on null.
Receiver: null
Tried calling: join("/")

#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1      SizeAnalyzer._printLibChildrenPaths (package:flutter_tools/src/base/analyze_size.dart:227:58)
#2      SizeAnalyzer._printLibChildrenPaths (package:flutter_tools/src/base/analyze_size.dart:220:9)
#3      SizeAnalyzer.analyzeAotSnapshot (package:flutter_tools/src/base/analyze_size.dart:70:9)
#4      BuildIOSCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:143:61)
#5      _rootRunUnary (dart:async/zone.dart:1198:47)
#6      _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#7      _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#8      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#9      Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#10     Future._completeWithValue (dart:async/future_impl.dart:529:5)
#11     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
#12     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
#13     buildXcodeProject (package:flutter_tools/src/ios/mac.dart)
#14     _rootRunUnary (dart:async/zone.dart:1198:47)
#15     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#16     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#17     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#18     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#19     Future._completeWithValue (dart:async/future_impl.dart:529:5)
#20     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
#21     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
#22     _DefaultProcessUtils.run (package:flutter_tools/src/base/process.dart)
#23     _rootRunUnary (dart:async/zone.dart:1198:47)
#24     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
[✓] Flutter (Channel stable, 1.22.5, on Mac OS X 10.15.7 19H114 darwin-x64, locale en-IN)
    • Flutter version 1.22.5 at /Users/cbhagavan/development/flutter
    • Framework revision 7891006299 (4 weeks ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/cbhagavan/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    ✗ Android SDK file not found: /Users/cbhagavan/Library/Android/sdk/platforms/android-30/android.jar.
    • Try re-installing or updating your Android SDK,
      visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions.

[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.8.4

[!] Android Studio
    • Android Studio at /Applications/Android Studio 4.2 Preview.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[!] IntelliJ IDEA Ultimate Edition (version 2020.2.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.dev/intellij-setup/#installing-the-plugins

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.18.0

[✓] Connected device (1 available)
    • iPhone 12 Pro Max (mobile) • 3D9BA846-CEE0-4912-AE46-AABCD05B3ECC • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)

! Doctor found issues in 4 categories.

Flutter Application Metadata

Type: null
Version: 1.0.0+1
Material: true
Android X: false
Module: false
Plugin: false
Android package: null
iOS bundle identifier: null
Creation channel: null
Creation framework version: null

Plugins

flutter-okta-sdk-1ac2fe351a551bdb12fef48c223bbc583e63527f
camera-0.5.8+17
flutter_secure_storage-3.3.5
flutter_sound-6.4.8+2
flutter_sound_web-6.4.8+2
flutter_uploader-2.0.0-beta.6
package_info-0.4.3+2
path_provider-1.6.24
path_provider_linux-0.0.1+2
path_provider_macos-0.0.4+6
path_provider_windows-0.0.4+3
permission_handler-5.0.1+1
shared_preferences-0.5.12+4
shared_preferences_linux-0.0.2+4
shared_preferences_macos-0.0.1+11
shared_preferences_web-0.1.2+7
shared_preferences_windows-0.0.1+3
speech_to_text-2.7.0
url_launcher-5.7.10
url_launcher_linux-0.0.1+4
url_launcher_macos-0.0.1+9
url_launcher_web-0.1.5+1
url_launcher_windows-0.0.1+3
video_compress-2.1.1
video_player-1.0.1
video_player_web-0.1.4+1

@jonahwilliams jonahwilliams added P2 Important issues not at the top of the work list c: crash Stack traces logged to the console tool Affects the "flutter" command-line tool. See also t: labels. labels Jan 7, 2021
@jonahwilliams jonahwilliams added this to Awaiting triage in Tools - Dart and pub review via automation Jan 7, 2021
@jonahwilliams jonahwilliams moved this from Awaiting triage to Engineer reviewed in Tools - Dart and pub review Jan 7, 2021
@jonahwilliams
Copy link
Member

@jonahwilliams
Copy link
Member

which means it might not have been found for some reason: https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/base/analyze_size.dart#L188

@jonahwilliams jonahwilliams changed the title [tool_crash] NoSuchMethodError: NoSuchMethodError: The method 'join' was called on null.Receiver: nullTried calling: join("/") [tool_crash] locatedAotPath may be null if AOT snapshot is not located by SizeAnalyzer Jan 7, 2021
@jonahwilliams
Copy link
Member

@chaitanya-bhagavan could you include a listing of the iOS build output folder? The tool is looking for a file with that contains App for the compiled AOT snapshot and failing to find it. For example:

jonahwilliams-macbookpro2% ls -R build/ios/iphoneos/Runner.app

AppFrameworkInfo.plist		AppIcon29x29.png		AppIcon40x40@2x.png		AppIcon60x60@3x.png		Base.lproj			_CodeSignature
AppIcon20x20@2x.png		AppIcon29x29@2x.png		AppIcon40x40@2x~ipad.png	AppIcon76x76@2x~ipad.png	Frameworks			embedded.mobileprovision
AppIcon20x20@2x~ipad.png	AppIcon29x29@2x~ipad.png	AppIcon40x40@3x.png		AppIcon76x76~ipad.png		Info.plist
AppIcon20x20@3x.png		AppIcon29x29@3x.png		AppIcon40x40~ipad.png		AppIcon83.5x83.5@2x~ipad.png	PkgInfo
AppIcon20x20~ipad.png		AppIcon29x29~ipad.png		AppIcon60x60@2x.png		Assets.car			Runner

build/ios/iphoneos/Runner.app/Base.lproj:
LaunchScreen.storyboardc	Main.storyboardc

build/ios/iphoneos/Runner.app/Base.lproj/LaunchScreen.storyboardc:
01J-lp-oVM-view-Ze5-6b-2t3.nib	Info.plist			UIViewController-01J-lp-oVM.nib

build/ios/iphoneos/Runner.app/Base.lproj/Main.storyboardc:
BYZ-38-t0r-view-8bC-Xf-vdC.nib	Info.plist			UIViewController-BYZ-38-t0r.nib

build/ios/iphoneos/Runner.app/Frameworks:
App.framework		Flutter.framework

build/ios/iphoneos/Runner.app/Frameworks/App.framework:
App		Info.plist	_CodeSignature	flutter_assets

build/ios/iphoneos/Runner.app/Frameworks/App.framework/_CodeSignature:
CodeResources

build/ios/iphoneos/Runner.app/Frameworks/App.framework/flutter_assets:
AssetManifest.json	FontManifest.json	NOTICES

build/ios/iphoneos/Runner.app/Frameworks/Flutter.framework:
Flutter		Info.plist	_CodeSignature	icudtl.dat

build/ios/iphoneos/Runner.app/Frameworks/Flutter.framework/_CodeSignature:
CodeResources

build/ios/iphoneos/Runner.app/_CodeSignature:
CodeResources

@flutter-triage-bot flutter-triage-bot bot added team-tool Owned by Flutter Tool team triaged-tool Triaged by Flutter Tool team labels Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: crash Stack traces logged to the console P2 Important issues not at the top of the work list team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels. triaged-tool Triaged by Flutter Tool team
Projects
Tools - Dart and pub review
  
Engineer reviewed
Development

No branches or pull requests

4 participants