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

Crash when trying to import collections #4

Open
jaudiger opened this issue Aug 27, 2021 · 9 comments
Open

Crash when trying to import collections #4

jaudiger opened this issue Aug 27, 2021 · 9 comments

Comments

@jaudiger
Copy link

When I'm trying to import collections, the UI is not displayed correctly, and it even crashed after having played with the buttons:

image

flatpak run rest.insomnia.Insomnia
[2 preload-host-spawn-strategy] Running: /app/bin/zypak-helper child - /app/main/insomnia --type=zygote
08:18:16.418 › Running version 2021.4.1
08:18:16.423 › [electron client protocol] FAILED to set default protocol 'insomnia://'
08:18:16.425 › [electron client protocol] the current executable is not the default protocol for 'insomnia://'
08:18:16.427 › [electron client protocol] the default application set for 'insomnia://' was not found
Gtk-Message: 08:18:16.454: Failed to load module "canberra-gtk-module"
Gtk-Message: 08:18:16.454: Failed to load module "pk-gtk-module"
Gtk-Message: 08:18:16.454: Failed to load module "canberra-gtk-module"
Gtk-Message: 08:18:16.454: Failed to load module "pk-gtk-module"
08:18:16.539 › [fix] Running database repairs
08:18:16.582 › [db] Initialized DB at /home/jaudiger/.var/app/rest.insomnia.Insomnia/config/Insomnia/insomnia.$TYPE.db
08:18:16.582 › [db] Init responses DB
08:18:16.584 › [localstorage] Initialized at /home/jaudiger/.var/app/rest.insomnia.Insomnia/config/Insomnia/localStorage
08:18:16.626 › [main] Loading file:///app/main/resources/app.asar/renderer.html
08:18:16.638 › [ga] Non-interactive General, Launched, 2021.4.1
08:18:16.648 › [ga] Queued event [
  { name: 't', value: 'event' },
  { name: 'ec', value: 'General' },
  { name: 'ea', value: 'Launched' },
  { name: 'ni', value: '1' },
  { name: 'el', value: '2021.4.1' }
]
08:18:17.139 › [updater] Updater not running platform=linux dev=false
08:18:18.167 › [db] Initialized DB client
(node:80) Electron: Loading non-context-aware native module in renderer: '/run/user/1000/app/rest.insomnia.Insomnia/.org.chromium.Chromium.A1ecyh'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:80) Electron: Loading non-context-aware native module in renderer: '/run/user/1000/app/rest.insomnia.Insomnia/.org.chromium.Chromium.LtBfFf'. This is deprecated, see https://github.com/electron/electron/issues/18397.
08:18:18.486 › [FileSystemDriver] Initialized in "/home/jaudiger/.var/app/rest.insomnia.Insomnia/config/Insomnia/version-control"
08:18:18.501 › [ga] Event Activity, Change, debug
08:18:18.502 › [ga] Page /debug
08:18:20.058 › [ga] Event Modals, Show, SettingsModal

(insomnia:2): Gdk-ERROR **: 08:18:22.491: The program 'insomnia' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadShmSeg (invalid shared segment parameter)'.
  (Details: serial 583 error_code 128 request_code 130 (MIT-SHM) minor_code 3)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
@WhyNotHugo
Copy link

I can't quite reproduce this; I exported and imported a file once and it worked.

Can you try upgrading to 2021.5.0 and see if that works?

@jaudiger
Copy link
Author

jaudiger commented Aug 27, 2021

I got the same issue with the latest update of Insomnia. See the logs below:

flatpak run rest.insomnia.Insomnia
[2 preload-host-spawn-strategy] Running: /app/bin/zypak-helper child - /app/main/insomnia --type=zygote
18:40:29.428 › Running version 2021.5.0
18:40:29.434 › [electron client protocol] FAILED to set default protocol 'insomnia://'
18:40:29.437 › [electron client protocol] the current executable is not the default protocol for 'insomnia://'
18:40:29.439 › [electron client protocol] the default application set for 'insomnia://' was not found
Gtk-Message: 18:40:29.466: Failed to load module "canberra-gtk-module"
Gtk-Message: 18:40:29.466: Failed to load module "pk-gtk-module"
Gtk-Message: 18:40:29.466: Failed to load module "canberra-gtk-module"
Gtk-Message: 18:40:29.466: Failed to load module "pk-gtk-module"
18:40:29.561 › [fix] Running database repairs
18:40:29.602 › [db] Initialized DB at /home/jaudiger/.var/app/rest.insomnia.Insomnia/config/Insomnia/insomnia.$TYPE.db
18:40:29.603 › [db] Init responses DB
18:40:29.605 › [localstorage] Initialized at /home/jaudiger/.var/app/rest.insomnia.Insomnia/config/Insomnia/localStorage
18:40:29.644 › [main] Loading file:///app/main/resources/app.asar/renderer.html
18:40:29.661 › [ga] Non-interactive General, Updated, 2021.5.0
18:40:29.667 › [ga] Queued event [
  { name: 't', value: 'event' },
  { name: 'ec', value: 'General' },
  { name: 'ea', value: 'Updated' },
  { name: 'ni', value: '1' },
  { name: 'el', value: '2021.5.0' }
]
18:40:30.162 › [updater] Updater not running platform=linux dev=false
(node:79) Electron: Loading non-context-aware native module in renderer: '/run/user/1000/app/rest.insomnia.Insomnia/.org.chromium.Chromium.NjxYuc'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:79) Electron: Loading non-context-aware native module in renderer: '/run/user/1000/app/rest.insomnia.Insomnia/.org.chromium.Chromium.fAhDib'. This is deprecated, see https://github.com/electron/electron/issues/18397.

(insomnia:2): Gdk-ERROR **: 18:40:40.076: The program 'insomnia' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadShmSeg (invalid shared segment parameter)'.
  (Details: serial 1395 error_code 128 request_code 130 (MIT-SHM) minor_code 3)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Maybe it's linked to the warnings logs and deprecation logs. In which environment did you test?

I'm currently running a Gnome Fedora 34 with Wayland.

@WhyNotHugo
Copy link

I'm seeing some of the same warnings, but no crash. This is my output after a full export-import:

[2 preload-host-spawn-strategy] Running: /app/bin/zypak-helper child - /app/main/insomnia --type=zygote
09:06:11.783 › Running version 2021.5.0
09:06:11.791 › [electron client protocol] FAILED to set default protocol 'insomnia://'
09:06:11.797 › [electron client protocol] the current executable is not the default protocol for 'insomnia://'
09:06:11.801 › [electron client protocol] the default application set for 'insomnia://' was not found
09:06:11.947 › [fix] Running database repairs
09:06:12.109 › [db] Initialized DB at /home/hugo/.var/app/rest.insomnia.Insomnia/config/Insomnia/insomnia.$TYPE.db
09:06:12.110 › [db] Init responses DB
09:06:12.115 › [localstorage] Initialized at /home/hugo/.var/app/rest.insomnia.Insomnia/config/Insomnia/localStorage
09:06:12.198 › [main] Loading file:///app/main/resources/app.asar/renderer.html
09:06:12.215 › [ga] Non-interactive General, Launched, 2021.5.0
09:06:12.224 › [ga] Queued event [
  { name: 't', value: 'event' },
  { name: 'ec', value: 'General' },
  { name: 'ea', value: 'Launched' },
  { name: 'ni', value: '1' },
  { name: 'el', value: '2021.5.0' }
]
09:06:12.717 › [updater] Updater not running platform=linux dev=false
(node:78) Electron: Loading non-context-aware native module in renderer: '/run/user/1000/app/rest.insomnia.Insomnia/.org.chromium.Chromium.KazyI6'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:78) Electron: Loading non-context-aware native module in renderer: '/run/user/1000/app/rest.insomnia.Insomnia/.org.chromium.Chromium.rn4nM7'. This is deprecated, see https://github.com/electron/electron/issues/18397.

But I can't repro the crash itself, and have no idea what might be causing it. I'm using Arch with sway (so also Wayland).

An extra hint though: This flatpak by default doesn't have permissions to any directory on the host, so to actually import collections, you might want to grant it permissions to some specific directory. I recommend using Flatseal for that if you prefer a GUI.

@jaudiger
Copy link
Author

jaudiger commented Sep 6, 2021

When granting user home directory permission, I'm able to import the collections, that's a huge improvement. But I still got the weird icons and if I took too much time to import the data, the UI is still crashing. That's so weird!

At least, I'm able to use it right now, since it's only crashing on this specific window.

@WhyNotHugo
Copy link

When granting user home directory permission, I'm able to import the collections

Yeah, this'll be a caveat of this Flatpak until Insomnia upgrades to Electron 14: electron/electron#19159

I am curious as to what's causing your crashes. Does the non-flatpak version work fine for you? What DE are you using? Have the logs yielded anything else?

@jaudiger
Copy link
Author

jaudiger commented Sep 7, 2021

The version of Insomnia installed through my package manager is working fine. I never encountered this issue before. The version I used was 2021.3. That's why I was a bit surprised when I saw this issue with the flatpak version. I have nothing else. But maybe I can find more logs in another location.

I'm currently using Gnome 40 with Wayland on Fedora 34.

@filfreire
Copy link

Hi folks, fyi, this might also be related to what @tqwewe reported on the Insomnia issues recently.

It seems like the flatpak exec command should include the additional argument --filesystem=home.

A temporary workaround is to edit the file at /var/lib/flatpak/exports/share/applications/rest.insomnia.Insomnia.desktop and add the argument to the Exec section.

sudo nano /var/lib/flatpak/exports/share/applications/rest.insomnia.Insomnia.desktop
[Desktop Entry]
Name=Insomnia
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --filesystem=home --command=/app/bin/insomnia --file-forwarding rest.insomnia.Insomnia --no-sandbox @@u %U @@
...

Note I added the --filesystem=home argument to the entry file.

Once updated, you can press ALT F2, and enter "r" to reload gnome.

@hexchain
Copy link
Collaborator

hexchain commented Aug 2, 2024

Is this still an issue in the latest version?

@jaudiger
Copy link
Author

jaudiger commented Aug 3, 2024

@hexchain, good question! I don't have access to a Linux right now. If it's not reproducible with the latest version, I guess we can close it!

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

4 participants