Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tool crashes when launching adb when getcwd fails with EACCES. #57166

Open
zanderso opened this issue May 13, 2020 · 0 comments
Open

Tool crashes when launching adb when getcwd fails with EACCES. #57166

zanderso opened this issue May 13, 2020 · 0 comments
Labels
c: crash Stack traces logged to the console P2 Important issues not at the top of the work list team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels. triaged-tool Triaged by Flutter Tool team

Comments

@zanderso
Copy link
Member

Sometimes when launched from an IDE, the tool can crash when the tool process does not have read/list permissions from / up to the cwd.

FileSystemException: FileSystemException: Getting current working directory failed, path = '' (OS Error: Operation not permitted, errno = 1)
  | at _Directory.current | (directory_impl.dart:49)
  | at Directory.current | (directory.dart:161)
  | at LocalFileSystem.currentDirectory | (local_file_system.dart:44)
  | at getExecutablePath | (common.dart:59)
  | at _getExecutable | (local_process_manager.dart:125)
  | at LocalProcessManager.run | (local_process_manager.dart:68)
  | at _DefaultProcessUtils.run | (process.dart:313)
  | at AndroidDevices.pollingGetDevices | (android_device_discovery.dart:54)
  | at PollingDeviceDiscovery._initTimer.<anonymous closure> | (device.dart:295)
  | at _rootRun | (zone.dart:1180)
  | at _CustomZone.run | (zone.dart:1077)
  | at _CustomZone.runGuarded | (zone.dart:979)
  | at _CustomZone.bindCallbackGuarded.<anonymous closure> | (zone.dart:1019)
  | at _rootRun | (zone.dart:1184)
  | at _CustomZone.run | (zone.dart:1077)
  | at _CustomZone.bindCallback.<anonymous closure> | (zone.dart:1003)
  | at Timer._createTimer.<anonymous closure> | (timer_patch.dart:23)
  | at _Timer._runTimers | (timer_impl.dart:398)
  | at _Timer._handleMessage | (timer_impl.dart:429)
  | at _RawReceivePortImpl._handleMessage | (isolate_patch.dart:168)

Supposing that getAdbPath (here) is giving an absolute path, the problem seems to be in package:process, which tries to grab the cwd even though the path might be absolute (here). package:process should probably skip the cwd relative search if grabbing the cwd fails.

@zanderso zanderso added c: crash Stack traces logged to the console tool Affects the "flutter" command-line tool. See also t: labels. labels May 13, 2020
@zanderso zanderso added this to Awaiting triage in Tools - command line usability review via automation May 13, 2020
@zanderso zanderso moved this from Awaiting triage to Engineer reviewed in Tools - command line usability review May 13, 2020
@jmagman jmagman added the P2 Important issues not at the top of the work list label Aug 18, 2020
@flutter-triage-bot flutter-triage-bot bot added team-tool Owned by Flutter Tool team triaged-tool Triaged by Flutter Tool team labels Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: crash Stack traces logged to the console P2 Important issues not at the top of the work list team-tool Owned by Flutter Tool team tool Affects the "flutter" command-line tool. See also t: labels. triaged-tool Triaged by Flutter Tool team
Projects
Development

No branches or pull requests

4 participants