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

VersionCheckError during `flutter upgrade` on macOS 10.15 beta (Catalina) #33890

Closed
timsneath opened this issue Jun 5, 2019 · 22 comments · Fixed by #38325

Comments

@timsneath
Copy link
Member

commented Jun 5, 2019

Flutter is not currently supported on macOS 10.15, but adding this issue for awareness.

Flutter crash report; please file at https://github.com/flutter/flutter/issues.

command

flutter upgrade

exception

VersionCheckError: VersionCheckError: Command exited with code -9: git log -n 1 --pretty=format:%ad --date=iso
Standard error:

#0      _runSync (package:flutter_tools/src/version.dart:521:5)
#1      FlutterVersion._latestGitCommitDate (package:flutter_tools/src/version.dart:141:12)
#2      FlutterVersion.frameworkCommitDate (package:flutter_tools/src/version.dart:132:37)
#3      FlutterVersion.toString (package:flutter_tools/src/version.dart:109:99)
#4      UpgradeCommandRunner.updatePackages (package:flutter_tools/src/commands/upgrade.dart:190:32)
<asynchronous suspension>
#5      UpgradeCommandRunner.runCommand (package:flutter_tools/src/commands/upgrade.dart:90:11)
<asynchronous suspension>
#6      UpgradeCommand.runCommand (package:flutter_tools/src/commands/upgrade.dart:47:32)
<asynchronous suspension>
#7      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:488:18)
#8      _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:77:64)
#9      _rootRunUnary (dart:async/zone.dart:1132:38)
#10     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#11     _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#12     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#13     Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#14     Future._complete (dart:async/future_impl.dart:473:7)
#15     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#16     _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async-patch/async_patch.dart:33:20)
#17     _rootRun (dart:async/zone.dart:1124:13)
#18     _CustomZone.run (dart:async/zone.dart:1021:19)
#19     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#20     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#21     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#22     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:115:13)
#23     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:5)

flutter doctor

encountered exception: VersionCheckError: Command exited with code -9: git log -n 1 --pretty=format:%ad --date=iso
Standard error: 

#0      _runSync (package:flutter_tools/src/version.dart:521:5)
#1      FlutterVersion._latestGitCommitDate (package:flutter_tools/src/version.dart:141:12)
#2      FlutterVersion.frameworkCommitDate (package:flutter_tools/src/version.dart:132:37)
#3      FlutterVersion.frameworkDate (package:flutter_tools/src/version.dart:94:31)
#4      FlutterValidator.validate (package:flutter_tools/src/doctor.dart:468:127)
<asynchronous suspension>
#5      Doctor.startValidatorTasks (package:flutter_tools/src/doctor.dart:134:52)
#6      Doctor.diagnose (package:flutter_tools/src/doctor.dart:205:41)
<asynchronous suspension>
#7      _doctorText.<anonymous closure> (package:flutter_tools/runner.dart:188:26)
#8      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:29)
<asynchronous suspension>
#9      _rootRun (dart:async/zone.dart:1124:13)
#10     _CustomZone.run (dart:async/zone.dart:1021:19)
#11     _runZoned (dart:async/zone.dart:1516:10)
#12     runZoned (dart:async/zone.dart:1463:12)
#13     AppContext.run (package:flutter_tools/src/base/context.dart:152:18)
<asynchronous suspension>
#14     _doctorText (package:flutter_tools/runner.dart:187:19)
<asynchronous suspension>
#15     _createLocalCrashReport (package:flutter_tools/runner.dart:165:32)
<asynchronous suspension>
#16     _handleToolError (package:flutter_tools/runner.dart:120:33)
<asynchronous suspension>
#17     run.<anonymous closure> (package:flutter_tools/runner.dart:64:20)
<asynchronous suspension>
#18     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:29)
<asynchronous suspension>
#19     _rootRun (dart:async/zone.dart:1124:13)
#20     _CustomZone.run (dart:async/zone.dart:1021:19)
#21     _runZoned (dart:async/zone.dart:1516:10)
#22     runZoned (dart:async/zone.dart:1463:12)
#23     AppContext.run (package:flutter_tools/src/base/context.dart:152:18)
<asynchronous suspension>
#24     runInContext (package:flutter_tools/src/context_runner.dart:54:24)
<asynchronous suspension>
#25     run (package:flutter_tools/runner.dart:51:10)
#26     main (package:flutter_tools/executable.dart:62:9)
<asynchronous suspension>
#27     main (file:///Users/timsneath/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
#28     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:298:32)
#29     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:171:12)

The log seems to complain about this line: git log -n 1 --pretty=format:%ad --date=iso, but the command here works from my terminal.

@jonahwilliams

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2019

What version of git do you have?

@AppleEducate

This comment was marked as off-topic.

Copy link
Contributor

commented Jun 5, 2019

IMG_0127
IMG_0129
IMG_0130
IMG_0131
IMG_0132
IMG_0133

@AppleEducate

This comment was marked as off-topic.

Copy link
Contributor

commented Jun 5, 2019

Also various build errors on 10.15

@stuartmorgan

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2019

@AppleEducate Supporting Catalyst for iOS Flutter projects is completely unrelated to being able to run Flutter commands on 10.15.

@stuartmorgan

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2019

I can't find the issue at the moment, but I know I've seen a bug about git failing after an OS update until you install command line tool support; this is likely a dup of that.

Edit I may be thinking of #28939 but I thought there was something clearer. Although if it runs successfully from the terminal, maybe not the same issue.

What does echo $? show after you run the git command directly? Maybe there's a bug and it's returning a bad exit code even though it's running successfully?

@kangwang1988

This comment has been minimized.

Copy link
Member

commented Jun 5, 2019

@timsneath
I'm using macos 10.15.
Though I've found several errors when running flutter with macos 10.15&ios13, however, this issue doesn't appear in myside.
It seems probably a git issue which may not related to 10.15.

@mclark4386

This comment has been minimized.

Copy link

commented Jun 6, 2019

did you install git from homebrew?

@rishab2113

This comment was marked as off-topic.

Copy link

commented Jun 8, 2019

look at #33909 for solutions!

@timsneath

This comment has been minimized.

Copy link
Member Author

commented Jun 10, 2019

@stuartmorgan The command

git log -n 1 --pretty=format:%ad --date=iso

pipes to less on my machine. But

echo `git log -n 1 --pretty=format:%ad --date=iso`

returns a meaningful result (an ISO-formatted date) with an error code of 0.

Looking at my machine, I have two versions of git installed:

$ where git
/usr/local/git/current/bin/git
/usr/bin/git
$ /usr/local/git/current/bin/git --version      
git version 2.19.0.605.g01d371f741-goog
$ /usr/bin/git --version
git version 2.20.1 (Apple Git-117)

The Google one is first on the path:

$ git --version      
git version 2.19.0.605.g01d371f741-goog
@stuartmorgan

This comment has been minimized.

Copy link
Contributor

commented Jun 10, 2019

echo git log -n 1 --pretty=format:%ad --date=iso
returns a meaningful result (an ISO-formatted date) with an error code of 0.

The error code of that command is echos error code though, not git's.

We should probably investigate further offline.

@galvesribeiro

This comment was marked as off-topic.

Copy link

commented Jun 24, 2019

I'm having other weird problems with Catalina as well. Most of the apps after the upgrade now request you access to do something. Then you need to go to Preferences and allow them on Security section.

flutter cli was no different. Except that it is now ranging on the snapshot and I can't run it anymore... So VSCode don't work as well...

image

Click on Open Anyway doesn't do anything :(

Any clues?

Thanks!

@galvesribeiro

This comment was marked as off-topic.

Copy link

commented Jun 24, 2019

okey... Found out tht the "Anywhere" option was removed from Preferences...

Just run sudo spctl --master-disable and you get it back.

Just in case anyone fall in the same pitfall...

@AppleEducate

This comment was marked as off-topic.

Copy link
Contributor

commented Jun 24, 2019

@galvesriberio what’s the official solution long term? Does flutter need to sign it?

@galvesribeiro

This comment was marked as off-topic.

Copy link

commented Jun 24, 2019

I think so... Before Catalina, you could just click on "Anywhere" and use it... Now this options is hidden, and I would guess, will be removed on future OSes...

I still don't understand why flutter is deployed as a zip rather than an installer with multi-home updates (to support multiple SDK versions) just like .Net Core does...

@christopherfujino

This comment has been minimized.

Copy link
Contributor

commented Jul 22, 2019

Hi @timsneath, was the original issue here resolved? It seems like there are two issues here, and I would like to track them separately.

@christopherfujino

This comment has been minimized.

Copy link
Contributor

commented Jul 22, 2019

NOTE: I opened 36714 for the issue above with kernel-service.dart.snapshot not running on Catalina.

@timsneath

This comment has been minimized.

Copy link
Member Author

commented Jul 23, 2019

@christopherfujino

This comment has been minimized.

Copy link
Contributor

commented Jul 23, 2019

@timsneath sounds good!

@christopherfujino

This comment has been minimized.

Copy link
Contributor

commented Jul 25, 2019

Another instance was here.

@christopherfujino christopherfujino changed the title `flutter upgrade` fails on macOS 10.15 beta (Catalina) VersionCheckError during `flutter upgrade` on macOS 10.15 beta (Catalina) Jul 25, 2019
@timsneath

This comment has been minimized.

Copy link
Member Author

commented Jul 25, 2019

Just captured a fresh instance of this (crash report ID: 8ac6633e934ae3db)

Latest log attached.
flutter_01.log

$ for bin in $(which -a git); do echo "$bin: $($bin --version)"; done

/usr/local/git/current/bin/git: git version 2.20.1.415.g653613c723-goog
/usr/bin/git: git version 2.21.0 (Apple Git-120)
@christopherfujino

This comment has been minimized.

Copy link
Contributor

commented Jul 29, 2019

I also filed a dart issue

@christopherfujino christopherfujino referenced this issue Aug 1, 2019
8 of 9 tasks complete
@Hixie

This comment has been minimized.

Copy link
Contributor

commented Aug 6, 2019

@christopherfujino says he's got a new PR in the works for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.