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

Linux support #1

Open
SoulMelody opened this issue Jun 29, 2019 · 12 comments
Open

Linux support #1

SoulMelody opened this issue Jun 29, 2019 · 12 comments

Comments

@SoulMelody
Copy link

SoulMelody commented Jun 29, 2019

I tried to install and run debugtron on linux, but with no luck.
Here is the backtrace:

debugtron /opt/github-desktop/github-desktop
internal/validators.js:125
    throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received type undefined
    at validateString (internal/validators.js:125:11)
    at normalizeSpawnArguments (child_process.js:416:3)
    at spawn (child_process.js:555:16)
    at startDebugging (/usr/lib/node_modules/debugtron/lib/index.js:76:14)
    at Command.program.version.arguments.action.appPath (/usr/lib/node_modules/debugtron/lib/cli.js:11:7)
    at Command.listener (/usr/lib/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:193:13)
    at Command.parseArgs (/usr/lib/node_modules/commander/index.js:653:12)
    at Command.parse (/usr/lib/node_modules/commander/index.js:474:21)
    at Object.<anonymous> (/usr/lib/node_modules/debugtron/lib/cli.js:17:4)
@SoulMelody
Copy link
Author

I have managed to make it work with the following patch applied:

diff index.js index.js.bak

30,31d29
<     case 'linux':
<       return readdirAbsolute('/opt')
58,61d55
<     case 'linux':
<       return fs.existsSync(
<         path.join(appPath, 'resources/electron.asar'),
<       )
75,78d68
<     }
<     case 'linux': {
<       const appName = path.basename(appPath)
<       return path.join(appPath, appName)

And I hope you should focus more on cross-platform development (including linux).

@DuBistKomisch
Copy link

👍 patch kind of worked, except the app I was trying with didn't have a matching folder and executable name, and I couldn't pass the executable directly since it only checks if it ends with .exe 🤦‍♂️

@pd4d10
Copy link
Owner

pd4d10 commented Oct 30, 2019

Hi, @SoulMelody @DuBistKomisch , thanks for you suggestion!

Debugtron is a desktop app now! Support for linux is working in progress

@pd4d10
Copy link
Owner

pd4d10 commented Nov 1, 2019

The latest v0.3.1 already supports Linux, which could be downloaded from releases page.

Currently we only have zip file bundle. Other bundle formats like deb and rpm are coming soon.

@DuBistKomisch
Copy link

@pd4d10 thanks, I just tried it out (running from yarn start, can't be bothered installing on arch linux), but it doesn't detect any apps. I tried manually navigating to an app such as /usr/bin/code, but it didn't seem to do anything, nothing in dev tools console either. what am I doing wrong?

@pd4d10
Copy link
Owner

pd4d10 commented Nov 3, 2019

@DuBistKomisch Thanks for your quick feedback!

Electron apps detection is not ready at Linux, because there are so many Linux distributions, and their application installed paths seems quite different. It may take a while. Code here: https://github.com/bytedance/debugtron/blob/fedfb644ab7daa545e48a18fb7d755b89d763836/src/main/linux.ts#L5-L8

Could you please provide your Electron app name? I've noticed that the name is code, is it VSCode?

@DuBistKomisch
Copy link

fair enough, would be nice to be able to load one manually in the meantime at least.

and yeah it's VS Code: https://www.archlinux.org/packages/community/x86_64/code/

I also tried with my own app built using this packager: https://github.com/electron-userland/electron-installer-debian

@pd4d10
Copy link
Owner

pd4d10 commented Nov 4, 2019

@DuBistKomisch Seems there are two separated problems:

  • VSCode is not working, because after /usr/bin/code command executed, the current process will quit and the VSCode processes will be running in the background. I've created a new issue Handle executable running in the background #2 to track this.
  • v0.3.1 has some problems on clicking dropzone area to select executable. It is already fixed at the latest v0.4.0

By the way I'm using GitHub Desktop for test at Linux. If there are still problems on your own app, please provide your app's download link. We'll try to fix the case

@DuBistKomisch
Copy link

tried with latest master, seems to work with some apps (e.g. signal) which get installed to /opt 👏

our app is available for download here: https://www.vivi.io/downloads

if I open the binary with debugtron, a tab for the app appears for a split second then goes away

@pd4d10
Copy link
Owner

pd4d10 commented Nov 6, 2019

@DuBistKomisch Debugtron relies on --inspect switch of Node.js. Tried to run your app with --inspect and seems no inspect session started.

Which packager are you using?

@thenexxuz-zz
Copy link

Still not working 100%. Manjaro linux. When I tell it to open an app like GitKraken from /opt/gitkraken/gitkraken it scans it for a moment then closes BUT that only happens if the app was already OPEN. But if I open an app like GitKraken and I tell Debugtron to "rescan" then the entire interface in Debugtron goes blank.

@lipei007
Copy link

is support uos arm?

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

5 participants