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

Unable to update to latest version 1.1.3 #1143

Closed
PeterBriggsGreggs opened this issue Mar 29, 2023 · 14 comments
Closed

Unable to update to latest version 1.1.3 #1143

PeterBriggsGreggs opened this issue Mar 29, 2023 · 14 comments

Comments

@PeterBriggsGreggs
Copy link

Hi,
I tried running the patrol update command however the update process failed to download all the required artifacts. Message below are from the terminal in AS:
peterbriggs@Peters-MacBook-Pro-2 gotg_apps_grecords % patrol update
✓ New patrol_cli version is available (1.1.3) (0.4s)
✓ Updated patrol_cli to version 1.1.3 (4.1s)
✗ Failed to download artifacts for version 1.1.3 (0.4s)
Exception: Failed to download Artifact.archive(name: AutomatorServer-iphoneos-arm64, version: 1.1.3, ext: app) from https://github.com/leancodepl/patrol/releases/download/patrol_cli-v1.1.3/AutomatorServer-iphoneos-arm64-1.1.3.zip
#0 ArtifactsRepository._downloadArtifact (package:patrol_cli/src/common/artifacts_repository.dart:295:7)

#1 Future.wait. (dart:async/future.dart:521:21)

#2 ArtifactsRepository.downloadArtifacts (package:patrol_cli/src/common/artifacts_repository.dart:279:5)

#3 UpdateCommand.run (package:patrol_cli/src/features/update/update_command.dart:76:7)

#4 CommandRunner.runCommand (package:args/command_runner.dart:209:13)

#5 PatrolCommandRunner.runCommand (package:patrol_cli/src/command_runner.dart:291:18)

#6 PatrolCommandRunner.run (package:patrol_cli/src/command_runner.dart:235:18)

#7 patrolCommandRunner (package:patrol_cli/src/command_runner.dart:52:14)

#8 main (file:///Users/peterbriggs/.pub-cache/hosted/pub.dartlang.org/patrol_cli-0.8.2+1/bin/main.dart:6:20)

When clicking on the link failing link, the following web page is displayed, with a Not Found message:
image

Please can you investigate this issue.
Thank you

@bartekpacia
Copy link
Contributor

Hi @PeterBriggsGreggs, sorry for the problems. This issue was already mentioned here, and the solution mentioned there should work for you as well. Tell me if it helps!

@PeterBriggsGreggs
Copy link
Author

Hi,
No... following the suggestions made in the other issue didn't work.
Deactivating and reactivating didn't install version 1.1.3
Below is a verbose flutter doctor which shows Dart version as 2.19.5
Any other suggestions most welcome.

image

@bartekpacia
Copy link
Contributor

I think the cause is here: "Warning: dart on your path resolves to ...". So dart resolves to Dart 2.17, which is not supported by Patrol CLI, which requires at least Dart 2.18.

PS Next time, copy the text from terminal and paste it, instead of attaching a screenshot.

@bartekpacia
Copy link
Contributor

Please also show output of patrol doctor.

@PeterBriggsGreggs
Copy link
Author

Patrol Doctor details:
image

@bartekpacia
Copy link
Contributor

You need Dart 2.18.

Please run dart --version and see that your version of Dart is probably older.

@PeterBriggsGreggs
Copy link
Author

You're right it is...
Why is there a difference and how do I resolve this ?
Thanks
image

@PeterBriggsGreggs
Copy link
Author

One other piece of information for you... We use fvm (Flutter version Management) and in the Dart set up in Android Studio the details below are set up. Will this have a bearing on using patrol ?
image

@bartekpacia
Copy link
Contributor

flutter doctor output you shared hints at the problem:

Warning: dart on your path resolves to /us/local/Cellar/dart/2.17.5/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/peterbriggs/flutter. Consider adding
/Users/peterbriggs/flutter/bin to the front of your path.

That's because you actually have two darts installed on your PC. Flutter comes with its own Dart, so make sure to uninstall any Dart that is not from Flutter. Looks like you installed dart with Homebrew, so uninstall it: brew uninstall dart.

@bartekpacia
Copy link
Contributor

That's because you actually have two darts installed on your PC. Flutter comes with its own Dart, so make sure to uninstall any Dart that is not from Flutter.

No, as long as dart in your IDE is the same as the dart command from your command-line.

Good decision with using fvm - I use it too. Just do fvm install <your_version> and fvm global <your_version> (e.g. fvm install stable and fvm global stable) and it will download and set up the newest Flutter and Dart.

@PeterBriggsGreggs
Copy link
Author

I've uninstalled Dart.
I've checked the dart version after the uninstall and it shows 2.19.5
I've run patrol update and received these messages below:
image

@bartekpacia
Copy link
Contributor

bartekpacia commented Mar 29, 2023

Nice, now the last step is to install and compile patrol_cli again, because it was first compiled on an older Dart version and it can't work on a newer one.

dart pub global deactivate patrol_cli
dart pub global activate patrol_cli

If this works, please close the issue :)

@PeterBriggsGreggs
Copy link
Author

Yes... that's worked.
Thank you for your help and support

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants