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

[bug]: flutterfire update throws ProcessException: System cannot find the specified file. #252

Open
1 task done
iamalper opened this issue Dec 29, 2023 · 5 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@iamalper
Copy link

Is there an existing issue for this?

  • I have searched the existing issues.

CLI Version

0.2.7

Firebase Tools version

12.9.1

Flutter Doctor Output

[√] Flutter (Channel stable, 3.16.5, on Microsoft Windows [Version 10.0.22631.2861], locale tr-TR)
• Flutter version 3.16.5 on channel stable at C:\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 78666c8dc5 (10 days ago), 2023-12-19 16:14:14 -0800
• Engine revision 3f3e560236
• Dart version 3.2.3
• DevTools version 2.28.4

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at C:\Android\Sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)
• All Android licenses accepted.

[X] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[√] Visual Studio - develop Windows apps (Visual Studio Derleme Araçları 2022 17.8.1)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools
• Visual Studio Derleme Araçları 2022 version 17.8.34316.72
• Windows 10 SDK version 10.0.22621.0

[√] Android Studio (version 2022.3)
• Android Studio at C:\Program Files\Android\Android Studio
• 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 17.0.6+0-b2043.56-10027231)

[√] VS Code (version 1.85.1)
• VS Code at C:\Users\Alper\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.80.0

[√] Connected device (2 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22631.2861]
• Edge (web) • edge • web-javascript • Microsoft Edge 120.0.2210.91

[√] Network resources
• All expected network resources are available.

Description

When i run flutterfire update command in a flutter project i get following output

Cleaning up current workspace ...
Unhandled exception:
ProcessException: System cannot find the specified file.

Command: flutter clean
#0 _ProcessImpl._start (dart:io-patch/process_patch.dart:402:33)
#1 Process.start (dart:io-patch/process_patch.dart:38:20)
#2 _runNonInteractiveProcess (dart:io-patch/process_patch.dart:579:18)
#3 Process.run (dart:io-patch/process_patch.dart:49:12)
#4 UpdateCommand.run (package:flutterfire_cli/src/commands/update.dart:79:19)
#5 CommandRunner.runCommand (package:args/command_runner.dart:212:27)
#6 CommandRunner.run. (package:args/command_runner.dart:122:25)
#7 new Future.sync (dart:async/future.dart:305:31)
#8 CommandRunner.run (package:args/command_runner.dart:122:14)
#9 main (file:///C:/Users/Alper/AppData/Local/Pub/Cache/hosted/pub.dev/flutterfire_cli-0.2.7/bin/flutterfire.dart:57:48)

Steps to reproduce

  1. Create a new flutter project
  2. Run flutterfire configure and follow steps
  3. Run flutterfire update
  4. See error

Expected behavior

flutterfire update shouldn't throw error at command flutter clean. Normally flutter clean runs without any issue.

Screenshots

No response

Additional context and comments

No response

@iamalper iamalper added bug Something isn't working triage labels Dec 29, 2023
@wayne-wang-1119
Copy link

same bug here dont know what to do

@jibbers42
Copy link

The command needs to be updated to work on Windows and *nix.

This issue is caused by dart not using PATHEXT, dart-lang/sdk#31291. The code should run flutter.bat when on Windows:

await Process.run(
'flutter',

Also, the next command won't work because rm is not a windows command:

And a couple more Process lines in that file that won't work on Windows. Not sure about other commands.

@russellwheatley
Copy link
Member

@iamalper - is this on windows machine?

@iamalper
Copy link
Author

iamalper commented Mar 1, 2024

@russellwheatley yes, windows 11 single language

@russellwheatley
Copy link
Member

Hey @jibbers42 - if you would like to open a PR updating the commands for windows machine, I'd take a look 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants