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

[Bug] Support Linux CLI #181

Closed
diyism opened this issue Apr 21, 2021 · 8 comments
Closed

[Bug] Support Linux CLI #181

diyism opened this issue Apr 21, 2021 · 8 comments
Assignees
Labels
bug Something isn't working P3
Milestone

Comments

@diyism
Copy link
Contributor

diyism commented Apr 21, 2021

When I run "sudo npm i @openkraken/cli -g",
it says Error: Command failed: curl -O https://kraken.oss-cn-hangzhou.aliyuncs.com/kraken-cli-vendors/kraken-linux-0.7.2.tar.gz
It seems there no file of kraken-linux-0.7.2.tar.gz in this url location.

@diyism diyism added the bug Something isn't working label Apr 21, 2021
@wssgcg1213
Copy link
Member

Hi @diyism , thanks for feedback.
We provide macOS cli binary officially, other platforms like Windows / Linux are not fully supported.
The problem is that configuring toolchains and building bridge(C++ part) in different platforms, if you could help us will be very helpful!

@wssgcg1213 wssgcg1213 changed the title [Bug]No kraken-linux-0.7.2.tar.gz when run "sudo npm i @openkraken/cli -g" [Bug] Support Linux CLI Apr 22, 2021
@andycall andycall added this to the 0.9 milestone Jun 22, 2021
@andycall andycall self-assigned this Jun 23, 2021
@andycall andycall added the P3 label Jun 23, 2021
@suyulin
Copy link
Contributor

suyulin commented Nov 12, 2021

#668

@andycall
Copy link
Member

Supported. #887

@diyism
Copy link
Contributor Author

diyism commented Jan 25, 2022

It still doesn't work:

$ sudo npm i @openkraken/cli -g
[sudo] password for malcolm: 
npm ERR! code 1
npm ERR! path /usr/lib/node_modules/@openkraken/cli
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
npm ERR!                                  Dload  Upload   Total   Spent    Left  Speed
100   300  100   300    0     0   3592      0 --:--:-- --:--:-- --:--:--  3614
npm ERR! 
npm ERR! gzip: stdin: not in gzip format
npm ERR! tar: Child returned status 1
npm ERR! tar: Error is not recoverable: exiting now
npm ERR! node:child_process:905
npm ERR!     throw err;
npm ERR!     ^
npm ERR! 
npm ERR! Error: Command failed: tar xzf /usr/lib/node_modules/@openkraken/cli/kraken-linux-0.10.3.tar.gz -C ./build
npm ERR!     at checkExecSyncError (node:child_process:828:11)
npm ERR!     at execSync (node:child_process:902:15)
npm ERR!     at Object.<anonymous> (/usr/lib/node_modules/@openkraken/cli/install.js:15:1)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1097:14)
npm ERR!     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10)
npm ERR!     at Module.load (node:internal/modules/cjs/loader:975:32)
npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm ERR!     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
npm ERR!     at node:internal/main/run_main_module:17:47 {
npm ERR!   status: 2,
npm ERR!   signal: null,
npm ERR!   output: [ null, null, null ],
npm ERR!   pid: 1187636,
npm ERR!   stdout: null,
npm ERR!   stderr: null
npm ERR! }
npm ERR! 
npm ERR! Node.js v17.4.0

@andycall
Copy link
Member

@diyism linux now available at beta channel.

npm i @openkraken/cli@beta -g

@diyism
Copy link
Contributor Author

diyism commented Jan 26, 2022

It seems that it conflicts with the Xorg process:


$ flutter --version
Flutter 2.8.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 77d935af4d (6 weeks ago) • 2021-12-16 08:37:33 -0800
Engine • revision 890a5fca2e
Tools • Dart 2.15.1

$ kraken --version
0.10.4-beta.0

$ apt-cache policy xserver-xorg
xserver-xorg:
  Installed: 1:7.7+23
  Candidate: 1:7.7+23
  Version table:
 *** 1:7.7+23 500
        500 https://http.kali.org/kali kali-rolling/main amd64 Packages
        100 /var/lib/dpkg/status

$ kraken run https://raw.githubusercontent.com/openkraken/kraken/master/kraken/example/assets/bundle.js

The window showed, I can see the text "Hello World", but after 5 seconds the Xorg process occupied 100% cpu:

$ top -n 1 | grep -P "Xorg|CPU"
    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                                                                
   1449 root      20   0 1361428 115924  81484 S  100   0.7   2:48.88 Xorg

And I won't kill the Xorg(kill -9 PID) untill I cold reboot my computer.

@andycall
Copy link
Member

I have no idea of this. Maybe you can try run standard flutter app on your computer.

@tang5011235
Copy link

我在linux 执行了 npm i @openkraken/cli@beta -g 提示安装完成 ,但是找不到kraken全局命令

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P3
Projects
None yet
Development

No branches or pull requests

5 participants