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

Cannot find where.exe #14887

Closed
xclusivzik opened this issue Feb 26, 2018 · 17 comments
Closed

Cannot find where.exe #14887

xclusivzik opened this issue Feb 26, 2018 · 17 comments
Labels
platform-windows Building on or for Windows specifically tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@xclusivzik
Copy link

xclusivzik commented Feb 26, 2018

when i run the command, "flutter doctor" i get this error

Oops; flutter has exited unexpectedly.
Sending crash report to Google.
Failed to send crash report due to a network error: SocketException: OS Error: The remote computer refused the network connection.
, errno = 1225, address = clients2.google.com, port = 50002
Crash report written to C:\Windows\System32\flutter_15.log;
please let us know at https://github.com/flutter/flutter/issues.

below is the error log file detail

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

command

flutter doctor

exception

ArgumentError: Invalid argument(s): Cannot find executable for where.
#0     
 _getExecutable (package:process/src/interface/local_process_manager.dart:113)
#1     
 LocalProcessManager.runSync (package:process/src/interface/local_process_manager.dart:84)
#2  
    _WindowsUtils._which (package:flutter_tools/src/base/os.dart:163)
#3   
   OperatingSystemUtils.whichAll (package:flutter_tools/src/base/os.dart:41)
#4      
AndroidSdk.locateAndroidSdk.findAndroidHomeDir (package:flutter_tools/src/android/android_sdk.dart:107)
#5   
   AndroidSdk.locateAndroidSdk (package:flutter_tools/src/android/android_sdk.dart:164)
#6    
  AppContext.putIfAbsent (package:flutter_tools/src/base/context.dart:46)
#7     
 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:268)
<asynchronous suspension>
#8   
   CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:109)
#9     
 new Future.sync (dart:async/future.dart:222)
#10     
CommandRunner.run (package:args/command_runner.dart:109)
#11  
   FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:166)
#12    
 run.<anonymous closure> (package:flutter_tools/runner.dart:90)
<asynchronous suspension>
#13     
AppContext._run (package:flutter_tools/src/base/context.dart:76)
<asynchronous suspension>
#14     
AppContext.runInZone.<anonymous closure> (package:flutter_tools/src/base/context.dart:66)
#15    
 _rootRun (dart:async/zone.dart:1126)
#16     
_CustomZone.run (dart:async/zone.dart:1023)
#17     
runZoned (dart:async/zone.dart:1501)
#18     
AppContext.runInZone (package:flutter_tools/src/base/context.dart:65)
#19   
  run (package:flutter_tools/runner.dart:61)
<asynchronous suspension>
#20    
 main (package:flutter_tools/executable.dart:48)
<asynchronous suspension>
#21    
 main (file:///C:/Users/MFM%20lekki/flutter/packages/flutter_tools/bin/flutter_tools.dart:16)
#22   
  _startIsolate.<anonymous closure> (dart:isolate-patch/dart:isolate/isolate_patch.dart:277)
#23    
 _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165)

flutter doctor

encountered exception: Invalid argument(s): Cannot find executable for where.

#0      _getExecutable (package:process/src/interface/local_process_manager.dart:113)
#1      LocalProcessManager.runSync (package:process/src/interface/local_process_manager.dart:84)
#2      _WindowsUtils._which (package:flutter_tools/src/base/os.dart:163)
#3   
   OperatingSystemUtils.whichAll (package:flutter_tools/src/base/os.dart:41)
#4    
  AndroidSdk.locateAndroidSdk.findAndroidHomeDir (package:flutter_tools/src/android/android_sdk.dart:107)
#5    
  AndroidSdk.locateAndroidSdk (package:flutter_tools/src/android/android_sdk.dart:164)
#6     
 getAdbPath (package:flutter_tools/src/android/android_sdk.dart:51)
#7   
   AndroidWorkflow.canListDevices (package:flutter_tools/src/android/android_workflow.dart:31)
#8    
  AndroidDevices.canListAnything (package:flutter_tools/src/android/android_device.dart:50)
#9      DeviceManager.canListAnything.<anonymous closure> (package:flutter_tools/src/device.dart:99)
#10     Iterable.any (dart:core/iterable.dart:403)
#11     DeviceManager.canListAnything (package:flutter_tools/src/device.dart:99)
#12     Doctor.validators (package:flutter_tools/src/doctor.dart:53)
#13     Doctor.diagnose (package:flutter_tools/src/doctor.dart:111)
<asynchronous suspension>
#14     _doctorText.<anonymous closure> (package:flutter_tools/runner.dart:237)
#15     AppContext._run (package:flutter_tools/src/base/context.dart:76)
<asynchronous suspension>
#16     AppContext.runInZone.<anonymous closure> (package:flutter_tools/src/base/context.dart:66)
#17     _rootRun (dart:async/zone.dart:1126)
#18     _CustomZone.run (dart:async/zone.dart:1023)
#19     runZoned (dart:async/zone.dart:1501)
#20     AppContext.runInZone (package:flutter_tools/src/base/context.dart:65)
#21     _doctorText (package:flutter_tools/runner.dart:237)
<asynchronous suspension>
#22     _createLocalCrashReport (package:flutter_tools/runner.dart:212)
<asynchronous suspension>
#23     _handleToolError (package:flutter_tools/runner.dart:167)
<asynchronous suspension>
#24     run.<anonymous closure> (package:flutter_tools/runner.dart:94)
<asynchronous suspension>
#25     AppContext._run (package:flutter_tools/src/base/context.dart:76)
<asynchronous suspension>
#26     AppContext.runInZone.<anonymous closure> (package:flutter_tools/src/base/context.dart:66)
#27     _rootRun (dart:async/zone.dart:1126)
#28     _CustomZone.run (dart:async/zone.dart:1023)
#29     runZoned (dart:async/zone.dart:1501)
#30     AppContext.runInZone (package:flutter_tools/src/base/context.dart:65)
#31     run (package:flutter_tools/runner.dart:61)
<asynchronous suspension>
#32     main (package:flutter_tools/executable.dart:48)
<asynchronous suspension>
#33     main (file:///C:/Users/MFM%20lekki/flutter/packages/flutter_tools/bin/flutter_tools.dart:16)
#34     _startIsolate.<anonymous closure> (dart:isolate-patch/dart:isolate/isolate_patch.dart:277)
#35     _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165)
@tvolkert
Copy link
Contributor

/cc @goderbauer

@tvolkert tvolkert added tool Affects the "flutter" command-line tool. See also t: labels. platform-windows Building on or for Windows specifically labels Feb 26, 2018
@jason-simmons
Copy link
Member

The flutter tool is looking for where.exe. Is %windir%\system32 in the PATH in your environment?

@xclusivzik
Copy link
Author

How Do fix it

@goderbauer
Copy link
Member

Sounds like your Windows installation is messed up.

In a command prompt, type echo %PATH%. Does the output contain your system32 directory (usually C:\Windows\System32)? If not, you should add the system32 path to your PATH environment variable following a guide from the internet, e.g. https://www.java.com/en/download/help/path.xml.

Also: double check that where.exe exists in your Windows\System32 directory.

@goderbauer goderbauer changed the title opps; flutter has exited unexpectedly Cannot find where.exe Feb 27, 2018
@xclusivzik
Copy link
Author

yes where.exe exists in my system 32 folder

@xclusivzik
Copy link
Author

xclusivzik commented Feb 27, 2018

still giving this error

C:\Windows\System32>flutter

Oops; flutter has exited unexpectedly.
Sending crash report to Google.
Crash report sender itself crashed: HandshakeException: Handshake error in client (OS Error:
        CERTIFICATE_VERIFY_FAILED: self signed certificate(ssl_cert.c:345))
#0      IOClient.send (package:http/src/io_client.dart:30)
<asynchronous suspension>
#1      CrashReportSender.sendReport (package:flutter_tools/src/crash_reporting.dart:101)
<asynchronous suspension>
#2      _handleToolError (package:flutter_tools/runner.dart:161)
<asynchronous suspension>
#3      run.<anonymous closure> (package:flutter_tools/runner.dart:94)
<asynchronous suspension>
#4      AppContext._run (package:flutter_tools/src/base/context.dart:76)
<asynchronous suspension>
#5      AppContext.runInZone.<anonymous closure> (package:flutter_tools/src/base/context.dart:66)
#6      _rootRun (dart:async/zone.dart:1126)
#7      _CustomZone.run (dart:async/zone.dart:1023)
#8      runZoned (dart:async/zone.dart:1501)
#9      AppContext.runInZone (package:flutter_tools/src/base/context.dart:65)
#10     run (package:flutter_tools/runner.dart:61)
<asynchronous suspension>
#11     main (package:flutter_tools/executable.dart:48)
<asynchronous suspension>
#12     main (file:///C:/Users/MFM%20lekki/flutter/packages/flutter_tools/bin/flutter_tools.dart:16)
#13     _startIsolate.<anonymous closure> (dart:isolate-patch/dart:isolate/isolate_patch.dart:277)
#14     _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165)

Crash report written to C:\Windows\System32\flutter_18.log;
please let us know at https://github.com/flutter/flutter/issues.

@tvolkert
Copy link
Contributor

In a command prompt, type echo %PATH%.

What is the output of this?

@xclusivzik
Copy link
Author

that is the output

C:\Windows\System32>echo %PATH%.
$PATH:~/.composer/vendor/bin;C:\Users\MFM lekki\AppData\Roaming\Composer\vendor\bin;C:\xampp\php;C:\Users\MFM lekki\AppData\Roaming\Composer;C:\Program Files\Git\cmd;C:\Users\MFM lekki\flutter\bin.

@tvolkert
Copy link
Contributor

Ok, cool - you want to add system32 to your path.

@xclusivzik
Copy link
Author

done that
image

@NathanaelA
Copy link

@xclusivzik - Just a FYI; You might have to restart windows. Sometimes you can close and reopen the command window and the path will take effect for that command window; but the rest of the OS will not have the updated path.

Then after your restart; open a command prompt and just type where and make sure it runs.

@xclusivzik
Copy link
Author

ok done that and this showed

The syntax of this command is:

WHERE [/R dir] [/Q] [/F] [/T] pattern...

Description:
Displays the location of files that match the search pattern.
By default, the search is done along the current directory and
in the paths specified by the PATH environment variable.

Parameter List:
/R Recursively searches and displays the files that match the
given pattern starting from the specified directory.

/Q       Returns only the exit code, without displaying the list
         of matched files. (Quiet mode)

/F       Displays the matched filename in double quotes.

/T       Displays the file size, last modified date and time for all
         matched files.

pattern  Specifies the search pattern for the files to match.
         Wildcards * and ? can be used in the pattern. The
         "$env:pattern" and "path:pattern" formats can also be
         specified, where "env" is an environment variable and
         the search is done in the specified paths of the "env"
         environment variable. These formats should not be used
         with /R. The search is also done by appending the
         extensions of the PATHEXT variable to the pattern.

 /?      Displays this help message.

NOTE: The tool returns an error level of 0 if the search is
successful, of 1 if the search is unsuccessful and
of 2 for failures or errors.

Examples:
WHERE /?
WHERE myfilename1 myfile????.*
WHERE $windir:.
WHERE /R c:\windows *.exe *.dll .bat
WHERE /Q ??.???
WHERE "c:\windows;c:\windows\system32:
.dll"
WHERE /F /T *.dll

@tvolkert
Copy link
Contributor

Now that where.exe is found, give flutter doctor a go

@xclusivzik
Copy link
Author

same flutter has exited unexpectedly

@tvolkert
Copy link
Contributor

the original error was that it can't find the executable for where -- is that still the error?

@xclusivzik
Copy link
Author

where has been found

@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 Aug 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform-windows Building on or for Windows specifically tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

No branches or pull requests

5 participants