Code Monkey home page Code Monkey logo

Comments (9)

Andrew-Bekhiet avatar Andrew-Bekhiet commented on June 26, 2024 1

Ok great, I will close this issue and open an issue in Android SDK later
I will wait for christopherfujino opinion on this, then maybe open an issue in flutter repo

from dart-code.

DanTup avatar DanTup commented on June 26, 2024

This should be reported at https://github.com/flutter/flutter/ since the issue is happening in the flutter tool itself and won't be fixable here:

[☠] Connected device (the doctor check crashed)
   ✗ Due to an error, the doctor check did not complete. If the error message below is not helpful,
            please let us know about this issue at https://github.com/flutter/flutter/issues.
   ✗ Error: Unable to run "adb", check your Android SDK installation and ANDROID_HOME environment variable:
            /home/androidq/Android/Sdk/platform-tools/adb

Coincidentally, @andrewkolos made some changes in Flutter recently to try to record more information when these kinds of exceptions occur, but it's currently only on the master channel and I'm not sure if it's surfaced from flutter doctor. Maybe he can confirm.

(@andrewkolos it's very possible that the issue here is exactly the one you are seeing in flutter/flutter#125971 (comment)?).

from dart-code.

andrewkolos avatar andrewkolos commented on June 26, 2024

Yes, once the change lands in the stable channel, we'll get more information about these exceptions (which is included in flutter doctor output).

from dart-code.

DanTup avatar DanTup commented on June 26, 2024

@Andrew-Bekhiet if you can reliably reproduce this issue and are comfortable temporarily switching to Flutter's master channel, you might be able to capture more information about the error that might confirm whether it's the same issue noted above.

from dart-code.

Andrew-Bekhiet avatar Andrew-Bekhiet commented on June 26, 2024

Sure

New output from 'flutter doctor'

/media/androidq/data/flutter/bin/flutter doctor -v

[✓] Flutter (Channel master, 3.22.0-31.0.pre.24, on Ubuntu 23.10 6.5.0-28-generic, locale en_US.UTF-8)
    • Flutter version 3.22.0-31.0.pre.24 on channel master at /media/androidq/data/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision e5f7800171 (19 minutes ago), 2024-05-13 07:37:27 -0400
    • Engine revision 0050bf9a80
    • Dart version 3.5.0 (build 3.5.0-148.0.dev)
    • DevTools version 2.36.0-dev.5

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /home/androidq/Android/Sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /home/androidq/android-studio/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • Ubuntu clang version 16.0.6 (15)
    • cmake version 3.27.4
    • ninja version 1.11.1
    • pkg-config version 1.8.1

[✓] Android Studio (version 2023.2)
    • Android Studio at /home/androidq/android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

[✓] VS Code (version 1.89.1)
    • VS Code at /usr/share/code
    • Flutter extension version 3.89.20240501

[☠] Connected device (the doctor check crashed)
    ✗ Due to an error, the doctor check did not complete. If the error message below is not helpful, please let us know about this issue at https://github.com/flutter/flutter/issues.
    ✗ Error: Unable to run "adb", check your Android SDK installation and ANDROID_HOME environment variable: /home/androidq/Android/Sdk/platform-tools/adb
      Error details: Process exited abnormally with exit code 1:
      * daemon not running; starting now at tcp:5037
      ADB server didn't ACK
      Full server startup log: /tmp/adb.1000.log
      Server had pid: 210464
      --- adb starting (pid 210464) ---
      05-13 14:56:14.544 210464 210464 I adb     : main.cpp:63 Android Debug Bridge version 1.0.41
      05-13 14:56:14.544 210464 210464 I adb     : main.cpp:63 Version 35.0.1-11580240
      05-13 14:56:14.544 210464 210464 I adb     : main.cpp:63 Installed as /home/androidq/Android/Sdk/platform-tools/adb
      05-13 14:56:14.544 210464 210464 I adb     : main.cpp:63 Running on Linux 6.5.0-28-generic (x86_64)
      05-13 14:56:14.544 210464 210464 I adb     : main.cpp:63 
      05-13 14:56:14.544 210464 210464 I adb     : auth.cpp:416 adb_auth_init...
      05-13 14:56:14.545 210464 210464 I adb     : auth.cpp:152 loaded new key from '/home/androidq/.android/adbkey' with fingerprint 2B3010E4542B30344A977C856E06156CB9032BF90E32EB577A4C6C84796F9594
      05-13 14:56:14.545 210464 210464 I adb     : auth.cpp:391 adb_auth_inotify_init...
      05-13 14:56:15.544 210464 210464 E adb     : usb_libusb.cpp:571 failed to open device: Access denied (insufficient permissions)
      05-13 14:56:15.544 210464 210464 I adb     : transport.cpp:1150 RZ8N21PFJGM: connection terminated: failed to open device: Access denied (insufficient permissions)

      * failed to start daemon
      adb: failed to check server version: cannot connect to daemon
    • #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
      #1      AndroidDevices.pollingGetDevices (package:flutter_tools/src/android/android_device_discovery.dart:75:7)
      <asynchronous suspension>
      #2      PollingDeviceDiscovery._populateDevices (package:flutter_tools/src/device.dart:548:36)
      <asynchronous suspension>
      #3      Future.wait.<anonymous closure> (dart:async/future.dart:524:21)
      <asynchronous suspension>
      #4      DeviceManager.refreshAllDevices (package:flutter_tools/src/device.dart:218:40)
      <asynchronous suspension>
      #5      DeviceValidator.validate (package:flutter_tools/src/doctor.dart:715:34)
      <asynchronous suspension>
      #6      Future.any.onValue (dart:async/future.dart:618:5)
      <asynchronous suspension>


[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

from dart-code.

DanTup avatar DanTup commented on June 26, 2024

@Andrew-Bekhiet thanks! This looks a little different to flutter/flutter#125971 (comment) since it seems less of an intermittent connectivity issue:

      05-13 14:56:14.545 210464 210464 I adb     : auth.cpp:391 adb_auth_inotify_init...
      05-13 14:56:15.544 210464 210464 E adb     : usb_libusb.cpp:571 failed to open device: Access denied (insufficient permissions)
      05-13 14:56:15.544 210464 210464 I adb     : transport.cpp:1150 RZ8N21PFJGM: connection terminated: failed to open device: Access denied (insufficient permissions)

What happens if you run /home/androidq/Android/Sdk/platform-tools/adb devices -l directly in a terminal, do you see a similar error?

from dart-code.

Andrew-Bekhiet avatar Andrew-Bekhiet commented on June 26, 2024

Yes same error

* daemon not running; starting now at tcp:5037
ADB server didn't ACK
Full server startup log: /tmp/adb.1000.log
Server had pid: 1479482
--- adb starting (pid 1479482) ---
05-13 16:39:35.358 1479482 1479482 I adb     : main.cpp:63 Android Debug Bridge version 1.0.41
05-13 16:39:35.358 1479482 1479482 I adb     : main.cpp:63 Version 35.0.1-11580240
05-13 16:39:35.358 1479482 1479482 I adb     : main.cpp:63 Installed as /home/androidq/Android/Sdk/platform-tools/adb
05-13 16:39:35.358 1479482 1479482 I adb     : main.cpp:63 Running on Linux 6.5.0-28-generic (x86_64)
05-13 16:39:35.358 1479482 1479482 I adb     : main.cpp:63 
05-13 16:39:35.358 1479482 1479482 I adb     : auth.cpp:416 adb_auth_init...
05-13 16:39:35.358 1479482 1479482 I adb     : auth.cpp:152 loaded new key from '/home/androidq/.android/adbkey' with fingerprint 2B3010E4542B30344A977C856E06156CB9032BF90E32EB577A4C6C84796F9594
05-13 16:39:35.358 1479482 1479482 I adb     : auth.cpp:391 adb_auth_inotify_init...
05-13 16:39:36.358 1479482 1479482 E adb     : usb_libusb.cpp:571 failed to open device: Access denied (insufficient permissions)
05-13 16:39:36.358 1479482 1479482 I adb     : transport.cpp:1150 RZ8N21PFJGM: connection terminated: failed to open device: Access denied (insufficient permissions)

* failed to start daemon
adb: failed to check server version: cannot connect to daemon

from dart-code.

DanTup avatar DanTup commented on June 26, 2024

@Andrew-Bekhiet thanks for confirming. In that case I think this should be reported against the Android SDK. I think the best way to report these is through the IDE or link detailed at https://developer.android.com/studio/report-bugs#report-bug

It's probably worth including the log file that's generated (your output shows "Full server startup log: /tmp/adb.1000.log").

I think it's probably also worth filing an issue in Flutter (https://github.com/flutter/flutter/) because even if ADB is completely failing and broken, perhaps it shouldn't crash the Flutter tool, maybe it should keep running and just not return any devices (maybe @christopherfujino has opinions on this.. it might make the issue less visible, but maybe the solution to that is to have a way to report errors rather than terminating?).

from dart-code.

vshvedov avatar vshvedov commented on June 26, 2024

@Andrew-Bekhiet you can start adb daemon as root -- at least it will solve the permission issue for now

from dart-code.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.