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

scrcpy failed to start from adborc #17

Open
KostyaM opened this issue Mar 3, 2023 · 8 comments
Open

scrcpy failed to start from adborc #17

KostyaM opened this issue Mar 3, 2023 · 8 comments

Comments

@KostyaM
Copy link

KostyaM commented Mar 3, 2023

Tried to execute command adborc consumer scrcpy deviceId. However got an error:

Screen mirroring failed: Could not start scrcpy: Scrcpy server failed to start: 2023-03-03 17:12:20.255 scrcpy[28358:144649] ERROR: Command not found: [adb], [start-server]

Tried several fixes:

  1. added adb to $PATH variable. Now it accessible as a command from console
  2. tried to run just scrcpy command and Wow it works and sees my device connected remotely, however won't start the screen mirroring too. That means that my scrcpy installed can execute adb commands.

Can someone explain, what could it be please?

ENV
adborc version: v0.1.0
scrcpy version 1.25

Android Debug Bridge version 1.0.41
Version 34.0.0-9570255

consumer/marketmaker - macos m1
supplier - windows 10
device Android 7.1.1

@mobi-nex
Copy link
Owner

mobi-nex commented Mar 4, 2023

Can you try to set the environment variable ADB pointing to the adb executable and then running adborc consumer scrcpy <deviceId>. So you might have to do the following:

$ export ADB=/some/path/to/adb
$ adborc consumer scrcpy <deviceid>

Let me know if this works and I will add a fix for it in the next release.

@KostyaM
Copy link
Author

KostyaM commented Mar 6, 2023

Yes, it helped. 🙏 Thank you so much.

@KostyaM
Copy link
Author

KostyaM commented Mar 6, 2023

However there is another problem. I don't know is it with your connection or with scrcpy. When I minimize scrcpy preview window I am not able to see it again on Mac - only a poor console with logs.

@mobi-nex
Copy link
Owner

mobi-nex commented Mar 6, 2023

Can you copy paste the logs seen on the console?

@KostyaM
Copy link
Author

KostyaM commented Mar 6, 2023

Can you copy paste the logs seen on the console?

This is all I have from scrcpy console

Last login: Mon Mar  6 11:34:44 on ttys001
/opt/homebrew/Cellar/scrcpy/1.25/bin/scrcpy ; exit;                             
km@Ks-MacBook-Pro ~ % /opt/homebrew/Cellar/scrcpy/1.25/bin/scrcpy ; exit;
scrcpy 1.25 <https://github.com/Genymobile/scrcpy>
1   HIToolbox                           0x000000019c78c5c8 _ZN15MenuBarInstance22EnsureAutoShowObserverEv + 120
2   HIToolbox                           0x000000019c78c188 _ZN15MenuBarInstance14EnableAutoShowEv + 60
3   HIToolbox                           0x000000019c72f310 SetMenuBarObscured + 372
4   HIToolbox                           0x000000019c72eee8 _ZN13HIApplication15HandleActivatedEP14OpaqueEventRefhP15OpaqueWindowPtrh + 172
5   HIToolbox                           0x000000019c728fcc _ZN13HIApplication13EventObserverEjP14OpaqueEventRefPv + 296
6   HIToolbox                           0x000000019c6efcd0 _NotifyEventLoopObservers + 176
7   HIToolbox                           0x000000019c72896c AcquireEventFromQueue + 432
8   HIToolbox                           0x000000019c717c84 ReceiveNextEventCommon + 320
9   HIToolbox                           0x000000019c717b2c _BlockUntilNextEventMatchingListInModeWithFilter + 72
10  AppKit                              0x00000001962c4424 _DPSNextEvent + 632
11  AppKit                              0x00000001962c35b4 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 728
12  libSDL2-2.0.0.dylib                 0x000000010343702c Cocoa_PumpEventsUntilDate + 84
13  libSDL2-2.0.0.dylib                 0x00000001034371dc Cocoa_PumpEvents + 56
14  libSDL2-2.0.0.dylib                 0x00000001033b2b70 SDL_PumpEventsInternal + 64
15  libSDL2-2.0.0.dylib                 0x00000001033b2f28 SDL_WaitEventTimeout_REAL + 808
16  scrcpy                              0x0000000102cb10dc scrcpy + 700
17  scrcpy                              0x0000000102ca97c4 main_scrcpy + 248
18  dyld                                0x0000000192c3be50 start + 2544
/opt/homebrew/Cellar/scrcpy/1.25/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 49.3 MB/s (42151 bytes in 0.001s)
[server] INFO: Device: Sony H4311 (Android 7.1.1)
1   HIToolbox                           0x000000019c71790c _ZN15MenuBarInstance22RemoveAutoShowObserverEv + 44
2   HIToolbox                           0x000000019c72f214 SetMenuBarObscured + 120
3   HIToolbox                           0x000000019c736390 _ZN13HIApplication11FrontUILostEv + 44
4   HIToolbox                           0x000000019c72f04c _ZN13HIApplication15HandleActivatedEP14OpaqueEventRefhP15OpaqueWindowPtrh + 528
5   HIToolbox                           0x000000019c728f70 _ZN13HIApplication13EventObserverEjP14OpaqueEventRefPv + 204
6   HIToolbox                           0x000000019c6efcd0 _NotifyEventLoopObservers + 176
7   HIToolbox                           0x000000019c72896c AcquireEventFromQueue + 432
8   HIToolbox                           0x000000019c717c84 ReceiveNextEventCommon + 320
9   HIToolbox                           0x000000019c717b2c _BlockUntilNextEventMatchingListInModeWithFilter + 72
10  AppKit                              0x00000001962c4424 _DPSNextEvent + 632
11  AppKit                              0x00000001962c35b4 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 728
12  libSDL2-2.0.0.dylib                 0x000000010343702c Cocoa_PumpEventsUntilDate + 84
13  libSDL2-2.0.0.dylib                 0x00000001034371dc Cocoa_PumpEvents + 56
14  libSDL2-2.0.0.dylib                 0x00000001033b2b70 SDL_PumpEventsInternal + 64
15  libSDL2-2.0.0.dylib                 0x00000001033b2f28 SDL_WaitEventTimeout_REAL + 808
16  scrcpy                              0x0000000102cb10dc scrcpy + 700
17  scrcpy                              0x0000000102ca97c4 main_scrcpy + 248
18  dyld                                0x0000000192c3be50 start + 2544

please, tell what logs should I send to you?

@mobi-nex
Copy link
Owner

mobi-nex commented Mar 6, 2023

Does seem like a scrcpy issue, but I don't have a mac M1 to reproduce the issue and confirm. I will try to get hold of one. Meanwhile, if possible, can you try to connect a device to your mac and directly running scrcpy without adborc. If scrcpy runs and the same issue is seen it might be helpful to check existing issues on the scrcpy project.

@KostyaM
Copy link
Author

KostyaM commented Mar 6, 2023

This is definitely not a problem with standard scrcpy (Just tried this via normal wire connection). It looks like that in your case the process of scrcpy just killed when it goes background

@mobi-nex
Copy link
Owner

mobi-nex commented Mar 6, 2023

Ah. Thanks for trying this out. I will create a separate issue for this and try to get it fixed before next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants