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

iOS build & flutter test fails on Flutter 3.0 #103614

Closed
raulmabe opened this issue May 12, 2022 · 11 comments
Closed

iOS build & flutter test fails on Flutter 3.0 #103614

raulmabe opened this issue May 12, 2022 · 11 comments
Labels
r: solved Issue is closed as solved

Comments

@raulmabe
Copy link

raulmabe commented May 12, 2022

Related

Steps to Reproduce

  1. flutter upgrade to 3.0
  2. flutter run

Logs

Logs
    Unhandled exception:
FileSystemException(uri=org-dartlang-untranslatable-uri:package%3Aflutter_gen%2Fgen_l10n%2Fapp_localizations.dart; message=StandardFileSystem only supports file:* and data:* URIs)
#0      StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:34:7)
#1      asFileUri (package:vm/kernel_front_end.dart:652:37)
#2      writeDepfile (package:vm/kernel_front_end.dart:792:21)
    <asynchronous suspension>
#3      FrontendCompiler.compile (file:///opt/s/w/ir/cache/builder/sdk/pkg/frontend_server/lib/frontend_server.dart:615:9)
    <asynchronous suspension>
#4      starter (file:///opt/s/w/ir/cache/builder/sdk/pkg/frontend_server/lib/frontend_server.dart:1433:12)
    <asynchronous suspension>
#5      main (file:///opt/s/w/ir/cache/builder/sdk/pkg/frontend_server/bin/frontend_server_starter.dart:10:14)
    <asynchronous suspension>
    Failed to package /Users/raulmateobeneyto/Documents/diven_app.
    Command PhaseScriptExecution failed with a nonzero exit code
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in parallel
    /Users/raulmateobeneyto/Documents/diven_app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'Reachability' from project 'Pods')
    /Users/raulmateobeneyto/Documents/diven_app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'MTBBarcodeScanner' from project 'Pods')
    /Users/raulmateobeneyto/Documents/diven_app/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.0.99. (in target 'FMDB' from project 'Pods')
    Result bundle written to path:
    	/var/folders/rf/47hfjrbd72x18xk6z1wj2xm40000gn/T/flutter_tools.xiMeet/flutter_ios_build_temp_dirPPyyov/temporary_xcresult_bundle
Could not build the application for the simulator.
Error launching application on iPhone 13 Pro.
Exited
[✓] Flutter (Channel stable, 3.0.0, on macOS 11.6 20G165 darwin-x64, locale es-ES)
    • Flutter version 3.0.0 at /Users/raulmateobeneyto/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ee4e09cce0 (3 days ago), 2022-05-09 16:45:18 -0700
    • Engine revision d1b9a6938a
    • Dart version 2.17.0
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/raulmateobeneyto/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)

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

[✓] Connected device (3 available)
    • iPhone 13 Pro (mobile) • D32273CD-17B7-4F4D-AA28-AF043DEB3851 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-15-0 (simulator)
    • macOS (desktop)        • macos                                • darwin-x64     • macOS 11.6 20G165 darwin-x64
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 101.0.4951.54

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Output file running flutter run --verbose: output.txt

Steps to Reproduce

  1. flutter upgrade to 3.0
  2. flutter test

Logs

Logs

The following log is output for every run test.

Failed to load "/Users/raulmateobeneyto/Documents/diven_app/test/order/cubit/exp_order_state_test.dart": Compilation failed for testPath=/Users/raulmateobeneyto/Documents/diven_app/test/order/cubit/exp_order_state_test.dart

✖ loading /Users/raulmateobeneyto/Documents/diven_app/test/order/cubit/exp_order_state_test.dart
Exception: the Dart compiler exited unexpectedly.
package:flutter_tools/src/base/common.dart 10:3  throwToolExit
package:flutter_tools/src/compile.dart 815:9     DefaultResidentCompiler._compile.<fn>
dart:async/zone.dart 1434:47                     _rootRunUnary
dart:async/zone.dart 1335:19                     _CustomZone.runUnary
[✓] Flutter (Channel stable, 3.0.0, on macOS 11.6 20G165 darwin-x64, locale es-ES)
    • Flutter version 3.0.0 at /Users/raulmateobeneyto/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ee4e09cce0 (3 days ago), 2022-05-09 16:45:18 -0700
    • Engine revision d1b9a6938a
    • Dart version 2.17.0
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/raulmateobeneyto/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)

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

[✓] Connected device (3 available)
    • iPhone 13 Pro (mobile) • D32273CD-17B7-4F4D-AA28-AF043DEB3851 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-15-0 (simulator)
    • macOS (desktop)        • macos                                • darwin-x64     • macOS 11.6 20G165 darwin-x64
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 101.0.4951.54

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

What have I tried

  • Running dart pub cache clean
  • Running flutter clean && flutter pub get
  • Manually deleting .pub-cache folder
  • Restarting computer
@khang-dev
Copy link

Same for me

@darshankawar darshankawar added the in triage Presently being triaged by the triage team label May 13, 2022
@darshankawar
Copy link
Member

@raulmabe
For

Warning: Operand of null-aware operation '!' has type 'SchedulerBinding' which excludes null.
../…/components/input_component.dart:43
- 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('../../development/flutter/packages/flutter/lib/src/scheduler/binding.dart').
package:flutter/…/scheduler/binding.dart:1
    SchedulerBinding.instance!.addPostFrameCallback((timeStamp) {

Please follow-up in the linked issue you mentioned above.

For

Unhandled exception:
FileSystemException(uri=org-dartlang-untranslatable

Can you provide complete verbose log ? Do you get same error if you create new project and try to build it ?
If not, can you provide minimal code sample ?

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 13, 2022
@raulmabe
Copy link
Author

Can you provide complete verbose log ?

There is an output.txt file attached with the verbose log above

Do you get same error if you create new project and try to build it ?
If not, can you provide minimal code sample ?

I will try to share more information as soon as I can, but I got no time today...

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 13, 2022
@darshankawar
Copy link
Member

check this link for various solutions on warnings you are getting.

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 13, 2022
@raulmabe
Copy link
Author

check this link for various solutions on warnings you are getting.

It's due to dependencies, so I'll ignore the warnings. I have cleaned my issue from everything warning related so it's more clear what the actual focus is. (Build and tests failing to execute)

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 13, 2022
@Hixie
Copy link
Contributor

Hixie commented May 13, 2022

Looking at the logs, the errors I see are all variants of:

[ +714 ms] ../../.pub-cache/git/modal_bottom_sheet-d350f4b66fcb11c3178fc69f09005de16f9ef7d7/lib/src/bottom_sheet.dart:303:28: Error: Couldn't find constructor 'VelocityTracker'.
[        ]         _velocityTracker = VelocityTracker();
[        ]                            ^^^^^^^^^^^^^^^

...which suggests modal_bottom_sheet is not compatible with Flutter 3 yet. That said, I don't understand why that would have broken, VelocityTracker is still there...

@Hixie
Copy link
Contributor

Hixie commented May 13, 2022

The non-verbose log you include above makes that really unclear, I wonder what's up with that, wow...

cc @christopherfujino

@christopherfujino
Copy link
Member

christopherfujino commented May 14, 2022

Looking at the logs, the errors I see are all variants of:

[ +714 ms] ../../.pub-cache/git/modal_bottom_sheet-d350f4b66fcb11c3178fc69f09005de16f9ef7d7/lib/src/bottom_sheet.dart:303:28: Error: Couldn't find constructor 'VelocityTracker'.
[        ]         _velocityTracker = VelocityTracker();
[        ]                            ^^^^^^^^^^^^^^^

...which suggests modal_bottom_sheet is not compatible with Flutter 3 yet. That said, I don't understand why that would have broken, VelocityTracker is still there...

@raulmabe

Several strange things about this:

  1. While the VelocityTracker class is still there on Flutter 3.0, there isn't a default constructor of that name: https://github.com/flutter/flutter/blob/3.0.0/packages/flutter/lib/src/gestures/velocity_tracker.dart#L146. It was deprecated in Remove deprecated VelocityTracker constructor #98541
  2. When I look at (what I assume to be the upstream repo) for package:modal_bottom_sheet, it does not have the commit referenced above: https://github.com/jamesblasco/modal_bottom_sheet/blob/d350f4b66fcb11c3178fc69f09005de16f9ef7d7/lib/src/bottom_sheet.dart. I also notice the file path suggests that this is a git dependency, rather than a pub one. Are you by any chance maintaining your own fork of modal_bottom_sheet? If so, you will need to migrate it per the deprecation in Remove deprecated VelocityTracker constructor #98541. Note the upstream package already has the new replacement constructor: https://github.com/jamesblasco/modal_bottom_sheet/blob/master/lib/src/bottom_sheet.dart#L295

@christopherfujino christopherfujino added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 14, 2022
@raulmabe
Copy link
Author

raulmabe commented May 14, 2022

@christopherfujino You are right, I am using a git forked version of the package. I will update my dependency with the fix and check if it builds now. Thank you!

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 14, 2022
@raulmabe
Copy link
Author

raulmabe commented May 14, 2022

It works, thank you very much for the help @Hixie @christopherfujino, I'll close the issue although I think this is another issue:

The non-verbose log you include above makes that really unclear, I wonder what's up with that, wow...

@darshankawar darshankawar added r: solved Issue is closed as solved and removed in triage Presently being triaged by the triage team labels May 16, 2022
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
r: solved Issue is closed as solved
Projects
None yet
Development

No branches or pull requests

5 participants