-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
Japanese Windows User issue, adb: error: cannot stat 'scrcpy-server': No such file or directory #2619
Comments
Try with the latest version, scrcpy v1.18. |
I tested this using scrcpy v1.18 C:\Users\1階のPC>"C:\Users\1階のPC\AppData\Roaming\SideQuest\scrcpy\scrcpy.exe" --crop 1600:900:2017:510 -b 8000000 --max-fps 0 --max-size 0 -n --window-title "SideQuest Stream" -s 1WMHH842XM0492 Then I set SCRCPY_SERVER_PATH C:\Users\1階のPC>"C:\Users\1階のPC\AppData\Roaming\SideQuest\scrcpy\scrcpy.exe" --crop 1600:900:2017:510 -b 8000000 --max-fps 0 --max-size 0 -n --window-title "SideQuest Stream" -s 1WMHH842XM0492 Seems to be working fine. Do I have to set SCRCPY_SERVER_PATH? |
In theory, no, but there might be a bug. cc @npes87184? |
I think this problem is not related to language. @urashita executed Thank you. |
But on Windows it looks into the executable path: Line 55 in c96f5c7
|
I executed scrcpy with current directory C:\Users\1階のPC which does not contain the scrcpy-server. But when I executed scrcpy with another user, |
Is this what you are talking? C:\Users\1階のPC>"C:\Users\1階のPC\AppData\Roaming\SideQuest\scrcpy\scrcpy.exe" -Vdebug |
This is a correct case. C:\Users\urashita>"C:\Users\urashita\AppData\Roaming\SideQuest\scrcpy\scrcpy.exe" -Vdebug |
It is a relative path. Maybe this is the different part. |
I just added a log to print the detected executable path: diff --git a/app/src/server.c b/app/src/server.c
index a4cdb0c9..7e52c378 100644
--- a/app/src/server.c
+++ b/app/src/server.c
@@ -54,6 +54,7 @@ get_server_path(void) {
// use scrcpy-server in the same directory as the executable
char *executable_path = get_executable_path();
+ LOGI("executable_path = [%s]\n", executable_path);
if (!executable_path) {
LOGE("Could not get executable path, "
"using " SERVER_FILENAME " from current directory"); Here is a binary, to replace in your v1.18 release: Please re-run and share the logs (console output). |
Thanks for your sincere support. C:\Users\1階のPC\AppData\Roaming\SideQuest\scrcpy>dir
ドライブ C のボリューム ラベルは Windows です
ボリューム シリアル番号は 28D3-5070 です
C:\Users\1階のPC\AppData\Roaming\SideQuest\scrcpy のディレクトリ
2021/09/09 09:48 <DIR> .
2021/09/09 09:48 <DIR> ..
2021/09/07 18:07 5,937,152 adb.exe
2021/09/07 18:07 97,792 AdbWinApi.dll
2021/09/07 18:07 62,976 AdbWinUsbApi.dll
2021/09/07 18:07 50,103,296 avcodec-58.dll
2021/09/07 18:07 11,094,016 avformat-58.dll
2021/09/07 18:07 866,304 avutil-56.dll
2021/09/07 18:07 90 scrcpy-console.bat
2021/09/07 18:07 212 scrcpy-noconsole.vbs
2021/09/07 18:07 37,330 scrcpy-server
2021/09/09 09:32 633,630 scrcpy.exe
2021/09/07 18:07 633,630 scrcpy.exe-orig
2021/09/07 18:07 1,561,088 SDL2.dll
2021/09/07 18:07 433,664 swresample-3.dll
2021/09/07 18:07 552,960 swscale-5.dll
14 個のファイル 72,014,140 バイト
2 個のディレクトリ 17,677,307,904 バイトの空き領域
C:\Users\1階のPC\AppData\Roaming\SideQuest\scrcpy>certutil -hashfile scrcpy.exe SHA256
SHA256 ハッシュ (対象 scrcpy.exe):
722bab340496f6665cd7a3542884d073f2c2b59575599a6002b98a94f8d67113
CertUtil: -hashfile コマンドは正常に完了しました。
C:\Users\1階のPC\AppData\Roaming\SideQuest\scrcpy>"C:\Users\1階のPC\AppData\Roaming\SideQuest\scrcpy\scrcpy.exe" -Vdebug
INFO: scrcpy 1.18 <https://github.com/Genymobile/scrcpy>
INFO: executable_path = [C:\Users\1階のPC\AppData\Roaming\SideQuest\scrcpy\scrcpy.exe]
DEBUG: Using server (portable): .\scrcpy-server
.\scrcpy-server: 1 file pushed, 0 skipped. 63.6 MB/s (37330 bytes in 0.001s)
DEBUG: Screensaver enabled
[server] INFO: Device: Oculus Quest 2 (Android 10)
[server] DEBUG: Using encoder: 'OMX.qcom.video.encoder.avc'
DEBUG: Starting controller thread
DEBUG: Starting receiver thread
INFO: Renderer: direct3d
DEBUG: Trilinear filtering disabled (not an OpenGL renderer)
INFO: Initial texture: 3664x1920
DEBUG: Starting stream thread
DEBUG: User requested to quit
DEBUG: quit...
DEBUG: Server terminated
WARN: Killing the server...
DEBUG: End of frames
DEBUG: Receiver stopped
C:\Users\1階のPC\AppData\Roaming\SideQuest\scrcpy>cd /d %homedrive%%homepath%
C:\Users\1階のPC>"C:\Users\1階のPC\AppData\Roaming\SideQuest\scrcpy\scrcpy.exe" -Vdebug
INFO: scrcpy 1.18 <https://github.com/Genymobile/scrcpy>
INFO: executable_path = [C:\Users\1階のPC\AppData\Roaming\SideQuest\scrcpy\scrcpy.exe]
DEBUG: Using server (portable): .\scrcpy-server
stat: No such file or directory
ERROR: '.\scrcpy-server' does not exist or is not a regular file |
The problem is that |
If I executed the same scrcpy.ese (which you send me yesterday) from a single byte user, the result seems to be fine. C:\Users\urashita>"C:\Users\urashita\AppData\Roaming\SideQuest\scrcpy\scrcpy.exe" -Vdebug
INFO: scrcpy 1.18 <https://github.com/Genymobile/scrcpy>
INFO: executable_path = [C:\Users\urashita\AppData\Roaming\SideQuest\scrcpy\scrcpy.exe]
DEBUG: Using server (portable): C:\Users\urashita\AppData\Roaming\SideQuest\scrcpy\scrcpy-server
C:\Users\urashita\AppData\Roaming\SideQuest\scrcpy\scrcpy-... file pushed, 0 skipped. 37.7 MB/s (37330 bytes in 0.001s)
DEBUG: Screensaver enabled
[server] INFO: Device: Oculus Quest 2 (Android 10)
[server] DEBUG: Using encoder: 'OMX.qcom.video.encoder.avc'
DEBUG: Starting controller thread
DEBUG: Starting receiver thread
INFO: Renderer: direct3d
DEBUG: Trilinear filtering disabled (not an OpenGL renderer)
INFO: Initial texture: 3664x1920
DEBUG: Starting stream thread
DEBUG: User requested to quit
DEBUG: quit...
DEBUG: Receiver stopped
[server] DEBUG: Controller stopped
DEBUG: End of frames
WARN: Killing the server...
DEBUG: Server terminated |
OK, let's add more logs: diff --git a/app/src/server.c b/app/src/server.c
index a4cdb0c9..99746726 100644
--- a/app/src/server.c
+++ b/app/src/server.c
@@ -54,6 +54,7 @@ get_server_path(void) {
// use scrcpy-server in the same directory as the executable
char *executable_path = get_executable_path();
+ LOGI("executable_path = [%s]\n", executable_path);
if (!executable_path) {
LOGE("Could not get executable path, "
"using " SERVER_FILENAME " from current directory");
@@ -61,7 +62,9 @@ get_server_path(void) {
return strdup(SERVER_FILENAME);
}
char *dir = dirname(executable_path);
+ LOGI("dir = [%s]\n", dir);
size_t dirlen = strlen(dir);
+ LOGI("dirlen = [%d]\n", (int) dirlen);
// sizeof(SERVER_FILENAME) gives statically the size including the null byte
size_t len = dirlen + 1 + sizeof(SERVER_FILENAME);
@@ -78,6 +81,8 @@ get_server_path(void) {
memcpy(&server_path[dirlen + 1], SERVER_FILENAME, sizeof(SERVER_FILENAME));
// the final null byte has been copied with SERVER_FILENAME
+ LOGI("server_path = [%s]\n", server_path);
+
free(executable_path);
LOGD("Using server (portable): %s", server_path);
|
I executed a new scrcpy.exe.
|
👍 OK so |
I'm not sure why I can't reproduce on Windows 10 :/ Could you try this fix/workaround, please: |
Now, I could successfully execute scrcpy.exe.
|
I am worry whether this fix would not be applied in master branch, because I will continue to use scrcpy. |
Here is a fix applied above Please test: If it works, I'll merged into |
To prevent similar problem in the future, what about implement |
@npes87184 That's almost what I did in the first fix/workaround (I just posted the binary). But in fact there are many special cases to handle to implement |
Thank you for your explanation. |
Hi, I tested a fixed scrcpy.exe and worked fine.
This would be really appreciated.
|
Merged into |
Btw, I think you have a locale issue with your Windows: why |
In Japanese, \ are replaced by ¥.
|
Hi there, I checked #448 and #567.
I installed scrcpy into this folder.
C:\Users\1階のPC\AppData\Roaming\SideQuest\scrcpy
I got this error.
C:\Users\1階のPC>"C:\Users\1階のPC\AppData\Roaming\SideQuest\scrcpy\scrcpy.exe" --crop 1600:900:2017:510 -b 8000000 --max-fps 0 --max-size 0 -n --window-title "SideQuest Stream" -s 1WMHH842XM0492
INFO: scrcpy 1.11 https://github.com/Genymobile/scrcpy
adb: error: cannot stat '.\scrcpy-server': No such file or directory
ERROR: "adb push" returned with value 1
Press any key to continue...
Then I set SCRCPY_SERVER_PATH
C:\Users\1階のPC>set SCRCPY_SERVER_PATH=C:\Users\1階のPC\AppData\Roaming\SideQuest\scrcpy\scrcpy-server
I got this error.
C:\Users\1階のPC>"C:\Users\1階のPC\AppData\Roaming\SideQuest\scrcpy\scrcpy.exe" --crop 1600:900:2017:510 -b 8000000 --max-fps 0 --max-size 0 -n --window-title "SideQuest Stream" -s 1WMHH842XM0492
INFO: scrcpy 1.11 https://github.com/Genymobile/scrcpy
adb: error: cannot stat 'C:\Users\1�K��PC\AppData\Roaming\SideQuest\scrcpy\scrcpy-server': No such file or directory
ERROR: "adb push" returned with value 1
Press any key to continue...
I think there must a reason I encounter scrambled text.
The text was updated successfully, but these errors were encountered: