-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Closed
Labels
c: regressionIt was better in the past than it is nowIt was better in the past than it is nowplatform-iosiOS applications specificallyiOS applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.

Description
@csterritt commented on Jun 12, 2018, 12:07 AM UTC:
Steps to Reproduce
Ran flutter create first_try
, cd'd into that directory. flutter run
works, comes up fine in the iOS emulator. I can run in IntelliJ with the "Run" command (green triangle), but no hot-reload.
If I run with "Debug" command (green bug), I get the empty white screen on the iOS emulator, and the following output:
Launching lib/main.dart on iPhone X in debug mode...
log: Must be admin to run 'stream' command
Script started, output file is /dev/null
Script done, output file is /dev/null
Starting Xcode build...
Xcode build done.
Version info
$ flutter doctor -v
[✓] Flutter (Channel beta, v0.4.4, on Mac OS X 10.13.5 17F77, locale en-US)
• Flutter version 0.4.4 at /Volumes/Second/Chris/hacks/flutter/flutter
• Framework revision f9bb4289e9 (4 weeks ago), 2018-05-11 21:44:54 -0700
• Engine revision 06afdfe54e
• Dart version 2.0.0-dev.54.0.flutter-46ab040e58
[!] Android toolchain - develop for Android devices (Android SDK 28.0.0)
• Android SDK at /Users/chris/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.0
• Java binary at: /Users/chris/hacks/flutter/jdk-10.0.1.jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 10.0.1+10)
✗ Android license status unknown.
[✓] iOS toolchain - develop for iOS devices (Xcode 9.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.4, Build version 9F1027a
• ios-deploy 1.9.2
• CocoaPods version 1.5.3
[✗] Android Studio (not installed)
• Android Studio not found; download from [https://developer.android.com/studio/index.html](https://developer.android.com/studio/index.html)
(or visit [https://flutter.io/setup/#android-setup](https://flutter.io/setup/#android-setup) for detailed instructions).
[✓] IntelliJ IDEA Community Edition (version 2018.1.4)
• IntelliJ at /Users/chris/Applications/IntelliJ IDEA CE.app
• Flutter plugin version 25.0.2
• Dart plugin version 181.4892.1
[!] VS Code (version 1.24.0)
• VS Code at /Users/chris/Applications/Visual Studio Code.app/Contents
• Dart Code extension not installed; install from
[https://marketplace.visualstudio.com/items?itemName=Dart-Code.dart-code](https://marketplace.visualstudio.com/items?itemName=Dart-Code.dart-code)
[✓] Connected devices (1 available)
• iPhone X • D34D5096-B3F9-4930-822B-48D3BD71B83D • ios • iOS 11.4 (simulator)
! Doctor found issues in 3 categories.
This issue was moved by devoncarew from flutter/flutter-intellij/issues/2360.
zoechi, keithbhunter, audkar, waniwang, jonas-zebari and 1 more
Metadata
Metadata
Assignees
Labels
c: regressionIt was better in the past than it is nowIt was better in the past than it is nowplatform-iosiOS applications specificallyiOS applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
ghost commentedon Jun 12, 2018
@devoncarew commented on Jun 12, 2018, 12:34 AM UTC:
@xster, @cbracken, re: the:
Do you have a sense for where this is coming from?
ghost commentedon Jun 12, 2018
@xster commented on Jun 12, 2018, 12:38 AM UTC:
More interesting was for me:
Script started, output file is
but that string (or parts of it) don't appear in our repo. Was this on a custom fork branch?ghost commentedon Jun 12, 2018
@csterritt commented on Jun 12, 2018, 1:05 AM UTC:
@xster Not sure if this is useful to your question, but I just downloaded the Mac installer from flutter.io, I didn't build from github or anything like that.
Thanks for the quick responses!
ghost commentedon Jun 12, 2018
@devoncarew commented on Jun 12, 2018, 5:57 PM UTC:
I suspect this is coming from a native tool that we're invoking? In anticipation of that, I'm going to route this to the flutter/flutter repo as a flutter_tools issue.
jaxondu commentedon Jul 19, 2018
I encounter this same message when running on a friend's Mac where the machine user account I signed in has no admin access. On terminal
flutter create myapp
, cd to myapp andflutter run
. The basic template app can run fine on iOS simulator. Next I try to use Visual Studio Code. No luck only blank white screen on the Simulator.zoechi commentedon Jul 24, 2018
The section from the
flutter run -v
outputzoechi commentedon Jul 24, 2018
I opened XCode and got asked if I want to install additional components.
After they were installed I could
flutter run
from terminal, but from IntelliJ it still only showed a white screeneugenious commentedon Aug 15, 2018
I'm getting the same error too, in VS Code. I am running flutter from a non-admin account, using High Sierra 10.13.6.
In VS Code:
I feel this issue should be raised higher in priority. I encountered it in my first hour of using flutter, I think there's an issues label for that? It blocks the hot reloading functionality for me.
A more accurate title for this issue might be: "Hot reloading broken for iOS simulator when user is not admin".
The exact error is easy to reproduce in terminal:
If I were to venture a guess at what the problem is, it seems that the "stream" feature of the /usr/bin/log utility can only be used by an admin user. This might be a recent change in MacOS.
I'm not sure how this feature is used by flutter, it's not clear why the log output is being dumped to /dev/null.
At any rate, the current workaround (your developer account needs to be an admin account) is clearly undesirable.
AskYous commentedon Aug 21, 2018
I had this problem too. I solved it (somehow) by adding the following to my
~/.bash_profile
:Then running
flutter run
in a terminal window (as opposed to Android Studio). Mines works now. Idk why.DanTup commentedon Aug 22, 2018
The issues seems to be in this code:
flutter/packages/flutter_tools/lib/src/ios/simulators.dart
Lines 465 to 476 in 18e7549
For iOS >= 11 we call
/usr/bin/log stream
which doesn't work for non-admins. Trying to find answers, I found lots of people complaining that Xcode is broken after this upgrade for non-Admins too (and the fixes all seem hit and miss).(cc @cbracken - it was a while ago, but you worked on this in #12079 - do you know if there might be any alternatives?)
34 remaining items
[-]Odd logging error message with IntelliJ, "log: Must be admin to run 'stream' command"[/-][+]Reading iOS logs requires sudo access: "log: Must be admin to run 'stream' command"[/+]leogny commentedon Jan 23, 2020
Struggled with this problem for a good two weeks.
Deleting flutter/bin/cache solved the issue.
preetjdp commentedon Feb 6, 2020
Hi are there any updates to this.
As is @ryanheise I'm trying to get this working with MacInCloud.
And the solution that @keng42 suggested will not work as MacInCloud does not give "sudo" access.
cfanatic commentedon Apr 4, 2020
God, I am so glad I stumbled over this advice after half a day of troubleshooting while trying to proceed on https://flutter.dev/docs/get-started/test-drive?tab=vscode. I was always getting a white screen on my simulated iOS device. After making sure that log runs with sudo, I was able to get the app to run and test hot reload.
My setup:
[✓] Flutter (Channel stable, v1.12.13+hotfix.9, on Mac OS X 10.15.4 19E266, locale en-DE)
[✓] Xcode - develop for iOS and macOS (Xcode 11.4)
[✓] VS Code (version 1.43.2)
[✓] Connected device (1 available)
zanderso commentedon Apr 6, 2020
@christopherfujino @jmagman any advice on this issue?
jmagman commentedon Apr 6, 2020
This doesn't work for real devices anyway. I wonder if there are permission issues with switching this to
xcrun simctl spawn <device-id> log stream
for simulators?lock commentedon Apr 25, 2020
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.