Today, I upgraded iOS13 and found that my project could not be debugged.
Automatically signing iOS for device deployment using specified development team in Xcode project: 35DV8GEMR8
Running pod install...
Running Xcode build...
Xcode build done. 17.5s
Installing and launching...
Checking for advertised Dart observatories...
After using Flutter run, the project will be stuck here with a black screen on the mobile screen.
This project runs well on iOS 12. I didn't find any information in issues. When can iOS 13 be adapted?
iPhone 7 Plus
[✓] Flutter (Channel dev, v1.10.5, on Mac OS X 10.14.6 18G95, locale zh-Hans-CN)
• Flutter version 1.10.5 at /Users/haoyi/flutter
• Framework revision 3cf88fed6d (4 days ago), 2019-09-18 23:09:41 -0400
• Engine revision 33ad6757e8
• Dart version 2.6.0 (build 2.6.0-dev.0.0 cb80ea7ba9)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/haoyi/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: /Users/haoyi/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/191.5791312/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.0, Build version 11A420a
• CocoaPods version 1.6.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 3.5)
• Android Studio at /Users/haoyi/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/191.5791312/Android
Studio.app/Contents
• Flutter plugin version 39.0.3
• Dart plugin version 191.8423
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[!] IntelliJ IDEA Ultimate Edition (version 2019.2.2)
• IntelliJ at /Users/haoyi/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• For information about installing plugins, see
https://flutter.dev/intellij-setup/#installing-the-plugins
[✓] VS Code (version 1.38.0)
• VS Code at /Users/haoyi/Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.4.1
Can you please try it on the master channel?
Can you please try it on the master channel?
I have the exact same problem running on master channel
BTW. The app starts if I am running it from the command line.
Sorry for spamming but found a work around.
@akeblom are you on the latest version of the master branch?
Have you tried if it works with VS code?
Yes on the latest. Now it works on VSCode. After I did that trick with starting the app without debug mode in Android Studio.
If you restart your machine and try directly in VS code what happens then?
If it still doesn't work, please run
flutter run -debug -v
And check if your flutter plugins vor VS code and AS are on the latest version
Yes, latest!
I did update xcode today. After that the problem appeared.
Ah, so after update on Xcode 11 good to no
could you please do
flutter run -debug -v
and attach the log here if it again hangs
yeah sure! I will try to restart and go directly to VSCode when I have time!
Same here with iPhone XS. All updates done but still no console output in Android Studio.
@akeblom are you saying that this issue only occurs when starting an app from Android Studio? Can you confirm @IRIG & @39499740?
@devoncarew I recently changed flutter run
to use mDNS to discover the flutter application's observatory port--could this have broken the Android Studio plugin?
It's certainly possible. We rely on the information reported via flutter run --machine
- the IDE communicates with flutter_tools over stdio via the daemon protocol.
If it breaks Android Studio, it would also effect IntelliJ and VS Code. It should be possible to bisect the breakage - to either use git bisect
, or to try flutter both before and after your commit, to see if it's the issue.
The commit before your's was 431b82fda8fc568cee1bef9ec140f632f9d3529b, so git checkout 431b82fda8fc568cee1bef9ec140f632f9d3529b
and running any flutter command, then re-starting Android Studio should let us know whether a newer commit introduced an issue.
Hmm, I can confirm that (at least for me), on an iPhone Xr with iOS 13 that Android studio works with hot reload...
So I have an iPhone XS on iOS 13.1 and tried the flutter run --debug -v
I'm having the same problem. I'm on master
This is part of the log because it's really huge.
[ ] Updating files
[ +116 ms] Error writing "build/flutter_assets/FontManifest.json" to DevFS: OS Error: Connection reset by peer, errno = 54
[ +1 ms] Could not update files on device: OS Error: Connection reset by peer, errno = 54
[ +2 ms] Syncing files to device Luiz França's iPhone... (completed in 7,275ms, longer than expected)
[ +1 ms] "flutter run" took 79,550ms.
#0 throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:485:7)
<asynchronous suspension>
#2 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:527:18)
#3 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#4 _rootRunUnary (dart:async/zone.dart:1132:38)
#5 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#6 _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#7 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#8 Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#9 Future._completeWithValue (dart:async/future_impl.dart:522:5)
#10 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:30:15)
#11 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:288:13)
#12 RunCommand.usageValues (package:flutter_tools/src/commands/run.dart)
#13 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#14 _rootRunUnary (dart:async/zone.dart:1132:38)
#15 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#16 _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#17 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#18 Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#19 Future._completeWithValue (dart:async/future_impl.dart:522:5)
#20 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:30:15)
#21 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:288:13)
#22 IosProject.isSwift (package:flutter_tools/src/project.dart)
#23 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#24 _rootRunUnary (dart:async/zone.dart:1132:38)
#25 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#26 _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#27 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#28 Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#29 Future._completeWithValue (dart:async/future_impl.dart:522:5)
#30 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:30:15)
#31 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:288:13)
#32 IosProject.buildSettings (package:flutter_tools/src/project.dart)
#33 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#34 _rootRunUnary (dart:async/zone.dart:1132:38)
#35 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#36 _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#37 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#38 Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#39 Future._completeWithValue (dart:async/future_impl.dart:522:5)
#40 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:30:15)
#41 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:288:13)
#42 XcodeProjectInterpreter.getBuildSettings (package:flutter_tools/src/ios/xcodeproj.dart)
#43 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#44 _rootRunUnary (dart:async/zone.dart:1132:38)
#45 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#46 _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#47 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#48 Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#49 Future._completeWithValue (dart:async/future_impl.dart:522:5)
#50 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:30:15)
#51 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:288:13)
#52 _DefaultProcessUtils.run (package:flutter_tools/src/base/process.dart)
#53 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#54 _rootRunUnary (dart:async/zone.dart:1132:38)
#55 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#56 _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#57 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#58 Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#59 Future._completeWithValue (dart:async/future_impl.dart:522:5)
#60 Future.wait.<anonymous closure> (dart:async/future.dart:400:22)
#61 _rootRunUnary (dart:async/zone.dart:1132:38)
#62 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#63 _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#64 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
#65 Future._propagateToListeners (dart:async/future_impl.dart:707:32)
#66 Future._complete (dart:async/future_impl.dart:512:7)
#67 _BufferingStreamSubscription.asFuture.<anonymous closure> (dart:async/stream_impl.dart:204:14)
#68 _rootRun (dart:async/zone.dart:1120:38)
#69 _CustomZone.run (dart:async/zone.dart:1021:19)
#70 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#71 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:389:13)
#72 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:399:15)
#73 _BufferingStreamSubscription._close (dart:async/stream_impl.dart:283:7)
#74 _SinkTransformerStreamSubscription._close (dart:async/stream_transformers.dart:96:11)
#75 _EventSinkWrapper.close (dart:async/stream_transformers.dart:23:11)
#76 _StringAdapterSink.close (dart:convert/string_conversion.dart:249:11)
#77 _Utf8ConversionSink.close (dart:convert/string_conversion.dart:300:20)
#78 _ConverterStreamEventSink.close (dart:convert/chunked_conversion.dart:80:18)
#79 _SinkTransformerStreamSubscription._handleDone (dart:async/stream_transformers.dart:141:24)
#80 _rootRun (dart:async/zone.dart:1120:38)
#81 _CustomZone.run (dart:async/zone.dart:1021:19)
#82 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#83 _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:389:13)
#84 _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:399:15)
#85 _BufferingStreamSubscription._close (dart:async/stream_impl.dart:283:7)
#86 _SyncStreamControllerDispatch._sendDone (dart:async/stream_controller.dart:772:19)
#87 _StreamController._closeUnchecked (dart:async/stream_controller.dart:629:7)
#88 _StreamController.close (dart:async/stream_controller.dart:622:5)
#89 _Socket._onData (dart:io-patch/socket_patch.dart:1836:21)
#90 _rootRunUnary (dart:async/zone.dart:1136:13)
#91 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#92 _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#93 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#94 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#95 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:764:19)
#96 _StreamController._add (dart:async/stream_controller.dart:640:7)
#97 _StreamController.add (dart:async/stream_controller.dart:586:5)
#98 new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1384:35)
#99 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:890:18)
#100 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#101 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#102 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
#103 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)
@akeblom您是说这个问题仅在从Android Studio启动应用程序时发生吗?您可以确认@IRIG和@ 39499740吗?
@akeblom您是说这个问题仅在从Android Studio启动应用程序时发生吗?您可以确认@IRIG和@ 39499740吗?
Yes, I had bugs when I was developing with Android Studio.
Xcode11
AS3.5
Flutter plugin 39.0.3
Dart pluin 191.8423
IOS 13
IPhone 7 Plus
@luizfranca that looks like this
I wonder if these are the same issue.
@akeblom are you saying that this issue only occurs when starting an app from Android Studio? Can you confirm @IRIG & @39499740?
Nope. This was in both Android studio and VSCode when running debug mode
I faced same problem
flutter run
on ios13.1 device
[✓] Flutter (Channel unknown, v1.9.1+hotfix.3, on Mac OS X 10.14.6 18G95, locale ja-JP)
• Flutter version 1.9.1+hotfix.3 at /Users/sekizawakeisuke/github/flutter/flutter
• Framework revision a72edc2706 (10 hours ago), 2019-09-25 15:41:01 -0700
• Engine revision b863200c37
• Dart version 2.5.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/sekizawakeisuke/Library/Android/sdk
• Android NDK at /Users/sekizawakeisuke/Library/Android/sdk/ndk-bundle
• Platform android-29, build-tools 29.0.2
• Java binary at: /Users/sekizawakeisuke/Library/Application
Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/191.5791312/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.0, Build version 11A420a
• CocoaPods version 1.8.0
[✓] Android Studio (version 3.5)
• Android Studio at /Users/sekizawakeisuke/Library/Application
Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/191.5791312/Android Studio.app/Contents
• Flutter plugin version 39.0.3
• Dart plugin version 191.8423
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.2.3)
• IntelliJ at /Users/sekizawakeisuke/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
• Flutter plugin version 39.0.5
• Dart plugin version 192.6262.58
I test the v1.9.1+hotfix.3 (Channel beta) version, but some issues still remained.
Editor: VSCode
1)Created the counter sample project from VSCode.
run by pressing ‘F5’ key then output waiting at:
Launching lib/main.dart on my-iphone in debug mode...
Signing iOS app for device deployment using developer identity: "iPhone Developer: my-apple-id"
Xcode build done. 15.3s
Checking for advertised Dart observatories...
And app is blank screen for several minutes.
2)Stopped the app and run 'flutter run —verbose’ from terminal in VSCode.
App started magically and widgets shown OK,.
and console stay at:
[ +117 ms] Process 327 detached
[ +64 ms] Application launched on the device. Waiting for observatory port.
[ +3 ms] Checking for advertised Dart observatories...
[+5020 ms] mDNS lookup failed, attempting fallback to reading device log.
[ ] Waiting for observatory port.
3)Then I run by pressing ‘F5’ key again, app shows blank screen again.
Analyzing flutter_hotfix3...
No issues found! (ran in 1.9s)
[✓] Flutter (Channel beta, v1.9.1+hotfix.3, on Mac OS X 10.14.6 18G95, locale zh-Hans-CN)
• Flutter version 1.9.1+hotfix.3 at /Users/username/tools/flutter
• Framework revision a72edc2 (5 hours ago), 2019-09-25 15:41:01 -0700
• Engine revision b863200c37
• Dart version 2.5.0
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/username/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = /Users/username/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.0, Build version 11A420a
• CocoaPods version 1.7.5
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 39.0.3
• Dart plugin version 191.8423
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] VS Code (version 1.38.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.4.1
[✓] Connected device (1 available)
• sun-iphone • xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx • ios • iOS 13.1
• No issues found!
And is it related to this?
My .bash_profile(macOS 10.14.6 (18G95))
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
I'm facing the same issue. flutter run
doesn't work with both Android Studio and terminal. Here is the log:
[ +28 ms] (lldb) command script import
"/tmp/0E724187-9F09-4179-A41E-32430925E235/fruitstrap_ce0f26bcbaf255e35ccd434298
a3344c08bf5f19.py"
[ +4 ms] (lldb) command script add -f
fruitstrap_ce0f26bcbaf255e35ccd434298a3344c08bf5f19.connect_command connect
[ ] (lldb) command script add -s asynchronous -f
fruitstrap_ce0f26bcbaf255e35ccd434298a3344c08bf5f19.run_command run
[ ] (lldb) command script add -s asynchronous -f
fruitstrap_ce0f26bcbaf255e35ccd434298a3344c08bf5f19.autoexit_command autoexit
[ ] (lldb) command script add -s asynchronous -f
fruitstrap_ce0f26bcbaf255e35ccd434298a3344c08bf5f19.safequit_command safequit
[ ] (lldb) connect
[ +28 ms] (lldb) run
[ +186 ms] success
[ ] (lldb) safequit
[ +122 ms] Process 372 detached
[ +59 ms] Application launched on the device. Waiting for observatory port.
[ +2 ms] Checking for advertised Dart observatories...
[+5017 ms] mDNS lookup failed, attempting fallback to reading device log.
[ +1 ms] Waiting for observatory port.
iPad OS 13.1, Xcode 11, Flutter (Channel master, v1.10.7-pre.23)
Waiting for any workaround...
@christopherfujino It looks like the mDNS lookup is failing for some users, then falling back on log-scraping fails as expected on iOS 13. Is there any way to kick the device or host machine to get the mDNS lookup to work?
/cc @tvolkert @DanTup
Is there any instrumentation we could add to a local branch that people could run off of to help track this down?
v1.9.1+hotfix.3
(Channel beta
) version:
I try to run an example project of connectivity plugin with device (iOS 13.1)
2nd one
is same as this issue here)installing and launching...
with log in DEBUG CONSOLE
:Running "flutter pub get" in example... 0.6s
Launching lib/main.dart on iPhone in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: 793HUB9LD9
Xcode build done. 16.0s
Checking for advertised Dart observatories...
The device show whole white screen
without anything.
Not sure what's going on.
flutter run
with log:$ flutter run
Launching lib/main.dart on iPhone in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: 793HUB9LD9
Running pod install... 1.9s
Running Xcode build...
├─Assembling Flutter resources... 6.7s
└─Compiling, linking and signing... 5.6s
Xcode build done. 14.6s
Checking for advertised Dart observatories...
Installing and launching...
The content on device display well.
the Wifi IP is show correct address 192.168.X.X
at first time, but show error
when close wifi and open wifi again.
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v1.9.1+hotfix.3, on Mac OS X 10.14.6 18G95, locale en-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
[✓] Android Studio (version 3.4)
[✗] Cannot determine if IntelliJ is installed
✗ Directory listing failed
[✓] VS Code (version 1.38.1)
[✓] Connected device (1 available)
My suspicion is that package:multicast_dns is not resilient enough against non-utf8 data in query responses.
I have created a branch of Flutter that will pull a patched version of the package that includes a fallback and instrumentation that should help determine whether this is the case:
https://github.com/zanderso/flutter/tree/use-patched-multicast-dns
@monkingame @vysotsky if you are able to clone this repo and give it a try that would be very helpful.
@monkingame @vysotsky the following steps should get you a working copy of @zanderso's local branch:
git clone [email protected]:zanderso/flutter.git flutter-debug
cd flutter-debug
git checkout use-patched-multicast-dns
./bin/flutter doctor
./bin/flutter run -v
@zanderso @tvolkert
I got error when git clone:
git clone [email protected]:zanderso/flutter.git flutter-debug
Cloning into 'flutter-debug'...
The authenticity of host 'github.com (52.74.223.119)' can't be established.
RSA key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxx.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,52.74.223.119' (RSA) to the list of known hosts.
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
I changed to run :
git clone https://github.com/zanderso/flutter.git flutter-debug
Now it is OK.
Here is steps and logs:
cd ~/tmp
git clone https://github.com/zanderso/flutter.git flutter-debug
cd flutter-debug/
git checkout use-patched-multicast-dns
./bin/flutter doctor
cd /Users/username/test/flutter_hotfix3
~/tmp/flutter-debug/bin/flutter run -v
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel use-patched-multicast-dns, v0.0.0-unknown, on Mac OS X 10.14.6 18G95, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.38.1)
[✓] Connected device (1 available)
[ +23 ms] Warning! The 'flutter' tool you are currently running is from a different Flutter repository than the one
last used by
this package. The repository from which the 'flutter' tool is currently executing will be used instead.
running Flutter tool: /Users/username/tmp/flutter-debug
previous reference : /Users/username/tools/flutter
This can happen when you have multiple copies of flutter installed. Please check your system path to verify
that you are
running the expected version (run 'flutter --version' to see which flutter is on your path).
[ +13 ms] executing: [/Users/username/tmp/flutter-debug/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +26 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ ] f05a95faca35428aba52a836f1f9ec1c97da4f76
[ ] executing: [/Users/username/tmp/flutter-debug/] git describe --match v*.*.* --first-parent --long --tags
[ +118 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[ ] v0.0.20-alpha-11629-gf05a95fac
[ +2 ms] Could not interpret results of "git describe": v0.0.20-alpha-11629-gf05a95fac
[ +3 ms] executing: [/Users/username/tmp/flutter-debug/] git rev-parse --abbrev-ref --symbolic @{u}
[ +11 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] origin/use-patched-multicast-dns
[ ] executing: [/Users/username/tmp/flutter-debug/] git ls-remote --get-url origin
[ +11 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] https://github.com/zanderso/flutter.git
[ +9 ms] executing: [/Users/username/tmp/flutter-debug/] git rev-parse --abbrev-ref HEAD
[ +11 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] use-patched-multicast-dns
[ +13 ms] executing: /usr/bin/xcode-select --print-path
[ +11 ms] Exit code 0 from: /usr/bin/xcode-select --print-path
[ ] /Applications/Xcode.app/Contents/Developer
[ +1 ms] executing: /usr/bin/xcodebuild -version
[ +102 ms] Exit code 0 from: /usr/bin/xcodebuild -version
[ ] Xcode 11.0
Build version 11A420a
[ +54 ms] executing: /Users/username/Library/Android/sdk/platform-tools/adb devices -l
[ +7 ms] Exit code 0 from: /Users/username/Library/Android/sdk/platform-tools/adb devices -l
[ ] List of devices attached
[ +16 ms] executing: /Users/username/tmp/flutter-debug/bin/cache/artifacts/libimobiledevice/idevice_id -h
[ +198 ms] /usr/bin/xcrun simctl list --json devices
[ +150 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ +2 ms] Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
[ +5 ms] executing: zip -T
/Users/username/tmp/flutter-debug/bin/cache/downloads/storage.flutter-io.cn/flutter_infra/flutter/1060cfc7daae8121b0ef
1d23df74a7cac98af1af/ios/artifacts.zip
[ +6 ms] Downloading ios tools...
[ +4 ms] Downloading:
https://storage.flutter-io.cn/flutter_infra/flutter/1060cfc7daae8121b0ef1d23df74a7cac98af1af/ios/artifacts.zip
[+2578 ms] Received response from server, collecting bytes...
update:
The app started up very well after a long time(almost 20 minutes).
And no error occured.
[ ] Updating files
[ +124 ms] DevFS: Sync finished
[ ] Syncing files to device sun-iphone... (completed in 5,480ms, longer than expected)
[ ] Synced 0.9MB.
[ +1 ms] Sending to VM service: _flutter.listViews({})
[ +2 ms] Result: {type: FlutterViewList, views: [{type: FlutterView, id: _flutterView/0x106802620, isolate: {type:
@Isolate, fixedId: true, id: isolates/200361009008459, name: main.dart$main-200361009008459, number: 200361009008459}}]}
[ ] <- accept
[ ] Connected to _flutterView/0x106802620.
[ +2 ms] 🔥 To hot reload changes while running, press "r". To hot restart (and rebuild state), press "R".
[ ] An Observatory debugger and profiler on sun-iphone is available at: http://127.0.0.1:1040/Y1-ZQXKfjgg=/
[ ] For a more detailed help message, press "h". To detach, press "d"; to quit, press "q".
It looks like there was a network hiccup while downloading the artifacts, and the additional instrumentation did not run. Maybe try again? Thanks!
Now it is OK.
For a long long time , app started OK.
Everything is OK.
[ ] Updating files
[ +124 ms] DevFS: Sync finished
[ ] Syncing files to device sun-iphone... (completed in 5,480ms, longer than expected)
[ ] Synced 0.9MB.
[ +1 ms] Sending to VM service: _flutter.listViews({})
[ +2 ms] Result: {type: FlutterViewList, views: [{type: FlutterView, id: _flutterView/0x106802620, isolate: {type:
@Isolate, fixedId: true, id: isolates/200361009008459, name: main.dart$main-200361009008459, number: 200361009008459}}]}
[ ] <- accept
[ ] Connected to _flutterView/0x106802620.
[ +2 ms] 🔥 To hot reload changes while running, press "r". To hot restart (and rebuild state), press "R".
[ ] An Observatory debugger and profiler on sun-iphone is available at: http://127.0.0.1:1040/Y1-ZQXKfjgg=/
[ ] For a more detailed help message, press "h". To detach, press "d"; to quit, press "q".
Should I show all the logs?
@monkingame it would be very helpful if you could post the full verbose logs, thanks!
I piped into a log file.
~/tmp/flutter-debug/bin/flutter run -v > logs.txt
Please check the attachment.
logs.txt
Hmm. I'm not seeing any of the log messages that would have indicated non-utf8 data in the mdns query response. Were there any other changes to your environment? Can you verify that flutter run -v
still fails with the unpatched tool? Thanks for all your help!
@monkingame if you go back to the regular flutter tool and it works, the cause could be that the first time you try to flutter run
on a particular version, macOS will prompt you to allow dart
to accept incoming network connections, and if you don't accept soon enough, the initial mDNS discovery will fail. Once it's been accepted, however, it should connect fine.
@zanderso No environment changed.
Here is the log run by normal flutter tools. App started OK.
I used master channel to run the app.
Flutter 1.10.7-pre.22 • channel master • https://github.com/flutter/flutter.git
Framework • revision 17e4ae135d (16 hours ago) • 2019-09-25 22:45:30 -0700
Engine • revision b3f2aad1c6
Tools • Dart 2.6.0 (build 2.6.0-dev.0.0 6c81690c3a)
Further more, I found a new problem since upgrade iPhone to iOS13.1 .
My iPhone reboot frequently when I plug line(from macbook Pro) into the iPhone.
The probability is 30%, or even higher(plug 10 times, reboot 3 times, or more).
I don't know what happened and what is the reason.
My iPhone 6S is too old ? My macBook is too old? iOS13.1 ? flutter ? VSCode ? macOS ? Xcode?
It makes me so mad.
I don't know if anyone else has the problem.
The problem didn't appear when using iOS12. I am sure.
And if use power adapter to charge , the iPhone works very well. No rebooting occurred.
@monkingame same thing for me. iPhone8( iOS13.1)
Get reboot after I debug with flutter. always reboot after few minutes when I debug with the device.
After I manually reboot the device and after that, I only debug with Xcode, then it's never reboot again.
Update: Test it again today, it seems the reboot event is gone now.(Not sure what it related to, maybe because i have switch flutter channel several times ?)
I find a solution for the problem of mine: stuck at Checking for advertised Dart observatories...
when debug from vscode
:
flutter run --debug
in console first. it should works with log output as normal.vscode
, the debug works as normal now.Launching lib/main.dart on iPhone in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: 793HUB9LD9
Running pod install... 1.6s
Running Xcode build...
├─Assembling Flutter resources... 7.2s
└─Compiling, linking and signing... 5.4s
Xcode build done. 14.4s
Checking for advertised Dart observatories...
Checking for available port on [bundle id]._dartobservatory._tcp.local
Checking for authentication code for [bundle id]._dartobservatory._tcp.local
Installing and launching... 27.3s
Syncing files to device iPhone... 1,550ms
🔥 To hot reload changes while running, press "r". To hot restart (and rebuild state), press "R".
Launching lib/main.dart on iPhone in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: 793HUB9LD9
Xcode build done. 12.9s
Checking for advertised Dart observatories...
Checking for available port on [bundle id]._dartobservatory._tcp.local
Checking for authentication code for [bundle id]._dartobservatory._tcp.local
Launching lib/main.dart on iPhone in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: 793HUB9LD9
Xcode build done. 16.0s
Checking for advertised Dart observatories...
I guess it may related the missing console output of Running Xcode build...
But after I fix this by flutter run --debug
once, I can't reproduce this problem anymore(even with flutter clean
& remove DerivedData
& directly run vscode.)
Not seeing the output from print()
statements with 1.9.1hotfix4
@lookfirst that's being tracked here https://github.com/flutter/flutter/issues/41133
I have the same problem with the latest version (channel stable).
flutter doctor -v
```
[✓] Flutter (Channel stable, v1.9.1+hotfix.4, on Mac OS X 10.14.6 18G95, locale en-PA)
• Flutter version 1.9.1+hotfix.4 at /Users/juliosena/flutter
• Framework revision cc949a8e8b (4 days ago), 2019-09-27 15:04:59 -0700
• Engine revision b863200c37
• Dart version 2.5.0
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/juliosena/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = /Users/juliosena/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.0, Build version 11A420a
• CocoaPods version 1.6.2
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 39.0.3
• Dart plugin version 191.8423
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] VS Code (version 1.38.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.5.0
[✓] Connected device (1 available)
• iPhone Julio • 5c637a7548a19fc16026637680677d7bb8839a0c • ios • iOS 13.1.2
```
I think this is fixed.
I upgraded my iPhone to iOS 13.1.1
Upgraded flutter to latest on master v1.10.7-pre.79
Updated my flutter plugin for Android Studio to 40.0.2
Dart plugin for Android Studio v191.8423
$flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.10.7-pre.79, on Mac OS X 10.14.6 18G95, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.38.1)
[✓] Connected device (1 available)
• No issues found!
Launching lib/main.dart on iPhone in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: XXXXXXXXXX
Running Xcode build...
Xcode build done. 58.3s
Installing and launching...
Checking for advertised Dart observatories...
Checking for available port on [APPID]._dartobservatory._tcp.local
Checking for authentication code for [APPID]._dartobservatory._tcp.local
Syncing files to device iPhone...
I just realized that I need to connect both the iPhone and Mac to the same network.
Confirmed for (Unrestricted) Wireless network (with internet access).
hope these helps
I have the same issue with the latest stable build. For me it's happening every time and not occasionally. App is starting fine but flutter cannot connect to it.
flutter run -v:
...
[ +111 ms] Process 417 detached
[ +48 ms] Application launched on the device. Waiting for observatory port.
[ +3 ms] Checking for advertised Dart observatories...
[+5021 ms] mDNS lookup failed, attempting fallback to reading device log.
[ ] Waiting for observatory port.
flutter doctor -v:
[✓] Flutter (Channel stable, v1.9.1+hotfix.4, on Mac OS X 10.14.6 18G103, locale en-US)
• Flutter version 1.9.1+hotfix.4 at /users/dev/flutter
• Framework revision cc949a8e8b (5 days ago), 2019-09-27 15:04:59 -0700
• Engine revision b863200c37
• Dart version 2.5.0
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /users/dev/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_SDK_ROOT = /users/dev/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.0, Build version 11A420a
• CocoaPods version 1.7.5
[!] Android Studio (version 3.3)
• Android Studio at /Applications/Android Studio.app/Contents
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
[✓] VS Code (version 1.38.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.5.1
[✓] Proxy Configuration
• HTTP_PROXY is set
• NO_PROXY is localhost,127.0.0.1,wincor-nixdorf.com,dieboldnixdorf.com
• NO_PROXY contains 127.0.0.1
• NO_PROXY contains localhost
[✓] Connected device (1 available)
• VSS-iPhone8 • 093e42141efdefbeed6284273b9851a81a6d7e52 • ios • iOS 13.1.2
! Doctor found issues in 1 category.
same issue, always same on two different machines, not "occasionally", latest lines with flutter run -v
Checking for advertised Dart observatories...
[ +11 ms] Failed to establish a debug connection with ef0396dda2bb80d5a780985d0bd3f8c0008e2550 using mdns: SocketException:
Failed to
create datagram socket (OS Error: Address already in use, errno = 48), address = , port = 5353
[ +2 ms] mDNS lookup failed, attempting fallback to reading device log.
[ ] Waiting for observatory port.
it happens with all channels from stable to master
osx 10.14.1.6
ipad 5th gen ios 13.1.2
android studio 3.5.1
intellij 2019.2
@jbnixdorf The way to debug this is likely to capture the mDNS query response packets with wireshark and send them to us. Then we can figure out why our parser doesn't like them.
@jaco-pixeldump It sounds like the problem you're hitting is a bit different. Would you mind filing a new issue. Thanks!
@zanderso , thanks #41911
@zanderso I captured the packets while starting the app and created a dump, hope it helps.
DevFS failure in https://github.com/flutter/flutter/issues/41085#issuecomment-534338377 looks the same as https://github.com/flutter/flutter/issues/19772.
I had similar issue (with iPhone X, iOS 13)
[ +56 ms] Application launched on the device. Waiting for observatory port.
[ +3 ms] Checking for advertised Dart observatories...
[+5020 ms] mDNS lookup failed, attempting fallback to reading device log.
[ ] Waiting for observatory port.
The root cause of this for me was that I had WiFi tethering enabled on my iPhone. Disabling it fixed the issue for me for now.
The root cause of this for me was that I had WiFi tethering enabled on my iPhone
That jogged my memory -- I was once seeing issues with package:appengine
whenever I used Wifi tethering, and I tracked it down to https://github.com/dart-lang/appengine/issues/87#issuecomment-517131593.
Perhaps this happens when the developer is connected to a Wifi endpoint that sets up a proxy that intercepts the TCP requests?
Same issue for me too. I opened another case here: #42999
After upgrading to macOS Catalina and iOS 13, hot reload stop working.
I had similar issue (with iPhone X, iOS 13)
[ +56 ms] Application launched on the device. Waiting for observatory port. [ +3 ms] Checking for advertised Dart observatories... [+5020 ms] mDNS lookup failed, attempting fallback to reading device log. [ ] Waiting for observatory port.
The root cause of this for me was that I had WiFi tethering enabled on my iPhone. Disabling it fixed the issue for me for now.
Same for me. I turned on my personal HotSpot and it started not working
I have the same issue - with no print logs showing as well (iPhone 7, iOS 13, Android Studio, mac OS). Works using XCode on the same device. Also works with the iOS 13 Simulator. I do not have WiFi tethering enabled on the device.
/Users/dee/Documents/Software/flutter/bin/flutter doctor --verbose
[✓] Flutter (Channel master, v1.10.15-pre.188, on Mac OS X 10.15 19A602, locale en-ZA)
• Flutter version 1.10.15-pre.188 at /Users/dee/Documents/Software/flutter
• Framework revision 584ee10c68 (5 hours ago), 2019-10-21 07:49:28 -0700
• Engine revision 8aefcd8575
• Dart version 2.6.0 (build 2.6.0-dev.8.0 a61c775db8)[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/dee/android-sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 28.0.3
• ANDROID_HOME = /Users/dee/android-sdk
• ANDROID_SDK_ROOT = /Users/dee/android-sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.1, Build version 11A1027
• CocoaPods version 1.8.4[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 40.2.2
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)[✓] IntelliJ IDEA Community Edition (version 2018.2.5)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 30.0.2
• Dart plugin version 182.4892.25[✓] Connected device (1 available)
• 4Dee • 49e980b780f06a4178b5136ddb9dc1e72ed02da3 • ios • iOS 13.1.3• No issues found!
Process finished with exit code 0
[ +116 ms] Process 3122 detached
[ +75 ms] Application launched on the device. Waiting for observatory port.
[ +4 ms] Checking for advertised Dart observatories...
[+5018 ms] No pointer records found.
[ +3 ms] mDNS lookup failed, attempting fallback to reading device log.
[ ] Waiting for observatory port.
Switching to channel Stable gives me a different issue:
Debug-iphoneos/Runner.app/Frameworks/Flutter.framework: Permission denied
@superman24-7 That's https://github.com/flutter/flutter/issues/41133.
@jbnixdorf Thanks for posting the packet capture. I'm sorry it took so long for me to have a look, but it looks like the mdns query response for the Dart VM Observatory port and authCode query are missing. The queries are in the capture, though. They look like:
325 60.052124 [source redacted] [dest redacted] MDNS 77 Standard query 0x0000 PTR _dartobservatory._tcp.local, "QM" question
The issue here might be that the query is never responded to. On the other hand if there was a response and it just wasn't in the capture for whatever reason, then it would still be useful for us to have a look at that.
Also if anyone else is seeing "mDNS lookup failed, attempting fallback to reading device log." in the logs, and is able capture the query response with wireshark, that will help us track this down.
Thanks @christopherfujino - but could the mdns failure not also cause #41133 ? From the logs I am definitely seeing the "mDNS lookup failed..." error. So, at worst, I could be getting both issues occurring - this one (#41085) as well as #41133 .
I have attached a tcpdump as requested by @jbnixdorf . Hopefully, this helps.
mdns.pcapng.zip
@superman24-7 Thanks for the capture. From the capture and the logs, it looks like the mdns query for the Observatory is timing out. I'll upload a patch that increases the timeout, and then we can see if that helps anything.
This patch increases the timeout from 5 to 30 seconds. @superman24-7 @jbnixdorf if you are able to patch it in and see if it helps that would be awesome.
@zanderso I tested it with 1.9.1+hotfix.5 and iOS 13.1.3 with 30 secs and 5 mins but that doesn't change anything.
But I observed the following (without the patch): If the Mac Mini is connected to WiFi with Proxy server and the iPhone is connected to LTE, it fails as described before. If I connect both to the WiFi with proxy it partly works: I'm able to do a hot reload, hot restart and to quit via "q", but I don't see any other logs/prints (only the hot reload/restart notification line).
I disabled cellular data so no more wifi tethering but still the problem exist. I'm using 1.9.1+hotfix.4
@zanderso - for some reason my tests do not seem to be picking up the changes in the patch. How best can I update my repo to include the patch so it's picked up by the app?
@superman24-7 You'll need to delete the file bin/cache/flutter_tools.snapshot
under your flutter directory to see the changes in the patch.
@aabanaag it looks like you might be having a different issue. The application id in the red error message looks suspicious. I believe it should be the actual name of your app there.
@jbnixdorf Thanks for the info. The missing log messages is being tracked in https://github.com/flutter/flutter/issues/41133
@zanderso I'm running a flavor on iOS so I think that should be fine. I'm able to run on a simulator without problem just the physical device.
@zanderso You are right, the missing log messages are related to #41133.
So this issue happens if the Mac and the iPhone are not in the same network and perhaps the proxy server of the Mac's Wifi matters. I'm not able to connect to another Wifi without a proxy server to test that.
In fact, if the IOS device and MAC are in the same WiFi environment, the application can work normally.
But in most cases, the following errors will occur
Error connecting to the service protocol: httpexception:, URI = http: / / 127.0.0.1:1038 / og9uiyld7dy = / WS
I have tested the patch with the timeouts and as @jbnixdorf mentioned, the issue still persists. @39499740 - unfortunately for me - even when using the same WIFI, the issue occurs every single time.
/cc @dnfield for mDNS debugging advice.
It would be helpful to check the results of:
dns-sd -Z _dartobservatory
Both before and after starting your app. Unfortunately, dns-sd
sometimes seems to do things beyond what a normal socket does. It would also be helpful to check using something like https://github.com/jstasiak/python-zeroconf - which is a pure socket implementation. If it's showing up in dns-sd
_AND_ showing up via python-zeroconf, it's a bug in our mDNS implementation. If it's showing up in dns-sd
but not via python-zeroconf, there's some strange magic going on and we might need to set some more options ont he way we advertize the port until it shows up where we expect it to.
@dnfield
In case it helps:
➜ ~ dns-sd -Z _dartobservatory
Browsing for _dartobservatory._tcp
DATE: ---Tue 29 Oct 2019---
...STARTING...
This is all that ever happens no matter when dns-sd is run. If you can give a complete example for zeroconf I can help test that, as this is happening 100% of the time in my environment.
Ah, so after update on Xcode 11 good to no
For me, this was the triggering event as well. I can build and run from Xcode, but not with flutter.
That indicates that the Flutter app is not advertising on any network interface that we can see.
This thread is a bit long and I've seen different bits of what casuses this - is it Wifi Tethering, or is it being connected to different wifi network, or is it being connected to LTE that's doing this?
I suspect that if we used the same code path as what we use for the simulator, we could force this to use the right interface all the time. The reason we only do that for simulators is that we can't support below iOS 10.0 in that case (the API was added in iOS 10).
@dnfield This is happening 100% of the time for me without tethering, with devices on the same WiFi network, on at least 4 different WiFi networks. Xcode 11 was the trigger for me too.
@stx are you by chance using an iPad? Are you connecting your device for debugging via USB or wifi?
@dnfield iPhone X + iPhone 11 Pro on iOS 13 via USB. How would I try debugging via WiFi?
iPad Pro works - iOS 13.2 on Xcode 11.2. dns-sd -Z _dartobservatory
lights up and everything works accordingly.
So looks like this might be specific to phones.
Edit: The iPad Pro is a WiFI-only model - I tried turning off cellular on the phones but the problem persists there.
Ok. Running an iPhone 11 with iOS 13, I can reproduce this as well.
And I can validate that if we switch to using the C API, it works - although unlike in the case of the simulator, we have to ask to broadcast on all interfaces.
I suspect that Apple changed the implementation of NSNetService (either by mistake or for some other intentional reason).
I think there's some way we can make this work out though.
The fix for this is to use https://developer.apple.com/documentation/dnssd/1804733-dnsserviceregister?language=objc - but that requires at least iOS 9.3, whereas we want to support down to iOS 8.0. I think I have some code that will still run on that, but I need to try to track down a device running iOS 8.0-9.2 so I can test and make sure.
Or maybe we just need to bump our minimum target. shrug
Based on what I've found, it seems like NSNetService
will no longer automatically select the network bridge created via the USB connection to the host machine. Using the C API still let's you do that - although there's some risk that Apple could break that on us in the future (especially if this was an intentional change to NSNetService, which is hard to say).
The linked patch uses the C API and broadcasts on all interfaces. But it's not compatible with iOS < 9.3 - I have some guards in there but I don't currently have access to a < 9.3 device to test to make sure that the ABI I'm including (but not using in that case) doesn't blow things up. That said, it should only affect development on physical devices (this code/ABI doesn't make it at all into release builds, and simulators get this API from the host which is almost certainly running something recent enough).
Weird.. just worked 2 days on an Flutter app. No XCode updates, no Flutter updates, no iPhone X updates and suddenly I can't log/print() anything to the terminal anymore... whats up?
Flutter doctors runs fine, no issues found!
Edit: Building from Runner.xcworkspace I can see the debug outputs in the Xcode terminal.
Changed from dev to master channel which does work for me now.
[✓] Flutter (Channel master, v1.10.15-pre.368, on Mac OS X 10.15.1 19B88, locale en-NL)
• Flutter version 1.10.15-pre.368 at /Users/me/development/flutter
• Framework revision 3cd8c3142c (8 hours ago), 2019-10-31 19:35:52 -0700
• Engine revision 8ea19b1c76
• Dart version 2.6.0 (build 2.6.0-dev.8.2 bbe2ac28c9)
But now I'm also facing issue #41133
My fix hasn't rolled into master just yet, and there seem to be some modalities that are still working for people. At any rate, the fix I just landed in the engine should roll into master sometime in the next day or two, and into dev not too long after that. We'll keep an eye on it for the next stable release as well.
Is this in master yet? I am still getting the "mDNS lookup failed, attempting fallback to reading device log." message on the flutter master channel today.
@dnfield Did your fix get rolled into master yet? This is still failing over here too. If it's not merged yet do we have any ETA?
The fix was merged yesterday.
https://github.com/flutter/flutter/pull/44150
https://github.com/flutter/engine/pull/13451 no doubt helped, but I'll reopen since it seems mDNS lookup failures are still happening on top of @dnfield's change. Reopening.
I remember there was some issue for this with hotspot on. Is anyone reproducing on current master _without_ hotspot on?
I did not test with hotspot on
@jmagman @dnfield
No hotspot on. Have a bunch of weird results from experiments, take a look.
Ran flutter run
a bunch of times on 1.10.15-pre.410.
mDNS lookup failed
failed
success
failed
failed
failed
I went into the OSX firewall and removed dart from the list and tried again:
failed
OSX asks to allow dart incoming connections, allow it, mDNS lookup failed
success
success
success
success
Removed dart from the firewall again and tried again:
OSX asks to allow dart incoming connections, allow it, mDNS lookup failed
failed (with new error, see below)
failed (with new error, see below)
failed (with new error, see below)
Ran flutter clean
and tried again:
failed (with new error, see below)
failed (with new error, see below)
failed (with new error, see below)
Rebooted, same result.
Turned firewall off, same result.
[ +66 ms] Application launched on the device. Waiting for observatory port.
[ +2 ms] Checking for advertised Dart observatories...
[+5016 ms] Checking for available port on …
[ +1 ms] Checking for authentication code for …
[ +4 ms] Attempting to forward device port 57743 to host port 1024
[ ] executing: /Users/james/Development/flutter/bin/cache/artifacts/usbmuxd/iproxy 1024 57743 00008030-000848D11EF0802E
[ +20 ms] Attempting to forward device port 57743 to host port 1025
[ ] executing: /Users/james/Development/flutter/bin/cache/artifacts/usbmuxd/iproxy 1025 57743 00008030-000848D11EF0802E
[+1006 ms] Forwarded port ForwardedPort HOST:1025 to DEVICE:57743
[ +3 ms] Installing and launching... (completed in 53.9s)
[ +4 ms] Connecting to service protocol: http://127.0.0.1:1025/491xCF4dUQU=/
[ +90 ms] Error connecting to the service protocol: HttpException: , uri = http://127.0.0.1:1025/491xCF4dUQU=/ws
[ +2 ms] "flutter run" took 139,106ms.
#0 throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:500:7)
<asynchronous suspension>
#2 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:556:18)
…
This is painful. No idea what's going on here but certainly seems like the OSX firewall or network stack might be playing a role.
[✓] Flutter (Channel master, v1.10.15-pre.410, on Mac OS X 10.15.1 19B88, locale en-US)
• Flutter version 1.10.15-pre.410 at /Users/james/Development/flutter
• Framework revision 372fe290e4 (5 hours ago), 2019-11-05 10:43:52 -0800
• Engine revision 7b968ff95f
• Dart version 2.7.0
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/james/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.2)
• Xcode at /Applications/Xcode-beta.app/Contents/Developer
• Xcode 11.2, Build version 11B44
• CocoaPods version 1.8.4
[✓] Android Studio (version 3.4)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 38.2.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[✓] VS Code (version 1.39.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.6.0
[✓] Connected device (1 available)
• Virgo • 00008030-000848D11EF0802E • ios • iOS 13.2
On the devices that this has been happening on, I think I've found the workarounds:
dart
from the macOS firewall, click allow when the network connection popup occurs after running flutter run, and then mDNS lookup failure
seems to stop.Window > Devices and Simulators
, select the device, check the box Connect via network
and then uncheck the box, and then Error connecting to the service protocol
seems to stop.It's possible that this is all luck but this strategy worked on multiple devices.
@stx The workarounds work for me also!
Btw, I downgraded to the stable channel and debugging still works with @stx workarounds in place.
Found something else interesting in case it helps. It works on a home WiFi (Eero) but not on Starbucks Google WiFi - Starbucks WiFi has mDNS lookup failures 100% of the time on my environment (yes, both devices are connected to it and have active internet connections) and I found no way to workaround or fix it. It definitely used to work there though.
More debugging.
On Starbucks WiFi:
iPhone X 13.2 - mDNS lookup failure 100% of the time
iPhone 11 Pro 13.2 - mDNS lookup failure 100% of the time
iPad Pro 9.7" 13.2 (WiFi only) - succeeds 100% of the time
On home WiFi:
iPhone X 13.2 - success 100% of the time after disabling Mac firewall
iPhone 11 Pro 13.2 - success 100% of the time after disabling Mac firewall
iPad Pro 9.7" 13.2 (WiFi only) - succeeds 100% of the time
Everything works perfectly well for me now.
Latest master branch, Xcode 11.2.1
I don’t use hotspot hack anymore... debugging works perfectly well
Can confirm that the latest version on the master channel along with xCode 11.2.1 and iOS 13.1.3 does NOT allow for debugging it hangs while waiting for the 'observatory port'. Do we have an estimate on when this will be fixed?
[✓] Flutter (Channel master, v1.11.1-pre.49, on Mac OS X 10.15.1 19B88, locale en-GB)
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/setup/#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
You may also want to add it to your PATH environment variable.[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
[!] Android Studio (not installed)
[✓] Connected device (1 available)! Doctor found issues in 2 categories.
[ +108 ms] Process 319 detached
[ +57 ms] Application launched on the device. Waiting for observatory port.
[ +3 ms] Checking for advertised Dart observatories...
[+5014 ms] No pointer records found.
[ +3 ms] mDNS lookup failed, attempting fallback to reading device log.
[ ] Waiting for observatory port.
Can this be backported to 1.9.1?
It's currently impossible to realistically develop for iOS at this point since you can't debug anything.
We need a backport on the current stable releases.
I can still confirm that the latest master version is still showing the same error. Do we have an ETA on a fix for this as testing anything native on iOS is near enough impossible.
I have the same issue. The app loads, but flutter dev tools are not enabled. For example, flutter "hot reload" and "hot restart "are grayed out and not clickable. I tried reinstall flutter and android studio but still no fix for it.
FYI. this occurred when I updated my macOS to Catalina.
Any workaround or updates?
I ended up disabling the firewall and it fixed the issue for me.
In Preferences > Security and privacy > Firewall > Disable the firewall
I have the issue on stable and beta even if my firewall has always been disabled (Xcode 11, iOS 13).
I can't switch to master for obvious reasons.
I've tested this extensively on master and found two failure points for iPhone debugging: Mac settings and WiFi settings.
There are 3 workarounds I've found to address the different failure modes:
Disable MacOS firewall. Having the macOS firewall turned on eventually makes mDNS lookup fail, for whatever reason. Deleting dart from the firewall and re-adding it when prompted will alleviate this problem temporarily, but it will eventually return. Might be happening after flutter upgrade
.
Use a different WiFi network. Certain WiFi networks result in mDNS lookup failures 100% of the time. This never used to happen, and as far as I can tell was a problem introduced at the same time. Seems to happen most often on public WiFi.
Use an iPad for iOS debugging. My 9.7" WiFi-only iPad Pro magically avoids the above two issues for some reason, but all of my iPhones experience them.
@stx Thanks for the workarounds, but unfortunately, switching to master is not possible right now.
In my case, apart the fact that I am using the stable (same results in the beta channel):
It's still not working :/
I will try in master tonight, and if it works, I really hope it will land on stable asap. It should have been pushed as a hotfix as iOS debugging on a real device is impossible !
@nashfive
My version is channel stable, v1.9.1 + hotfix. 6
I found that when the iPhone and MAC are not in the same network segment, this problem can be solved
Now when I developed it, the iPhone and MAC were not in the same network segment, and dart devtools was used for debugging, because now the console can't print any valid information
Reply from translation software
I can confirm that at least on master turning off the wifi on our iPhones allows us to debug within VSCode on our mac's.
Would be good still to understand when these fixes will be rolled into stable so that we can use move back to that branch.
@john-yick
Just make sure that the Mac and iPhone are not in the same IP address segment
After the WiFi is turned off, sometimes the card will appear in the
Checking for advertised Dart observatories...
Black screen in the future
Reply from translation software
@39499740
Correct I think that would work too if we had separate VLANS, but since our macbook's are on the same wifi as our phones they are all within the same ip block range.
Turning off the wifi is fine as a temporary fix, but the root cause does still need to be fixed.
I'm kind of astonished this isn't a bigger deal... it has made debugging on iPhones impossible in many different network environments and I've found no workaround for that. Used different devices, computers, OS, etc.
Turning off WiFi on the iPhones didn't solve anything for me.
Is this still on track for November?
@stx so the only way we got it to work is by using the latest version of Catalina/xCode/iOS or we also got it working on Mojave as well but only on iOS 12. In either instance we needed to use the master branch and turn off the wifi on our iPhones to get the code running.
Is there any word from the core development team on how this can be fixed as this does seem to be a long standing issue that affects iOS.
@stx @john-yick
Put the iPhone and MAC in different network segments and you can debug them
The way I use now is to manually set the IP for Mac, manually set the WAN port IP with a router, and then connect the router with my mobile phone.
Now my mobile IP is 192.168.1.105
Mac IP is 192.168.0.234
@john-yick Thanks! For some reason, that isn't working for me.
@39499740 Appreciated, but doesn't work on network environments that you don't control.
But I just found a new bizarre workaround, that I think works everywhere: disable WiFi on Mac, enable iPhone tethering, and make sure that the iPhone USB network interface is active. See below:
iPhone can be connected to WiFi or not, this strategy has been working with every debug run.
@stx also forgot to mention disable the wifi sync for iTunes as that used to cause issues as well.
Simpler workaround: prioritize the iPhone USB connection. See below.
This also seems to completely avoid this problem... so far!
Unfortunately, none of the mentioned workarounds seem to work for me.
Channel master, v1.12.14-pre.11, on Mac OS X 10.15.1 19B88
Framework revision 92b0ceaaa6 (38 minutes ago), 2019-11-26 01:19:51 -0500
Engine revision 05f8c8b24b
Dart version 2.7.0
[✓] Flutter (Channel stable, v1.9.1+hotfix.6, on Mac OS X 10.15.1 19B88, locale da-DK)
• Flutter version 1.9.1+hotfix.6 at /Users/myUser/Desktop/flutter
• Framework revision 68587a0916 (3 months ago), 2019-09-13 19:46:58 -0700
• Engine revision b863200c37
• Dart version 2.5.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/arditgashi/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.2.1, Build version 11B500
• CocoaPods version 1.8.4
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 41.1.2
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
What ended up working for me was reinstalling flutter, dart and android studio.
After that, I gave full permissions in the disk (sorry for the danish language):
After that, I made sure my SDK was set up correctly for Flutter and Dart.
What worked for me was then disabling the firewall as mentioned before. I hope this helps a bit.
My iPhone runs on 13.1.3, and my mac has the newest Catalina update.
It is clearly not related to the install of Android Studio, Dart of Flutter, so no need to waste time to reinstall all your environment.
It seems that both Apple & Flutter have done changes on the network level, and depending on your current network setup, you'll get the error.
With exactly the same setup, I can now debug iOS apps on iOS 13 devices from the stable channel when I am on my home network. But, when I try to do the same on the corporate network, it fails 100% of the time. I haven't figured out what is blocking the discovery and will investigate it more once the stable channel will get the changes from master.
Did you solve this problem? I'm using a virtual machine with macOs, and an iPhone 11 with ios 13.2.3 and Xcode 11.2.1 but I'm facing with this problem. Every time I start with VSCode with or without debug it stuck in a white screen and console says Checking for advertised Dart observatories...
@TheFedex87 Nope. Problem is still there for me and it's very annoying. I can't debug anymore with any iOS 13 devices. None of the _workarounds_ listed here has fixed the issue (no observatories found using mdns)...
The only workaround that works for me is debugging on iOS 12 devices. Hopefully, this still works!
But I have only this iPhone 11 with ios 13 :(
@christopherfujino I've noticed that debugging on an iOS 11 device works (the app is installed, launched and I can see debug logs), even though I have the error:
Checking for advertised Dart observatories...
Failed to establish a debug connection with b2c9e055f27e90fbe8cfd39f2276ef5ddfd2765d using mdns: Exception: Did not find a observatory port advertised for $(APP_ID).
Syncing files to device iPhone8...
[main] (10:15:51) Initialize app with VAL environment
Switching to an iOS 13 device, the debug launch is stuck after the error, the app is launched but stuck forever. No debug log, nor timeout...
I tried to install Catalina, and here it seems to work. Or to be precise it doesn't stuck in the blank screen and "Checking for advertised Dart observatories" after it run, but I don't have the print in the debug console...But at least I'm able to debug and add breakpoints to it.
I am, unfortunately, no longer clear on the status of this bug. It seems like something that can come up in a number of different ways (e.g. different network configurations, different device types, different iOS versions, macOS versions, etc).
I'm also not reproducing this issue locally anymore.
@dnfield Indeed, this is getting messy :/
@TheFedex87
Yeah, I checked on Catalina and it's working almost correctly (Xcode 11/iOS 13/flutter stable). SImple print()
statements don't output anything though.
But you can circumvent that by using the logging
package along with the log()
method from dart:developer
.
@nashfive OMG I tried again with Catalina in another PC and it doesn't work, same error. So I tried again in the PC where it worked and now it doesn't work anymore ;( ... this is annoying!!!
EDIT: maybe it was not working since I had activated hotspot when I run it
@TheFedex87 Thanks for the info. I turned off the hotspot on the iPhone X and it's working now!
Status:
iOS 13.1.3
Wifi on (using the same LAN with my Mac)
Cellular on
Hotspot off
EDIT: more details.
Lost connection to device.
Syncing files to device ***
My hunch is that there are multiple factors that affect this, which is muddying the waters of tracking the issue(s) down.
@dnfield @christopherfujino @zanderso is there any extra info gathering we could put in the tool (perhaps behind a flag... or a separate flutter command?) that would help us find a smoking gun when people run into this?
Could not update files on device: OS Error: Connection reset by peer, errno = 54
May I ask why I keep reporting this error when I use VS to debug iOS iPhone?
@wuchao110 I've hidden your comment because it appears to be an unrelated issue. Feel free to file a new issue, though.
This issue has gotten a bit crowded. I'm going to close this, and we can track at the subissues I've filed under the meta-issue here: https://github.com/flutter/flutter/issues/46705.
Most helpful comment
Can confirm that the latest version on the master channel along with xCode 11.2.1 and iOS 13.1.3 does NOT allow for debugging it hangs while waiting for the 'observatory port'. Do we have an estimate on when this will be fixed?