pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

Various Errors and/or Non-Launch Depending on Launch Method

Open FibroJedi opened this issue 2 years ago • 34 comments

Thanks in advance for your bug report!

  • [X] Have you reproduced issue in safe mode?
  • [X] Have you used the debugging guide to try to resolve the issue?
  • [X] Have you checked our FAQs to make sure your question isn't answered there?
  • [X] Does your issue already exist?
  • [X] Have you checked you are on the latest release of Pulsar?

What happened?

Before I start, I'll clarify that I'm not a software coder (just a web coder) so I wouldn't know how to hack the code to fix anything. Secondly, I found getting a release confusing so I don't really know if I have the latest or not. Info below:

Pulsar : 1.63.2022111606 Electron: 12.2.3 Chrome : 89.0.4389.128 Node : 14.16.0

Issue is: Pulsar doesn't run off the command line and won't run on command line without sudo. In both cases there are errors, which I'll lay out below.

I also don't have any extensions/modules installed at the point of writing this.

Final Note: There is always a possibility that I messed something up in the installation. So I'm looking for a solution to the problem, which may - or may not - be a bug.


In the interim I will try to look into the libva errors below because I think they occur in other places than pulsar. I've given four versions/cases below of methods of launching Pulsar and only one yields the libva error.

Which OS does this happen on?

🐧 Debian based (Linux Mint, Ubuntu, etc.)

OS details

Linux Mint 1 (Cinnamon 5.4.12)

Which CPU architecture are you running this on?

64-bit(x86_64)

What steps are needed to reproduce this?

Version 1: Running without sudo pulsar --safe cp: cannot stat 'resources/linux/desktopenviroment/cinnamon/pulsar.nemo_action': No such file or directory /usr/bin/pulsar: line 194: 8756 Trace/breakpoint trap (core dumped) nohup "$PULSAR_PATH" --executed-from="$(pwd)" --pid=$$ "$@" > "$ATOM_HOME/nohup.out" 2>&1 libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null) libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null) libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null) [8756:1123/200526.136236:FATAL:gpu_data_manager_impl_private.cc(415)] GPU process isn't usable. Goodbye.

Result: Pulsar does not load.

Version 2: Running with sudo sudo pulsar --safe expr: syntax error: missing argument after ‘8’

Result: Pulsar does not load, but none of the above errors occurs either. Running with sudo but without --safe also does not result in Pulsar loading.

Version 3: Running with sudo and --no-sandbox sudo pulsar --no-sandbox expr: syntax error: missing argument after ‘8’

Result: Pulsar loads, despite the singular error -but none of the the libva errors in version 1 occurs either.

Version 4: Running without sudo but with --no-sandbox

pulsar --no-sandbox cp: cannot stat 'resources/linux/desktopenviroment/cinnamon/pulsar.nemo_action': No such file or directory

Result: Pulsar loads despite the error.

Additional Information:

Kernel: 5.15.0-53-generic NVIDIA Driver: 470.141.03 (not the latest because the latest ones crashed my system) Graphics Card: NVIDIA GeForce RTX 3050 Memory: 31.2 GiB

FibroJedi avatar Nov 23 '22 20:11 FibroJedi

@FibroJedi Would you mind installing the appropriate binary from here

That'll make sure that you are up to date with the latest master branch. We can see if your missing argument error goes away

As for the cannot stat error - there's a line in pulsar.sh which is supposed to try to copy the nemo_action file from a local folder - however, this doesn't work for an installation as it's referencing the wrong directory

Spiker985 avatar Nov 23 '22 20:11 Spiker985

Can you also confirmed how you installed the binary? There's a possibility that you're installing it in a way that assigns permissions to root instead of your user, which would result in you having to always use sudo

Which isn't something you want with an editor

Spiker985 avatar Nov 23 '22 20:11 Spiker985

@Spiker985 I'm installing the binary now, but to confirm I downloaded one from what I thought was your master branch. A similar way to the one you have just shown me. I'll run the tests in a sec.

FibroJedi avatar Nov 24 '22 11:11 FibroJedi

Command Line Tests:

Test 1: pulsar (without sudo)

  • Fails with the same errors as Test 1 above.

Test 2: sudo pulsar Result: expr: syntax error: missing argument after ‘8’

Test 3: I wasn't sure if this was a valid test, but I tried with --disable-gpu

pulsar --disable-gpu cp: cannot stat 'resources/linux/desktopenviroment/cinnamon/pulsar.nemo_action': No such file or directory user@here:~$ /usr/bin/pulsar: line 194: 9744 Trace/breakpoint trap (core dumped) nohup "$PULSAR_PATH" --executed-from="$(pwd)" --pid=$$ "$@" > "$ATOM_HOME/nohup.out" 2>&1 libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null) libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null) libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null) (node:9803) Electron: Loading non-context-aware native module in renderer: '/tmp/.org.chromium.Chromium.GPXJMb'. This is deprecated, see https://github.com/electron/electron/issues/18397. (Use 'exe --trace-warnings ...' to show where the warning was created) (node:9803) Electron: Loading non-context-aware native module in renderer: '/tmp/.org.chromium.Chromium.lG40ms'. This is deprecated, see https://github.com/electron/electron/issues/18397. (node:9803) Electron: Loading non-context-aware native module in renderer: '/tmp/.org.chromium.Chromium.8UCmM7'. This is deprecated, see https://github.com/electron/electron/issues/18397. (node:9803) Electron: Loading non-context-aware native module in renderer: '/tmp/.org.chromium.Chromium.oUc1k4'. This is deprecated, see https://github.com/electron/electron/issues/18397. (node:9803) Electron: Loading non-context-aware native module in renderer: '/tmp/.org.chromium.Chromium.l4jVOZ'. This is deprecated, see https://github.com/electron/electron/issues/18397. [9744:1124/113423.037259:FATAL:gpu_data_manager_impl_private.cc(415)] GPU process isn't usable. Goodbye.

I only have a NVIDIA graphics card, no backup Intel one, so I don't know if that might be causing issues.

I'm looking into the libva errors now.

FibroJedi avatar Nov 24 '22 11:11 FibroJedi

I'm wondering if it's related to this thread https://askubuntu.com/questions/627733/hardware-acceleration-error where it says VAAPI just won't work on a discrete GPU.

As I don't have another GPU. I'll try the workaround in that thread.

FibroJedi avatar Nov 24 '22 12:11 FibroJedi

Last update: I think this thread https://bbs.archlinux.org/viewtopic.php?id=258759 indicates that VA-API isn't really compatible with NVIDIA. As I don't have a fallback GPU, it looks like I cannot run Pulsar without errors.

I will use Pulsar as I used Atom and I want to support Pulsar. I'll have to just use the --no-sandbox flag.

The VA-API might be something in the old code of Atom? I don't know, but I've tried for 2-3hrs to fix this to no avail. If you want any extra system info or command line output, please do ask though. Thanks.

[EDIT] I was able to get rid of the libva errors as the reference wasn't set in the environment variable. However, Pulsar still won't load without --no-sandbox. Error remains:

Without --no-sandbox

  1. If run without sudo /usr/bin/pulsar: line 194: 11077 Trace/breakpoint trap (core dumped) nohup "$PULSAR_PATH" --executed-from="$(pwd)" --pid=$$ "$@" > "$ATOM_HOME/nohup.out" 2>&1 [11077:1124/135850.715085:FATAL:gpu_data_manager_impl_private.cc(415)] GPU process isn't usable. Goodbye.

  2. If run with sudo expr: syntax error: missing argument after ‘8’

With --no-sandbox

  1. If run without sudo cp: cannot stat 'resources/linux/desktopenviroment/cinnamon/pulsar.nemo_action': No such file or directory

  2. If run with sudo expr: syntax error: missing argument after ‘8’

FibroJedi avatar Nov 24 '22 13:11 FibroJedi

We should be able to query the graphics providers, and automatically add "--no-sandbox" into the runtime args

Which will resolve this problem not only for you, but me as well, and eventually hundreds of other users

Spiker985 avatar Nov 24 '22 15:11 Spiker985

@Spiker985 I'm installing the binary now, but to confirm I downloaded one from what I thought was your master branch. A similar way to the one you have just shown me. I'll run the tests in a sec.

Also, just to confirm for you: you did, in fact, use one of our master builds, it was just a few days out of date and we had some adjustments between them - so I wanted to make sure you were up to date with the latest, in case some problems were resolved

Spiker985 avatar Nov 24 '22 15:11 Spiker985

I also have a PR in the works to fix the error with the pulsar.sh file (which is where that error "argument after 8" comes from

Spiker985 avatar Nov 24 '22 15:11 Spiker985

@Spiker985 I'm installing the binary now, but to confirm I downloaded one from what I thought was your master branch. A similar way to the one you have just shown me. I'll run the tests in a sec.

Also, just to confirm for you: you did, in fact, use one of our master builds, it was just a few days out of date and we had some adjustments between them - so I wanted to make sure you were up to date with the latest, in case some problems were resolved

Confirm Yes, today's test was done from the exact link you gave me.

Question Going forward, what's the best way to update Pulsar? Just going to the master branch and getting the binary from the latest commit/build?

FibroJedi avatar Nov 24 '22 16:11 FibroJedi

Is this error an issue or can I ignore it?

cp: cannot stat 'resources/linux/desktopenviroment/cinnamon/pulsar.nemo_action': No such file or directory

FibroJedi avatar Nov 24 '22 16:11 FibroJedi

Is this error an issue or can I ignore it?

cp: cannot stat 'resources/linux/desktopenviroment/cinnamon/pulsar.nemo_action': No such file or directory

Should be fixed in #175

Spiker985 avatar Nov 24 '22 17:11 Spiker985

@Spiker985 I'm installing the binary now, but to confirm I downloaded one from what I thought was your master branch. A similar way to the one you have just shown me. I'll run the tests in a sec.

Also, just to confirm for you: you did, in fact, use one of our master builds, it was just a few days out of date and we had some adjustments between them - so I wanted to make sure you were up to date with the latest, in case some problems were resolved

Confirm Yes, today's test was done from the exact link you gave me.

Question Going forward, what's the best way to update Pulsar? Just going to the master branch and getting the binary from the latest commit/build?

We're updating https://pulsar-edit.dev to include a downloads page, which will have a link to the most recent Cirrus build as well

Once we have a full release, you'll be able to download it on the downloads page

Spiker985 avatar Nov 24 '22 17:11 Spiker985

@Spiker985 I'm installing the binary now, but to confirm I downloaded one from what I thought was your master branch. A similar way to the one you have just shown me. I'll run the tests in a sec.

Also, just to confirm for you: you did, in fact, use one of our master builds, it was just a few days out of date and we had some adjustments between them - so I wanted to make sure you were up to date with the latest, in case some problems were resolved

Yes, I did.

I'm on version 1.63.2022112300 which came from the link you gave me yesterday.

FibroJedi avatar Nov 24 '22 19:11 FibroJedi

Linking a related issue from Atom, as this affects Atom too.

This is a known issue on any recent Linux distro and Electron versions less than 13.x latest.

https://github.com/atom/atom/issues/23036#issuecomment-939500928

Solution is really to get on Electron 13.x or newer, but these flags are a viable workaround for now.

See also: https://github.com/pulsar-edit/pulsar/issues/199

DeeDeeG avatar Dec 07 '22 18:12 DeeDeeG

Just adding for more data

Fedora 37 with Nvidia Proprietary drivers on Wayland using the AppImage

libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[60530:1220/161017.524088:FATAL:gpu_data_manager_impl_private.cc(415)] GPU process isn't usable. Goodbye.
Trace/breakpoint trap (core dumped)

Eschguy avatar Dec 20 '22 22:12 Eschguy

This is marked as completed but I am on UBuntu 22.04 with nvidia graphics and it still doesn't work unless I launch in the terminal with either --no-sandbox or --disable-gpu-sandbox options

reahari avatar Feb 19 '23 22:02 reahari

What type of binary? I would be expecting the .deb to work just fine. The appimage might not.

Daeraxa avatar Feb 19 '23 23:02 Daeraxa

the 1.102.2023022622 .deb downloaded from https://pulsar-edit.dev/download.html#rolling-release

reahari avatar Feb 27 '23 14:02 reahari

the 1.102.2023022622 .deb downloaded from https://pulsar-edit.dev/download.html#rolling-release

In a terminal, can you type which pulsar and make sure it is linking to a pulsar.sh file?

The sandbox option was added to the startup bash script for linux and mac. So if you must provide it, something isn't pointing to that pulsar.sh file

Spiker985 avatar Feb 27 '23 19:02 Spiker985

which pulsar returns /usr/bin/pulsar

reahari avatar Feb 27 '23 20:02 reahari

How about ls -l $(which pulsar)? Should show a symlink to a pulsar.sh file

Spiker985 avatar Feb 27 '23 21:02 Spiker985

I'm not sure if this is still a problem or not, but at some point I had to edit the .desktop file installed to my system to add the --no-sandbox flag.

(Was installed at ~/.local/share/applications/pulsar.desktop).

- Exec=/opt/Pulsar/pulsar %U
+ Exec=/opt/Pulsar/pulsar --no-sandbox %U

I think the OS/desktop launcher might be launching the binary directly, in which case we need to be sure that uses the --no-sandbox flag as well.

This was a while ago, so maybe it's been fixed by now, just mentioning this here so I don't forget to share this info somewhere.

DeeDeeG avatar Mar 01 '23 20:03 DeeDeeG

@DeeDeeG I don't actually recall and PR's that changed the desktop file to add this, so if it really is targeting the binary, this may still be an issue

confused-Techie avatar Mar 02 '23 01:03 confused-Techie

How about ls -l $(which pulsar)? Should show a symlink to a pulsar.sh file

It does not. Running it shows -rwxr-xr-x 1 root root 5330 Feb 27 14:48 /usr/bin/pulsar

reahari avatar Mar 02 '23 13:03 reahari

On a somewhat unrelated note, the Debian control.in file still marks Github as the maintainer. We need to change that.

It does not. Running it shows -rwxr-xr-x 1 root root 5330 Feb 27 14:48 /usr/bin/pulsar

Did you upgrade an earlier install, or was this a first-time install?

I wonder if the Debian installer/uninstaller/upgrade functions differently. I know for Arch Linux, it gets installed into /opt/Pulsar and then symlinks to /usr/bin/pulsar - but obviously, the AUR entry functions independently (even if using the deb as the source)

But I would expect it to entirely clean up after itself on an upgrade

Spiker985 avatar Mar 02 '23 15:03 Spiker985

Reporting in from Ubuntu: For me, on Ubuntu with Pulsar 1.102.0 Regular installed from the .deb, /usr/bin/pulsar is the launcher shell script. It has no file extension, but it is the shell launcher script, and it's not a symlink either.

Which I believe is to be expected, we do copy it in our postinstall script.

https://github.com/pulsar-edit/pulsar/blob/7d933c561f6f43def1dbb0408df9575e265f6e7d/script/post-install.sh#L3-L10

That said, if I go in and open /usr/bin/pulsar with a text editor, I can see that anywhere it is launching Pulsar on Linux, it is using --no-sandbox, which again is to be expected as of https://github.com/pulsar-edit/pulsar/pull/262 back in the end of December.

DeeDeeG avatar Mar 02 '23 19:03 DeeDeeG

I bet it's the .desktop file launching the binary directly with no --no-sandbox flag, per my comment above. We can configure this in the electron-builder config, we should do that at some point. I just hope it doesn't make us manually copy-paste an entire .desktop file's worth of fields in just to manually override this one field. Hmmm.

DeeDeeG avatar Mar 02 '23 19:03 DeeDeeG

We already have a file in place that electron-builder should use to generate the .desktop file, https://github.com/pulsar-edit/pulsar/blob/master/resources/linux/pulsar.desktop.in.

We just need to add --no-sandbox after env ATOM_DISABLE_SHELLING_OUT_FOR_ENVIRONMENT=false on the exec line

Edit: Which I can take care of on my resource update branch Edit 2: Should we be symlinking that file instead of copying it? That's the expected behaviour on all other distros Edit 3: https://github.com/pulsar-edit/pulsar/commit/5ef6ff92beefa5b20c21c5bfe1d08e3dd072a70d

Spiker985 avatar Mar 02 '23 20:03 Spiker985

I think you've got it all figured out, but just reporting that the .deb previously worked well when launched via desktop file but currently does not as a result of calling opt/Pulsar/pulsar rather than /usr/bin/pulsar as you'd get from which pulsar (terminal command works well).

curiousercreative avatar Mar 03 '23 22:03 curiousercreative