Skip to content

Conversation

jonahwilliams
Copy link
Contributor

@jonahwilliams jonahwilliams commented Oct 22, 2020

Description

The flutter run failures are cause by the application occasionally taking a long time to start up. This caused the ios fallback discovery to kick in, which will always fail if the application hasn't started. Solution: remove the iOS fallback discovery and wait up to 30 seconds.

This has not proven to reduce the flakes, but it does at least remove one error case and removes code that will no longer work without the mDNS fallback.

@flutter-dashboard flutter-dashboard bot added tool Affects the "flutter" command-line tool. See also t: labels. work in progress; do not review labels Oct 22, 2020
@google-cla google-cla bot added the cla: yes label Oct 22, 2020
// "--enable-checked-mode" and "--verify-entry-points" should always be
// passed when we launch debug build via "ios-deploy". However, we don't
// pass them if a certain environment variable is set to enable the
// "system_debug_ios" integration test in the CI, which simulates a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RIP system_debug_ios I kept trying to resurrect that to test the iOS 14 launch from home screen but I couldn't get it to work. Want to delete it?
\cc @christopherfujino re #43029

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's already deleted. We can't launch from home going forward so it doesn't seem worth keeping this code aound

Copy link
Member

@jmagman jmagman Oct 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it is. #68107
I was hoping to use it to show when it's launched from the home screen on iOS 14 it shows the nice warning explaining what happened. But I couldn't get it to work.

@@ -132,12 +129,6 @@ void main() {
final IOSDevice device = setUpIOSDevice(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove // Still uses context for analytics.
I know this isn't the right line but GitHub doesn't let me comment closer.

packageId: packageId,
packageName: FlutterProject.current().manifest.appName,
);
final Uri localUri = await observatoryDiscovery.uri;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will hang forever when the app crashes because the log reader will never find the VM service URI log line. That will be fixed on iOS 13+ with #68844 on top of this change. However we need to figure out how to handle <=iOS 12 crashes on launch that are syslog scanning.

I will work a bit on unifying the code paths. I tried the debugging dance on iOS 9 and it didn't work, but I didn't investigate too hard because the syslog scanning was working.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stable v 2.5.3, run on iphone x and 8 with iOS 15+ , after install and launching still got observatory timeout log and then stuck for about 90s to get the writing analzed variants log, then main page shows, here's the log blow
Running Xcode build...
Xcode build done. 21.0s
Installing and launching...
iOS Observatory not discovered after 30 seconds. This is taking much longer than expected...
(lldb) 2021-11-18 10:40:33.805817+0800 Runner[5156:2537590] Writing analzed variants.
Debug service listening on ws://127.0.0.1:49248/s6cQ7AOhIgE=/ws

@jonahwilliams jonahwilliams requested a review from jmagman October 29, 2020 23:00
@jonahwilliams
Copy link
Contributor Author

Updated to remove globals and added a 30 second timeout to observatory discovery

Copy link
Member

@jmagman jmagman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM let's see what happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants