Skip to content

New app fails to build for iOS before Android is built #6686

Closed

Description

@collinjackson

Steps to Reproduce

Launch iPhone 6s Plus simulator.

flutter create myproject
cd myproject
flutter run -d "iPhone 6s Plus"

I get the following error.

Exception from flutter run: FileSystemException: Cannot open file, path = 'build/snapshot_blob.bin' (OS Error: No such file or directory, errno = 2)

It works fine once I run it on an Android app.

Logs

Exception from flutter run: FileSystemException: Cannot open file, path = 'build/snapshot_blob.bin' (OS Error: No such file or directory, errno = 2)
dart:io                                             _File.readAsBytesSync
package:flutter_tools/src/asset.dart 36             AssetBundleEntry.contentsAsBytes
package:flutter_tools/src/zip.dart 68               _ZipToolBuilder.createZip
package:flutter_tools/src/flx.dart 165              assemble.<async>
dart:async                                          _SyncCompleter.complete
package:flutter_tools/src/asset.dart 145            AssetBundle.build.<async>
dart:async                                          _SyncCompleter.complete
package:flutter_tools/src/asset.dart 291            _obtainLicenses.<async>
===== asynchronous gap ===========================
dart:async                                          _Completer.completeError
package:flutter_tools/src/flx.dart 171              assemble.<async>
dart:async                                          _SyncCompleter.complete
package:flutter_tools/src/asset.dart 145            AssetBundle.build.<async>
dart:async                                          _SyncCompleter.complete
package:flutter_tools/src/asset.dart 291            _obtainLicenses.<async>
===== asynchronous gap ===========================
dart:async                                          _asyncThenWrapperHelper
package:flutter_tools/src/flx.dart                  assemble
package:flutter_tools/src/flx.dart 114              build.<async>
===== asynchronous gap ===========================
dart:async                                          Future.Future.microtask
package:flutter_tools/src/flx.dart                  build
package:flutter_tools/src/ios/simulators.dart 536   IOSSimulator._sideloadUpdatedAssetsForInstalledApplicationBundle.<async>
===== asynchronous gap ===========================
dart:async                                          Future.Future.microtask
package:flutter_tools/src/ios/simulators.dart       IOSSimulator._sideloadUpdatedAssetsForInstalledApplicationBundle
package:flutter_tools/src/ios/simulators.dart 500   IOSSimulator._setupUpdatedApplicationBundle.<async>
===== asynchronous gap ===========================
dart:async                                          Future.Future.microtask
package:flutter_tools/src/ios/simulators.dart       IOSSimulator._setupUpdatedApplicationBundle
package:flutter_tools/src/ios/simulators.dart 424   IOSSimulator.startApp.<async>
===== asynchronous gap ===========================
dart:async                                          Future.Future.microtask
package:flutter_tools/src/ios/simulators.dart       IOSSimulator.startApp
package:flutter_tools/src/hot.dart 243              HotRunner._run.<async>
dart:async                                          _SyncCompleter.complete
package:flutter_tools/src/resident_runner.dart 101  ResidentRunner.startEchoingDeviceLog.<async>
===== asynchronous gap ===========================
dart:async                                          _asyncThenWrapperHelper
package:flutter_tools/src/hot.dart                  HotRunner._run
package:flutter_tools/src/hot.dart 147              HotRunner.run.<fn>
package:stack_trace                                 Chain.capture
package:flutter_tools/src/hot.dart 146              HotRunner.run
package:flutter_tools/src/commands/run.dart 236     RunCommand.runCommand.<async>

Flutter Doctor

[✓] Flutter (on Mac OS, channel master)
• Flutter at /Users/jackson/git/flutter
• Framework revision d86900d (45 minutes ago), 2016-11-03 13:17:35
• Engine revision 16077d4
• Tools Dart version 1.21.0-dev.3.0

[✓] Android toolchain - develop for Android devices (Android SDK 23.0.3)
• Android SDK at /Users/jackson/Library/Android/sdk
• Platform android-N, build-tools 23.0.3
• ANDROID_HOME = /Users/jackson/Library/Android/
• Java(TM) SE Runtime Environment (build 1.8.0_91-b14)

[-] iOS toolchain - develop for iOS devices (Xcode 7.3.1)
• XCode at /Applications/Xcode.app/Contents/Developer
• Xcode 7.3.1, Build version 7D1014
x libimobiledevice is incompatible with the installed XCode version. To update, run:
brew uninstall libimobiledevice
brew install --HEAD libimobiledevice

[✓] IntelliJ IDEA Community Edition (version 2016.2.5)
• Dart plugin installed
• Flutter plugin installed

[✓] Connected devices
• • 14710ae2e8497590643751c5532d907ed1ff2eed • ios • iOS ()
• iPhone 6s Plus • A524B495-C7BF-45A4-834D-1CA9926ED076 • ios • iOS 9.3 (simulator)

Activity

  1. added
    platform-iosiOS applications specifically
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Nov 3, 2016
  2. eseidelGoogle commented on Nov 3, 2016

    @eseidelGoogle
    Contributor

    This must be a recent regression. I often build only for iOS. Could this be related to the Dart AOT changes last week? @chinmaygarde @rmacnak-google?

  3. collinjackson commented on Nov 3, 2016

    @collinjackson
    ContributorAuthor

    Using git-bisect, it was introduced in 93a2d07 @petrhosek

  4. added this to the 0: Today milestone on Nov 4, 2016
  5. eseidelGoogle commented on Nov 4, 2016

    @eseidelGoogle
    Contributor

    We should either resolve this or roll out @petrhosek's change ASAP.

  6. chinmaygarde commented on Nov 4, 2016

    @chinmaygarde
    Contributor

    @jason-simmons fixed this already in #6684. Should have been closed earlier.

  7. github-actions commented on Sep 5, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  8. locked as resolved and limited conversation to collaborators on Sep 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: regressionIt was better in the past than it is nowdependency: dartDart team may need to help usplatform-iosiOS applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions