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

error cannt extract channel 2 from image and build error #360

Open
hunjixin opened this issue Jan 16, 2023 · 7 comments
Open

error cannt extract channel 2 from image and build error #360

hunjixin opened this issue Jan 16, 2023 · 7 comments

Comments

@hunjixin
Copy link

hunjixin commented Jan 16, 2023

Describe the bug

panic

To Reproduce

linux mint / steam / v2.8.5 / node v18.13.0

run from source and when press leftalt+` and got panic like below

image

and when run build and test also got a error

    src/common/node/sharp-image-container.ts:123:31 - error TS2345: Argument of type 'string' is not assignable to parameter of type '0 | 1 | 2 | 3 | "blue" | "alpha" | "red" | "green"'.

i think this maybe casuse of different version

Expected behavior

not panic
Software information

  • Operating System:
  Kernel: 5.15.0-56-generic x86_64 bits: 64 compiler: gcc v: 11.3.0 Desktop: Cinnamon 5.6.5
    tk: GTK 3.24.33 wm: muffin dm: LightDM Distro: Linux Mint 21.1 Vera base: Ubuntu 22.04 jammy
Machine:
  Type: Laptop System: HASEE product: P65xHP v: N/A serial: <superuser required> Chassis: Notebook
    type: 10 serial: <superuser required>
  Mobo: Notebook model: P65xHP serial: <superuser required> UEFI-[Legacy]: American Megatrends
    v: 1.05.04 date: 02/06/2017
Battery:
  ID-1: BAT0 charge: 44.5 Wh (100.0%) condition: 44.5/60.2 Wh (74.0%) volts: 16.1 min: 14.8
    model: Notebook BAT serial: <filter> status: Full
CPU:
  Info: quad core model: Intel Core i7-7700HQ bits: 64 type: MT MCP arch: Kaby Lake rev: 9 cache:
    L1: 256 KiB L2: 1024 KiB L3: 6 MiB
  Speed (MHz): avg: 3032 high: 3067 min/max: 800/3800 cores: 1: 3067 2: 3036 3: 3013 4: 3048
    5: 3000 6: 3025 7: 3028 8: 3046 bogomips: 44798
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel HD Graphics 630 vendor: CLEVO/KAPOK driver: i915 v: kernel ports: active: eDP-1
    empty: none bus-ID: 00:02.0 chip-ID: 8086:591b
  Device-2: NVIDIA GP106M [GeForce GTX 1060 Mobile] vendor: CLEVO/KAPOK driver: nvidia
    v: 525.60.11 pcie: speed: 8 GT/s lanes: 16 ports: active: none off: HDMI-A-1 empty: DP-1,DP-2
    bus-ID: 01:00.0 chip-ID: 10de:1c20
  Device-3: Chicony USB 2.0 Camera type: USB driver: uvcvideo bus-ID: 1-9:5 chip-ID: 04f2:b5a7
  Display: x11 server: X.Org v: 1.21.1.3 driver: X: loaded: modesetting,nvidia
    unloaded: fbdev,nouveau,vesa gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 4480x1440 s-dpi: 96
  Monitor-1: HDMI-0 pos: primary,left res: 2560x1440 dpi: 109 diag: 686mm (27")
  Monitor-2: eDP-1-1 pos: right res: 1920x1080 dpi: 142 diag: 395mm (15.5")
  OpenGL: renderer: NVIDIA GeForce GTX 1060/PCIe/SSE2 v: 4.6.0 NVIDIA 525.60.11
    direct render: Yes
Audio:
  Device-1: Intel CM238 HD Audio vendor: CLEVO/KAPOK driver: snd_hda_intel v: kernel
    bus-ID: 00:1f.3 chip-ID: 8086:a171
  Device-2: NVIDIA GP106 High Definition Audio vendor: CLEVO/KAPOK driver: snd_hda_intel
    v: kernel pcie: speed: 8 GT/s lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:10f1
  Sound Server-1: ALSA v: k5.15.0-56-generic running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: CLEVO/KAPOK
    driver: r8169 v: kernel pcie: speed: 2.5 GT/s lanes: 1 port: d000 bus-ID: 6d:00.1
    chip-ID: 10ec:8168
  IF: enp109s0f1 state: down mac: <filter>
  Device-2: Intel Dual Band Wireless-AC 3168NGW [Stone Peak] driver: iwlwifi v: kernel pcie:
    speed: 2.5 GT/s lanes: 1 bus-ID: 6e:00.0 chip-ID: 8086:24fb
  IF: wlp110s0 state: up mac: <filter>
Bluetooth:
  Device-1: Intel Wireless-AC 3168 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 1-8:4
    chip-ID: 8087:0aa7
  Report: hciconfig ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 2.1 lmp-v: 4.2
    sub-v: 1100
Drives:
  Local Storage: total: 1.84 TiB used: 149.29 GiB (7.9%)
  ID-1: /dev/nvme0n1 vendor: Yangtze Memory model: ZHITAI PC005 Active 1TB size: 953.87 GiB
    speed: 31.6 Gb/s lanes: 4 serial: <filter> temp: 31.9 C
  ID-2: /dev/sda vendor: HGST (Hitachi) model: HTS541010B7E610 size: 931.51 GiB speed: 6.0 Gb/s
    serial: <filter>
Partition:
  ID-1: / size: 937.33 GiB used: 149.29 GiB (15.9%) fs: ext4 dev: /dev/nvme0n1p3
  ID-2: /boot/efi size: 512 MiB used: 5.2 MiB (1.0%) fs: vfat dev: /dev/nvme0n1p2
Swap:
  ID-1: swap-1 type: file size: 2 GiB used: 508.5 MiB (24.8%) priority: -2 file: /swapfile
Sensors:
  System Temperatures: cpu: 94.0 C pch: 49.5 C mobo: N/A gpu: nvidia temp: 68 C
  Fan Speeds (RPM): N/A
Repos:
  Packages: apt: 2473
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/nodesource.list
    1: deb [signed-by=/usr/share/keyrings/nodesource.gpg] https: //deb.nodesource.com/node_18.x jammy main
    2: deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https: //deb.nodesource.com/node_18.x jammy main
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
    1: deb http: //packages.linuxmint.com vera main upstream import backport
    2: deb http: //archive.ubuntu.com/ubuntu jammy main restricted universe multiverse
    3: deb http: //archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse
    4: deb http: //archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
    5: deb http: //security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
  Active apt repos in: /etc/apt/sources.list.d/steam.list
    1: deb [arch=amd64,i386] https: //repo.steampowered.com/steam/ stable steam
    2: deb-src [arch=amd64,i386] https: //repo.steampowered.com/steam/ stable steam
  Active apt repos in: /etc/apt/sources.list.d/vscode.list
    1: deb [arch=amd64,arm64,armhf] http: //packages.microsoft.com/repos/code stable main
Info:
  Processes: 372 Uptime: 3h 33m Memory: 15.51 GiB used: 11.2 GiB (72.2%) Init: systemd v: 249
  runlevel: 5 Compilers: gcc: 11.3.0 alt: 11 Client: Cinnamon v: 5.6.5 inxi: 3.3.13

  • Cyberpunk 2077 platform: Proton
  • BPA version: 2.8.5
  • relevant BPA settings: default

Additional files

@marcincichocki
Copy link
Owner

Hm, you got 0.31.1 instead of 0.31.0 of @types/sharp, and there was a breaking change. You can try to downgrade it manually to check the tests.

As for your issue with screenshot data, this looks like some dependency issue. Could you check if upgrading sharp to latest, or ImageMagick solves your problem?

This command is used under the hood to get screenshot of the game: https://github.com/bencevans/screenshot-desktop/blob/main/lib/linux/index.js#L170

You could try to run it manually, and see if the results are correct.

@hunjixin
Copy link
Author

dependency should be okay,because github release binary works. solve correct but cannot active game windows and input.

@hunjixin
Copy link
Author

@marcincichocki hi i change sharp version to 0.31.0, but when i run npm install, still download 0.31.1.

@marcincichocki
Copy link
Owner

I bumped node to 16 (this is the version electron is using), so you might want to switch to that one. Tesseract.js has also some problems on latest lts (which is 18 you are on). You can try to try latest master with node 16 now. Don't forget to npm ci your dependencies too.

Anyway, I think we side tracked from the original problem. Could you specify what is the original/current problem of this ticket?

@hunjixin
Copy link
Author

thanks, i will try it

@hunjixin
Copy link
Author

the origin problem is, in linux, cannot active windows and auto input,. occasionally when i use alt tab to switch to game windows and than could auto input。 so i want to debug and fix this.

@marcincichocki
Copy link
Owner

Alright, so interaction with game window is handled by external binary called xdotool. In principal, it should find window that have "Cyberpunk 2077" in the title and focus it. Sending keys is also handled by this program.

I think you can try to run: which xdotool on your machine to check if you have this bin installed(I assume it should be ok since worker thread appears to be initialized).

Then please run xdotool search --name "Cyberpunk 2077" windowactivate --sync in the terminal. This is exact command that is used, and it should work, that is: focus any window with name like this. Since I didn't run Cyberpunk on proton, I don't know if this will in fact work here, but I expect that it should. If Cyberpunk window is named somehow else, please let me know.

And what about the other error, one with extractChannel in the error message?

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