Assigned
Status Update
Comments
ya...@gmail.com <ya...@gmail.com> #2
Hello,
Thank you very much for letting us know. I understand that you have Python and Cloud SDK installed within directories in Windows OS where the full path contains spaces. Then you noticed that Cloud SDK wouldn't find properly the Python being installed and the gcloud commands wouldn't function properly.
I have reproduced the issue and indeed the Python installation was not properly detected while I can confirm that it is installed and working as expected. I have contacted the Cloud SDK engineering team and informed them about this issue. I don't have an ETA on the resolution of this issue, however, please keep following this thread ans any further updates will be posted directly here.
Thank you very much for letting us know. I understand that you have Python and Cloud SDK installed within directories in Windows OS where the full path contains spaces. Then you noticed that Cloud SDK wouldn't find properly the Python being installed and the gcloud commands wouldn't function properly.
I have reproduced the issue and indeed the Python installation was not properly detected while I can confirm that it is installed and working as expected. I have contacted the Cloud SDK engineering team and informed them about this issue. I don't have an ETA on the resolution of this issue, however, please keep following this thread ans any further updates will be posted directly here.
sa...@google.com <sa...@google.com> #3
Comment has been deleted.
sa...@google.com <sa...@google.com> #4
I have the same problem.
https://issuetracker.google.com/issues/146458535
== gcloud.cmd L.104
!CLOUDSDK_PYTHON! -c "import sys; print(sys.version)" >nul 2>&1
==
This line fails because the command part of the line is not quoted.
I think that Probably program name have to be quoted.
==
"!CLOUDSDK_PYTHON!" -c "import sys; print(sys.version)" >nul 2>&1
==
== gcloud.cmd L.104
!CLOUDSDK_PYTHON! -c "import sys; print(sys.version)" >nul 2>&1
==
This line fails because the command part of the line is not quoted.
I think that Probably program name have to be quoted.
==
"!CLOUDSDK_PYTHON!" -c "import sys; print(sys.version)" >nul 2>&1
==
ya...@gmail.com <ya...@gmail.com> #5
Hi, sorry for the inconvenience,
Can I have the output for `where python` and `where python3` from the system?
Can I have the output for `where python` and `where python3` from the system?
sa...@google.com <sa...@google.com> #6
I'm having the same issue for Windows 10. I previously had cloud SDK installed and working with Python3. After the last SDK and windows updates though, it no longer finds the path. When I started SDK and ran any "gcloud" or "gsutil" command, I got the "python not on path" message. I've tried the below:
1) Creating a CLOUDSDK_PYTHON environment variable.
2) Changing my Path variable to various locations and also adding a PYTHONPATH variable.
3) Changing the SDK install and bat files.
Finally I just uninstalled everything and now I can't re-install SDK as it's giving me the same python not on path message. Screenshot attached. My python paths are at the top of my Path environment variable (screenshot attached). I'm out of ideas. The documentation is very confusing since 3/4 of it says that SDK ONLY works with python 2.7, and then the other 1/4 just doesn't work for me. The only thing I can think of is that technically I don't have a python.exe file in my python locations. Windows uses python launcher in which case the exe file is "C:\Windows\py.exe"
Any help is appreciated.
1) Creating a CLOUDSDK_PYTHON environment variable.
2) Changing my Path variable to various locations and also adding a PYTHONPATH variable.
3) Changing the SDK install and bat files.
Finally I just uninstalled everything and now I can't re-install SDK as it's giving me the same python not on path message. Screenshot attached. My python paths are at the top of my Path environment variable (screenshot attached). I'm out of ideas. The documentation is very confusing since 3/4 of it says that SDK ONLY works with python 2.7, and then the other 1/4 just doesn't work for me. The only thing I can think of is that technically I don't have a python.exe file in my python locations. Windows uses python launcher in which case the exe file is "C:\Windows\py.exe"
Any help is appreciated.
ya...@gmail.com <ya...@gmail.com> #7
You can ignore my post. I fixed the problem by doing the following:
1) Uninstalled python37 and windows python launcher.
2) Re-installed python37 and re-added to the environment Path variable (This re-instated my missing python.exe file also; the py.exe file is also in it's Windows location for python launcher)
3) Deleted all previous SDK folders/files. (There was one still hanging out there from my previous copy)
4) Re-downloaded SDK and UNCHECKED the python bundle checkbox. It gave me a warning message that python was not installed, but after it completed, everything works as expected.
1) Uninstalled python37 and windows python launcher.
2) Re-installed python37 and re-added to the environment Path variable (This re-instated my missing python.exe file also; the py.exe file is also in it's Windows location for python launcher)
3) Deleted all previous SDK folders/files. (There was one still hanging out there from my previous copy)
4) Re-downloaded SDK and UNCHECKED the python bundle checkbox. It gave me a warning message that python was not installed, but after it completed, everything works as expected.
sa...@google.com <sa...@google.com> #8
Comment has been deleted.
sa...@google.com <sa...@google.com> #9
We have a solution for this now and are working on testing it and will post it here soon.
While we do that, blocked users can still use 273.0.0 (https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-274.0.0-windows-x86.zip ) (32 bit) or (https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-273.0.0-windows-x86_64-bundled-python.zip ) (64 bit) and use instructions from https://cloud.google.com/sdk/docs/downloads-versioned-archives to get to a working state.
Apologies for the inconvenience, we will have the workaround and patch out soon.
While we do that, blocked users can still use 273.0.0 (
Apologies for the inconvenience, we will have the workaround and patch out soon.
ya...@gmail.com <ya...@gmail.com> #10
We have a patch for two files that are causing these problems. These apply in two cases (both on Windows):
1. A new install fails, or
2. You are unable to run gcloud after performing a components update.
For case # 1, please download the attached file install.bat, and copy it to the location where you have attempted to install gcloud, e.g. C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk. Then run it, e.g.
> cd C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk
> .\install.bat
For both cases #1 and #2, download the attached file gcloud.cmd, and copy it to the bin directory under your gcloud installation, e.g.
C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin. When prompted to replace the previous copy, type Yes. This should allow you to run gcloud without being prompted to set CLOUDSDK_PYTHON.
1. A new install fails, or
2. You are unable to run gcloud after performing a components update.
For case # 1, please download the attached file install.bat, and copy it to the location where you have attempted to install gcloud, e.g. C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk. Then run it, e.g.
> cd C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk
> .\install.bat
For both cases #1 and #2, download the attached file gcloud.cmd, and copy it to the bin directory under your gcloud installation, e.g.
C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin. When prompted to replace the previous copy, type Yes. This should allow you to run gcloud without being prompted to set CLOUDSDK_PYTHON.
ya...@gmail.com <ya...@gmail.com> #11
This work around does not appear to work. I have tried it a number of times now, I am unable to run gcloud init after the install. I deleted everything and tried it again, this time even after copying the two patch files over, the installation doesn't even begin.
sa...@google.com <sa...@google.com> #12
To de...@gmail.com, try the workaround I used as described in https://issuetracker.google.com/issues/146652183 (i.e. install without the bundled python version)
ya...@gmail.com <ya...@gmail.com> #13
wasted 2hrs for installing sdk... Claps...
and finally couldnt install sdk... Great work from u...
and finally couldnt install sdk... Great work from u...
sa...@google.com <sa...@google.com> #14
what should i do now... do u have any work around again
sa...@google.com <sa...@google.com> #15
I changed path of installation of GCloudSDK to C:/GCloudSDK and it installed successfully.
ya...@gmail.com <ya...@gmail.com> #16
I have tried what #15 suggested but to C:/GoogleCloudSDK, it works now.
Also, tried reopening project folders in Windows Subsystem for Linux (WSL) via Visual Studio Code-Remote WSL and using gcloud from within the WSL Ubuntu 18.04 distro as an alternative solution. That works too once configured.
Also, tried reopening project folders in Windows Subsystem for Linux (WSL) via Visual Studio Code-Remote WSL and using gcloud from within the WSL Ubuntu 18.04 distro as an alternative solution. That works too once configured.
Description
Host: Mac Mini M4
OS: macOS 15.2 and 15.3 Sequoia
adb: 35.0.2-12147458
Devices: Samsung S20, S21+
Devices OS: Android 11
Firmware: RP1A.200720.012
Description: We are running into
adb
server crashes when certain devices are connected to a macOS host. Theadb
server doesn't even start. However, everything is fine when these devices are connected to a Windows host running the sameadb
server version. Everything also works as expected when some of the problematic devices are disconnected from the mac machines.Logs
Troubleshooting
We upgraded
adb
server to 36.0.0 nightly build because we noticed thelibusb
backend was re-written and the crash went away. However,adb
server was still unable to communicate with some of the devices mentioned above. See logs below (we turnedlibusb
debugging on as well).It looked like for some devices I/O would not work when usinghttps://cs.android.com/android/platform/superproject/main/+/main:packages/modules/adb/client/usb_libusb_device.cpp;l=470-478
libusb_bulk_transfer()
. We narrowed the issue to the following lines of code:Calling
libusb_clear_halt()
on startup during USB interface claim call is causing some devices to not communicate properly.Digging through thehttps://sourceforge.net/p/libusb/mailman/libusb-devel/thread/1cc26359-d241-1061-4906-231ec0e28bab%40gmail.com/#msg38634913 . It seems that it's not recommended to call https://github.com/libusb/libusb/issues/1110#issuecomment-1090552757 and https://github.com/libusb/libusb/issues/1110#issuecomment-1090621211
libusb
mailing list we found the following discussionlibusb_clear_halt()
which callsClearPipeStallBothEnds()
on macOS unless an actualLIBUSB_ERROR_PIPE
is encountered. Similar sentiment was found on github in these commentsThis also confirms why everything is fine on Windows using the native backend. On Windows, the native backend doesn't appear to call
ResetPipe()
.Additionally, it looks like macOS NATIVE backend implementation is using the
ADB_OSX_USB_CLEAR_ENDPOINTS
environment variable to determine whether to callClearPipeStallBothEnds()
. Native backend on macOS didn't work well for us, it was quite unstable.Questions
libusb
mailing list postlibusb_clear_halt()
ifADB_OSX_USB_CLEAR_ENDPOINTS
is set?Please let me know if you have any additional questions.
Thank you.