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

Cisco Webex Client for Linux #122744

Closed
neumantm opened this issue May 12, 2021 · 14 comments
Closed

Cisco Webex Client for Linux #122744

neumantm opened this issue May 12, 2021 · 14 comments

Comments

@neumantm
Copy link
Contributor

Project description
Webex is video-audio-conferencing system developed by Cisco.
It is widely used in companies and universities around the world, especially at the current time.

It recently got an official linux client.

Metadata

@djahandarie
Copy link
Contributor

@Pacman99 Thanks for your work so far.
This certainly seems like a hard thing to package.

Pacman99's current attempt results (at least on my machine) in the binary just checking for this file thousands of times then eventually giving up and stopping:

...beginning excluded...
[pid 18220] close(5)                    = 0
[pid 18220] fstat(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
[pid 18220] stat("/etc/localtime", {st_mode=S_IFREG|0444, st_size=3536, ...}) = 0
[pid 18220] write(4, "2021-05-15 11:40:41 ACTION Calling the entry point.\n2021-05-15 11:40:41 ... BEFORE ENTRY POINT ...\n", 99) = 99
[pid 18220] close(4)                    = 0
[pid 18220] openat(AT_FDCWD, "/nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libspark-windows-desktop-ui.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 18220] openat(AT_FDCWD, "/nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libspark-windows-desktop-ui.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 18220] openat(AT_FDCWD, "/nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libspark-windows-desktop-ui.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 18220] openat(AT_FDCWD, "/nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libspark-windows-desktop-ui.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
...
...[thousands more]...
...
[pid 18220] openat(AT_FDCWD, "/nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libspark-windows-desktop-ui.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 18220] openat(AT_FDCWD, "/nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libspark-windows-desktop-ui.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 18220] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x7ffc48e25fe8} ---
[pid 18220] +++ killed by SIGSEGV (core dumped) +++
<... clock_nanosleep resumed>{tv_sec=6, tv_nsec=99075199}) = ? ERESTART_RESTARTBLOCK (Interrupted by signal)
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_DUMPED, si_pid=18220, si_uid=1000, si_status=SIGSEGV, si_utime=17, si_stime=107} ---
restart_syscall(<... resuming interrupted clock_nanosleep ...>) = 0
write(3, "2021-05-15T15:40:51.593Z Exiting launcher.\n", 43) = 43
brk(0x55dda6d83000)                     = 0x55dda6d83000
close(3)                                = 0
openat(AT_FDCWD, "/home/darius/.local/share/Webex/", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
fstat(3, {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
close(3)                                = 0
openat(AT_FDCWD, "/home/darius/.local/share/Webex/hostLogs/", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
fstat(3, {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
close(3)                                = 0
openat(AT_FDCWD, "/home/darius/.local/share/Webex/hostLogs/webexhost.txt", O_WRONLY|O_CREAT|O_APPEND, 0666) = 3
lseek(3, 0, SEEK_END)                   = 292
stat("/etc/localtime", {st_mode=S_IFREG|0444, st_size=3536, ...}) = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=292, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0444, st_size=3536, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0444, st_size=3536, ...}) = 0
write(3, "2021-05-15 11:40:51 ... AFTER ENTRY POINT ...\n2021-05-15 11:40:51 ACTION Exited from the entry point.\n2021-05-15 11:40:51 Finished successfully, exiting.\n", 154) = 154
close(3)                                = 0
exit_group(0)                           = ?
+++ exited with 0 +++

with nothing of interest in the referenced webexhost.txt log file:

2021-05-15 11:40:41 Attempting to use VersionSelector from Launcher directory
2021-05-15 11:40:41 Failed to get VersionSelector from Launcher directory, using installed VersionSelector instead
2021-05-15 11:40:41 ACTION Calling the entry point.
2021-05-15 11:40:41 ... BEFORE ENTRY POINT ...
2021-05-15 11:40:51 ... AFTER ENTRY POINT ...
2021-05-15 11:40:51 ACTION Exited from the entry point.
2021-05-15 11:40:51 Finished successfully, exiting.

Since it seemed to be a SIGSEGV on the child process that made it stop, I loaded it into gdb:

#0  0x00007ffff7fee403 in __open_nocancel () from /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/ld-linux-x86-64.so.2
#1  0x00007ffff7fda34f in open_verify.constprop () from /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/ld-linux-x86-64.so.2
#2  0x00007ffff7fdaade in open_path () from /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/ld-linux-x86-64.so.2
#3  0x00007ffff7fdc1b1 in _dl_map_object () from /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/ld-linux-x86-64.so.2
#4  0x00007ffff7fe66a2 in dl_open_worker () from /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/ld-linux-x86-64.so.2
#5  0x00007ffff7f14b25 in _dl_catch_exception () from /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6
#6  0x00007ffff7fe623a in _dl_open () from /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/ld-linux-x86-64.so.2
#7  0x00007ffff7fc7246 in dlopen_doit () from /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libdl.so.2
#8  0x00007ffff7f14b25 in _dl_catch_exception () from /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6
#9  0x00007ffff7f14bbf in _dl_catch_error () from /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libc.so.6
#10 0x00007ffff7fc78f5 in _dlerror_run () from /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libdl.so.2
#11 0x00007ffff7fc72c6 in dlopen@@GLIBC_2.2.5 () from /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libdl.so.2
#12 0x00007ffff7be16dc in WebexEntryPoint () from /nix/store/wvj22k2c8bs3prfbgapij2aykmvm008f-webex-41.5.0.18815/opt/Webex/lib/libWebexAppLoader.so
#13 0x00007ffff7be16fb in WebexEntryPoint () from /nix/store/wvj22k2c8bs3prfbgapij2aykmvm008f-webex-41.5.0.18815/opt/Webex/lib/libWebexAppLoader.so
#14 0x00007ffff7be16fb in WebexEntryPoint () from /nix/store/wvj22k2c8bs3prfbgapij2aykmvm008f-webex-41.5.0.18815/opt/Webex/lib/libWebexAppLoader.so
#15 0x00007ffff7be16fb in WebexEntryPoint () from /nix/store/wvj22k2c8bs3prfbgapij2aykmvm008f-webex-41.5.0.18815/opt/Webex/lib/libWebexAppLoader.so
#16 0x00007ffff7be16fb in WebexEntryPoint () from /nix/store/wvj22k2c8bs3prfbgapij2aykmvm008f-webex-41.5.0.18815/opt/Webex/lib/libWebexAppLoader.so
#17 0x00007ffff7be16fb in WebexEntryPoint () from /nix/store/wvj22k2c8bs3prfbgapij2aykmvm008f-webex-41.5.0.18815/opt/Webex/lib/libWebexAppLoader.so
#18 0x00007ffff7be16fb in WebexEntryPoint () from /nix/store/wvj22k2c8bs3prfbgapij2aykmvm008f-webex-41.5.0.18815/opt/Webex/lib/libWebexAppLoader.so
[...thousands more...]

I guess it segfaulted due to infinite recursion (which is probably just retry logic when the startup fails).

The libspark file included in the deb, and the nix expression does seem to set up LD_LIBRARY_PATH to point to a directory which includes it:

(gdb) show environment LD_LIBRARY_PATH
LD_LIBRARY_PATH = /nix/store/wvj22k2c8bs3prfbgapij2aykmvm008f-webex-41.5.0.18815/opt/Webex/lib
$ ls -al /nix/store/wvj22k2c8bs3prfbgapij2aykmvm008f-webex-41.5.0.18815/opt/Webex/lib/libspark-windows-desktop-ui.so
-r--r--r-- 1 root root 179808592 Dec 31  1969 /nix/store/wvj22k2c8bs3prfbgapij2aykmvm008f-webex-41.5.0.18815/opt/Webex/lib/libspark-windows-desktop-ui.so

It's unclear to me why dlopen is only checking /nix/store/0c7c96gikmzv87i7lv3vq5s1cmfjd6zf-glibc-2.31-74/lib/libspark-windows-desktop-ui.so and not /nix/store/wvj22k2c8bs3prfbgapij2aykmvm008f-webex-41.5.0.18815/opt/Webex/lib/libspark-windows-desktop-ui.so even though LD_LIBRARY_PATH is set correctly.

@djahandarie
Copy link
Contributor

Update: it seems like CiscoCollabHost forks and execs itself without the LD_LIBRARY_PATH environment variable. So the solution seems to be to use wrapProgram on CiscoCollabHost so it gets set again, as opposed to the makeWrapper method you were using.

    wrapProgram $out/opt/Webex/bin/CiscoCollabHost \
      --prefix LD_LIBRARY_PATH : $out/opt/Webex/lib

    ln -s $out/opt/Webex/bin/CiscoCollabHost $out/bin/webex

@Pacman99

@Pacman99
Copy link
Contributor

Ohh wow thank you for debugging and figuring that out! I'll update the PR.

@djahandarie
Copy link
Contributor

You're welcome! With that the app starts and seemingly works, but audio is beyond messed up (shockingly loud amounts of pure static) 😆.

Not sure why, it seems to successfully create a "WebexAudioPlayback" device in pulse, but I guess some audio codec or sample rate or something gets messed up...

@Pacman99
Copy link
Contributor

Yeah I get a problem that it can't connect to the server.

I wonder if we need to wrap all the binaries, is there any nixpkgs script or hook for that?

Or maybe to play it safe a fhsenv would be the best solution.

@djahandarie
Copy link
Contributor

FWIW the app actually works perfectly fine for me (can join video calls and everything), it just has the audio issue -- using my corporate webex account

@skogsbrus
Copy link

skogsbrus commented Jul 19, 2021

Completely new to Nix, but am interested in this as well!

I haven't tried it at my day job, but the app has worked well in my limited testing. The audio device names look very unfamiliar, but they do map correctly to my mic and speaker. [ edit: seems like these unfamiliar names relate to nixos in general rather than webex ]

Had to change the version and shasum since the package has been updated though. It seems they don't publish versioned urls.

  src = fetchurl {
    url = "https://binaries.webex.com/WebexDesktop-Ubuntu-Official-Package/Webex.deb";
    sha256 = "5b15f4f71024685baa3675e2e1f33d0572cb75943b618ccf67673b04c70904cc";
  };

Ran it like so first:
nix-build -E 'with import <nixpkgs> {}; callPackage ./webex.nix
./result/bin/webex

Then installed it with home-manager:

  home-manager.users.skogsbrus = { pkgs, ... }: {
    home.packages = [
      (pkgs.callPackage ./webex.nix {})
    ];
  };

@buckley310
Copy link
Contributor

#122796 also seems to run for me and I can get signed in with it and stuff. I'm going to try using it for a little while and see how it works

@skogsbrus
Copy link

skogsbrus commented Aug 17, 2021

With #122796, audio is good for me, but it seems you can't share your screen - maybe they hadn't introduced that feature in 41.5?

The latest version doesn't work for me - the installation completes but running the binary doesn't do anything.

EDIT:

So it seems that the "share your screen" button does not appear because I'm running on Wayland, which they apparently don't support.

EDIT 2: the binary starts up correctly sometimes, and sometimes exits without doing anything. Relaunching it until it starts has worked ok though

@djahandarie
Copy link
Contributor

I wonder if the audio issue I experience has to do with my soundcard being 48k as opposed to 44.1k and something in webex doesn't like that... it might be specific to my setup and not this packaging.

@stale
Copy link

stale bot commented Apr 18, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Apr 18, 2022
@ShamrockLee
Copy link
Contributor

It's still relevant and significant.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Apr 22, 2022
@uvNikita
Copy link
Contributor

Closed with #181211

@skogsbrus
Copy link

Thank you for working on this @uvNikita! ❤️

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

Successfully merging a pull request may close this issue.

7 participants