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
4dc1bd40
Unverified
Commit
4dc1bd40
authored
Jul 26, 2022
by
Jenn Magder
Committed by
GitHub
Jul 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle updated error message when iOS device is locked (#108057)
parent
201be6bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
ios_deploy.dart
packages/flutter_tools/lib/src/ios/ios_deploy.dart
+2
-1
ios_deploy_test.dart
...flutter_tools/test/general.shard/ios/ios_deploy_test.dart
+16
-1
No files found.
packages/flutter_tools/lib/src/ios/ios_deploy.dart
View file @
4dc1bd40
...
...
@@ -22,6 +22,7 @@ import 'iproxy.dart';
const
String
noProvisioningProfileErrorOne
=
'Error 0xe8008015'
;
const
String
noProvisioningProfileErrorTwo
=
'Error 0xe8000067'
;
const
String
deviceLockedError
=
'e80000e2'
;
const
String
deviceLockedErrorMessage
=
'the device was not, or could not be, unlocked'
;
const
String
unknownAppLaunchError
=
'Error 0xe8000022'
;
class
IOSDeploy
{
...
...
@@ -520,7 +521,7 @@ String _monitorIOSDeployFailure(String stdout, Logger logger) {
logger
.
printError
(
noProvisioningProfileInstruction
,
emphasis:
true
);
// Launch issues.
}
else
if
(
stdout
.
contains
(
deviceLockedError
))
{
}
else
if
(
stdout
.
contains
(
deviceLockedError
)
||
stdout
.
contains
(
deviceLockedErrorMessage
)
)
{
logger
.
printError
(
'''
═══════════════════════════════════════════════════════════════════════════════════
Your device is locked. Unlock your device first before running.
...
...
packages/flutter_tools/test/general.shard/ios/ios_deploy_test.dart
View file @
4dc1bd40
...
...
@@ -258,7 +258,7 @@ void main () {
expect
(
logger
.
errorText
,
contains
(
'No Provisioning Profile was found'
));
});
testWithoutContext
(
'device locked'
,
()
async
{
testWithoutContext
(
'device locked
code
'
,
()
async
{
final
FakeProcessManager
processManager
=
FakeProcessManager
.
list
(<
FakeCommand
>[
const
FakeCommand
(
command:
<
String
>[
'ios-deploy'
],
...
...
@@ -273,6 +273,21 @@ void main () {
expect
(
logger
.
errorText
,
contains
(
'Your device is locked.'
));
});
testWithoutContext
(
'device locked message'
,
()
async
{
final
FakeProcessManager
processManager
=
FakeProcessManager
.
list
(<
FakeCommand
>[
const
FakeCommand
(
command:
<
String
>[
'ios-deploy'
],
stdout:
'[ +95 ms] error: The operation couldn’t be completed. Unable to launch io.flutter.examples.gallery because the device was not, or could not be, unlocked.'
,
),
]);
final
IOSDeployDebugger
iosDeployDebugger
=
IOSDeployDebugger
.
test
(
processManager:
processManager
,
logger:
logger
,
);
await
iosDeployDebugger
.
launchAndAttach
();
expect
(
logger
.
errorText
,
contains
(
'Your device is locked.'
));
});
testWithoutContext
(
'unknown app launch error'
,
()
async
{
final
FakeProcessManager
processManager
=
FakeProcessManager
.
list
(<
FakeCommand
>[
const
FakeCommand
(
...
...
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