Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
c268b6c3
Unverified
Commit
c268b6c3
authored
Feb 14, 2020
by
Zachary Anderson
Committed by
GitHub
Feb 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] Collect more information in ios-handshake failure event (#50804)
parent
18984101
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
+20
-3
fallback_discovery.dart
packages/flutter_tools/lib/src/ios/fallback_discovery.dart
+14
-2
devices_test.dart
...es/flutter_tools/test/general.shard/ios/devices_test.dart
+6
-1
No files found.
packages/flutter_tools/lib/src/ios/fallback_discovery.dart
View file @
c268b6c3
...
...
@@ -120,13 +120,19 @@ class FallbackDiscovery {
}
on
Exception
catch
(
err
)
{
_logger
.
printTrace
(
err
.
toString
());
_logger
.
printTrace
(
'Failed to connect directly, falling back to mDNS'
);
UsageEvent
(
_kEventName
,
'failure'
).
send
();
UsageEvent
(
_kEventName
,
'failure'
,
label:
err
.
toString
(),
value:
hostPort
,
).
send
();
return
null
;
}
// Attempt to connect to the VM service 5 times.
int
attempts
=
0
;
const
int
kDelaySeconds
=
2
;
Object
firstException
;
while
(
attempts
<
5
)
{
try
{
final
VmService
vmService
=
await
_vmServiceConnectUri
(
assumedWsUri
.
toString
());
...
...
@@ -145,6 +151,7 @@ class FallbackDiscovery {
}
}
on
Exception
catch
(
err
)
{
// No action, we might have failed to connect.
firstException
??=
err
;
_logger
.
printTrace
(
err
.
toString
());
}
...
...
@@ -156,7 +163,12 @@ class FallbackDiscovery {
attempts
+=
1
;
}
_logger
.
printTrace
(
'Failed to connect directly, falling back to mDNS'
);
UsageEvent
(
_kEventName
,
'failure'
).
send
();
UsageEvent
(
_kEventName
,
'failure'
,
label:
firstException
?.
toString
()
??
'Connection attempts exhausted'
,
value:
hostPort
,
).
send
();
return
null
;
}
}
packages/flutter_tools/test/general.shard/ios/devices_test.dart
View file @
c268b6c3
...
...
@@ -384,7 +384,12 @@ void main() {
debuggingOptions:
DebuggingOptions
.
enabled
(
const
BuildInfo
(
BuildMode
.
debug
,
null
,
treeShakeIcons:
false
)),
platformArgs:
<
String
,
dynamic
>{},
);
verify
(
mockUsage
.
sendEvent
(
'ios-handshake'
,
'failure'
)).
called
(
1
);
verify
(
mockUsage
.
sendEvent
(
'ios-handshake'
,
'failure'
,
label:
anyNamed
(
'label'
),
value:
anyNamed
(
'value'
),
)).
called
(
1
);
verify
(
mockUsage
.
sendEvent
(
'ios-handshake'
,
'mdns-failure'
)).
called
(
1
);
verify
(
mockUsage
.
sendEvent
(
'ios-handshake'
,
'fallback-failure'
)).
called
(
1
);
expect
(
launchResult
.
started
,
isFalse
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment