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

Can not use flutter command without Admin privilages #17742

Closed
nao3301 opened this issue May 19, 2018 · 9 comments
Closed

Can not use flutter command without Admin privilages #17742

nao3301 opened this issue May 19, 2018 · 9 comments

Comments

@nao3301
Copy link

nao3301 commented May 19, 2018

Steps to Reproduce

  1. Download the zip flie.
  2. extract it
  3. add path
    (like in the getting started)
  4. open cmd and type any flutter command
  5. the terminal freezes and there is no output

Logs

sorry no output
@zoechi
Copy link
Contributor

zoechi commented May 20, 2018

What folder did you download the zip file to?
What is the output of flutter doctor -v if you run it with admin privileges?

@nao3301
Copy link
Author

nao3301 commented May 21, 2018

downloaded to downloads

  ÔòöÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉ
ÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔò
ÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòù
  Ôòæ WARNING: your installation of Flutter is 31 days old.
 Ôòæ
  Ôòæ
 Ôòæ
  Ôòæ To update to the latest version, run "flutter upgrade".
 Ôòæ
  ÔòÜÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉ
ÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔò
ÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòÉÔòØ

[] Flutter (Channel beta, v0.3.2, on Microsoft Windows [Version 6.3.9600], lo
cale de-DE)
    ÔÇó Flutter version 0.3.2 at C:\Program Files\flutter
    ÔÇó Framework revision 44b7e7d3f4 (4 weeks ago), 2018-04-20 01:02:44 -0700
    ÔÇó Engine revision 09d05a3891
    ÔÇó Dart version 2.0.0-dev.48.0.flutter-fe606f890b

[X] Android toolchain - develop for Android devices
    X Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.ht
ml
      On first launch it will assist you in installing the Android SDK component
s.
      (or visit https://flutter.io/setup/#android-setup for detailed instruction
s).
      If Android SDK has been installed to a custom location, set $ANDROID_HOME
to that location.

[X] Android Studio (not installed)
    ÔÇó Android Studio not found; download from https://developer.android.com/st
udio/index.html
      (or visit https://flutter.io/setup/#android-setup for detailed instruction
s).

[] VS Code, 64-bit edition (version 1.23.1)
    ÔÇó VS Code at C:\Program Files\Microsoft VS Code
    ÔÇó Dart Code extension version 2.12.1

[!] Connected devices
    ! No devices available

! Doctor found issues in 3 categories.

@DanTup
Copy link
Contributor

DanTup commented May 28, 2018

@nao3301 The version of flutter that is first in your path is not in your Downloads folder:

Flutter version 0.3.2 at C:\Program Files\flutter

Flutter downloads into its cache folder so if you put it in Program Files then it's going to need Admin permissions. I recommend removing it from Program Files (and the corresponding entry from your PATH).

@DanTup
Copy link
Contributor

DanTup commented May 30, 2018

This issue is fixed in master with #17975. When running from a folder where you don't have write permissions (such as Program Files run as non-Admin) you'll get an error message explaining what's up.

It's not recommended to run as Admin; you should move Flutter to somewhere your user can run without elevated privileges.

@DanTup DanTup closed this as completed May 30, 2018
@mohabmm
Copy link

mohabmm commented Jan 31, 2019

flutter problem
I had the same problem I moved my flutter SDK and Android SDK outside the C partition and i need privilege also to run apps can anyone help me as i miss all the day trying to solve this problem

@mohabmm
Copy link

mohabmm commented Jan 31, 2019

Microsoft Windows [Version 10.0.16299.492]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\Mohab Magdy\Desktop\flutter_practise exampels\upwork_projects\solarQuot
es\solarquotes>flutter doctor -v
[√] Flutter (Channel beta, v0.7.3, on Microsoft Windows [Version 10.0.16299.492], locale
 en-US)
    • Flutter version 0.7.3 at F:\flutter sdk\flutter
    • Framework revision 3b309bda07 (5 months ago), 2018-08-28 12:39:24 -0700
    • Engine revision af42b6dc95
    • Dart version 2.1.0-dev.1.0.flutter-ccb16f7282

[!] Android toolchain - develop for Android devices
    • Android SDK at C:\Users\Mohab Magdy\AppData\Local\Android\Sdk
    • Android NDK location not configured (optional; useful for native profiling support
)
    X Android SDK is missing command line tools; download from https://goo.gl/XxQghQ
    • Try re-installing or updating your Android SDK,
      visit https://flutter.io/setup/#android-setup for detailed instructions.

[√] Android Studio (version 3.3)
    • Android Studio at F:\programmes for mohab\install android studio
    • Flutter plugin version 32.0.1
    • Dart plugin version 182.5124
    • Java version

[√] Android Studio (version 3.0)
    • Android Studio at E:\android-studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-884-b01)

[!] VS Code, 64-bit edition (version 1.30.1)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[!] Connected devices
    • Device emulator-5554 is offline.

! Doctor found issues in 3 categories.
C:\Users\Mohab Magdy\Desktop\flutter_practise exampels\upwork_projects\solarQuotes\solar
quotes>flutter doctor -v
[√] Flutter (Channel beta, v0.7.3, on Microsoft Windows [Version 10.0.16299.492], locale
 en-US)
    • Flutter version 0.7.3 at F:\flutter sdk\flutter
    • Framework revision 3b309bda07 (5 months ago), 2018-08-28 12:39:24 -0700
    • Engine revision af42b6dc95
    • Dart version 2.1.0-dev.1.0.flutter-ccb16f7282

[!] Android toolchain - develop for Android devices
    • Android SDK at C:\Users\Mohab Magdy\AppData\Local\Android\Sdk
    • Android NDK location not configured (optional; useful for native profiling support
)
    X Android SDK is missing command line tools; download from https://goo.gl/XxQghQ
    • Try re-installing or updating your Android SDK,
      visit https://flutter.io/setup/#android-setup for detailed instructions.

[√] Android Studio (version 3.3)
    • Android Studio at F:\programmes for mohab\install android studio
    • Flutter plugin version 32.0.1
    • Dart plugin version 182.5124
    • Java version

[√] Android Studio (version 3.0)
    • Android Studio at E:\android-studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-884-b01)

[!] VS Code, 64-bit edition (version 1.30.1)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[√] Connected devices (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28) (emul
ator)

! Doctor found issues in 2 categories.
C:\Users\Mohab Magdy\Desktop\flutter_practise exampels\upwork_projects\solarQuotes\solar
quotes>
C:\Users\Mohab Magdy\Desktop\flutter_practise exampels\upwork_projects\solarQuotes\solar
quotes>flutter doctor -v
[√] Flutter (Channel beta, v0.7.3, on Microsoft Windows [Version 10.0.16299.492], locale en-US)
    • Flutter version 0.7.3 at F:\flutter sdk\flutter
    • Framework revision 3b309bda07 (5 months ago), 2018-08-28 12:39:24 -0700
    • Engine revision af42b6dc95
    • Dart version 2.1.0-dev.1.0.flutter-ccb16f7282

[!] Android toolchain - develop for Android devices
    • Android SDK at C:\Users\Mohab Magdy\AppData\Local\Android\Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    X Android SDK is missing command line tools; download from https://goo.gl/XxQghQ
    • Try re-installing or updating your Android SDK,
      visit https://flutter.io/setup/#android-setup for detailed instructions.

[√] Android Studio (version 3.3)
    • Android Studio at F:\programmes for mohab\install android studio
    • Flutter plugin version 32.0.1
    • Dart plugin version 182.5124
    • Java version

[√] Android Studio (version 3.0)
    • Android Studio at E:\android-studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-884-b01)

[!] VS Code, 64-bit edition (version 1.30.1)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[√] Connected devices (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)

! Doctor found issues in 2 categories.

C:\Users\Mohab Magdy\Desktop\flutter_practise exampels\upwork_projects\solarQuotes\solarquotes>flutter doctor -v

@DanTup
Copy link
Contributor

DanTup commented Feb 5, 2019

@mohabmm it's not clear from your screenshot or Flutter output exactly what the problem is that you're seeing - this issue was about the flutter command not working, but you've posted text showing flutter doctor providing some output. If you're having issues, please open a new issue with a clear description of what's not working and we can take a look. Thanks!

@KingsleyUsoroeno
Copy link

Am having this same issue on a mac
Flutter failed to create a directory at "/Users/mac/.config/flutter". The flutter tool cannot access the file or directory.
Please ensure that the SDK and/or project is installed in a location that has read/write permissions for the current user.
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 _throwFileSystemException (package:flutter_tools/src/base/error_handling_io.dart:749:3)
#2 _handlePosixException (package:flutter_tools/src/base/error_handling_io.dart:697:3)
#3 _runSync (package:flutter_tools/src/base/error_handling_io.dart:561:7)
#4 ErrorHandlingDirectory.createSync (package:flutter_tools/src/base/error_handling_io.dart:408:12)
#5 new Config (package:flutter_tools/src/base/config.dart:33:17)
#6 runInContext. (package:flutter_tools/src/context_runner.dart:146:21)
#7 AppContext._generateIfNecessary. (package:flutter_tools/src/base/context.dart:104:41)
#8 _LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:311:23)
#9 AppContext._generateIfNecessary (package:flutter_tools/src/base/context.dart:92:20)

@github-actions
Copy link

github-actions bot commented Aug 4, 2021

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 4, 2021
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

5 participants