postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.79k stars 839 forks source link

Native Wayland Support #9746

Open matthew-jones-uk opened 3 years ago

matthew-jones-uk commented 3 years ago

Is your feature request related to a problem? Please describe. There's no native Wayland support with Postman, XWayland has to be used.

Describe the solution you'd like Support for Wayland as XWayland isn't great, especially with mixed DPI environments.

Describe alternatives you've considered N/A.

Additional context Electron 12 introduced (nearly) full Wayland support, would it be possible to enable this? Possibly a duplicate of #6252 but that issue was closed and seemed to intend to enable compatibility with Wayland, not support.

mamantoha commented 2 years ago

It's starts under native Wayland with /opt/Postman/Postman --enable-features=UseOzonePlatform --ozone-platform=wayland But fails "Segmentation fault" when the cursor moves to the window.

matthew-jones-uk commented 2 years ago

I can confirm that I experience similar behaviour.

mamantoha commented 2 years ago

@matthew-jones-uk as far as I understand, the latest stable build is still on 11.1.1, thus it doesn't have the Ozone code path properly enabled.

image

We need to wait while developers update it to Electron 12.

sepehr commented 1 year ago

Eagerly looking forward to this. Many other Electron-based apps, including Insomnia which I just have switched to, have considered this for their Linux users. Hope postman will join.

nik-kashi commented 10 months ago

Any update after two years, please? High-resolution monitors are trending now and supporting the mixed DPI is crucial for dev tools. Postman is the only tool(from my stack) that does not support this feature. Is there any plan for supporting Wayland or is this neglected?

eEQK commented 6 months ago

this should be working, in your application shortcut (in my case /usr/share/applications/postman.desktop) edit this:

Exec=/opt/postman/Postman %U

to this:

Exec=/opt/postman/Postman --enable-features=UseOzonePlatform --ozone-platform=wayland %U
simepy commented 6 months ago

@eEQK I tried, and at least it not segfault anymore. I tried your solution and --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations but is not working I still have a blurry text on my HDPI screen. I'm on arch / Gnome with Postman 10.22

andreaippo commented 4 months ago

this should be working, in your application shortcut (in my case /usr/share/applications/postman.desktop) edit this:

Exec=/opt/postman/Postman %U

to this:

Exec=/opt/postman/Postman --enable-features=UseOzonePlatform --ozone-platform=wayland %U

I'm happy to report that this one worked for me. I'm running opensuse Tumbleweed snapshot 20240311 with KDE Plasma 6.0.1 and postman downloaded from the official website:

Postman for Linux Version 10.23.8 UI version 10.23.8-ui-240226-0504

Desktop platform version 10.23.5

Architecture x64

OS platform linux 6.7.7-1-default

Here's my full .desktop file, placed under:

~/.local/share/applications/

The postman archive was un-tar'd under my home/bin folder

[Desktop Entry]
Encoding=UTF-8
Name=Postman
Exec=/home/andrea/bin/Postman/app/Postman --enable-features=UseOzonePlatform --ozone-platform=wayland %U
Icon=/home/andrea/bin/Postman/app/resources/app/assets/icon.png
Terminal=false
Type=Application
Categories=Development;

Hope this is useful to someone.

That's it, now go out there and enjoy those super-crispy fonts! :)

1Jo1 commented 3 months ago

I have tried both postman --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations or postman -enable-features=UseOzonePlatform --ozone-platform=wayland etc. none of them working...

(Fedora 38 arm64)

The disableGPU setting is set to undefined
Not disabling GPU
[52746:0410/143433.668274:ERROR:wayland_connection.cc(214)] Failed to connect to Wayland display
[52746:0410/143433.668289:ERROR:ozone_platform_wayland.cc(227)] Failed to initialize Wayland platform
[52746:0410/143433.668292:ERROR:env.cc(226)] The platform failed to initialize.  Exiting.
The futex facility returned an unexpected error code.zsh: IOT instruction (core dumped)  postman -enable-features=UseOzonePlatform --ozone-platform=wayland
andreaippo commented 3 months ago

I have tried both postman --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations or postman -enable-features=UseOzonePlatform --ozone-platform=wayland etc. none of them working...

(Fedora 38 arm64)

The disableGPU setting is set to undefined
Not disabling GPU
[52746:0410/143433.668274:ERROR:wayland_connection.cc(214)] Failed to connect to Wayland display
[52746:0410/143433.668289:ERROR:ozone_platform_wayland.cc(227)] Failed to initialize Wayland platform
[52746:0410/143433.668292:ERROR:env.cc(226)] The platform failed to initialize.  Exiting.
The futex facility returned an unexpected error code.zsh: IOT instruction (core dumped)  postman -enable-features=UseOzonePlatform --ozone-platform=wayland

Are you running it as a flatpak? If so, maybe try overriding the following flags via flatseal:

image

Otherwise try with the RPM package

romanstingler commented 3 months ago

postman --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations This works for me on arch out of the box. But is there a way to use a ~/.config/?-flags.conf file? electron-flags.conf doesn't work export ELECTRON_OZONE_PLATFORM_HINT=wayland doesn't work

andreaippo commented 2 months ago

Hello, I'd like to report an issue when running postman in Wayland mode inside a KDE Plasma 6.0 (Wayland) session

Postman info:

Version
11.1.13
UI version
11.1.13-ui-240520-0433

Desktop platform version
11.1.0

Architecture
x64

OS platform
linux 6.9.1-1-default

System info:

Operating System: openSUSE Tumbleweed 20240520
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.0
Kernel Version: 6.9.1-1-default (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7840U w/ Radeon 780M Graphics
Memory: 30,7 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: Framework
Product Name: Laptop 13 (AMD Ryzen 7040Series)
System Version: A7

App installed via tar.gz.

.desktop file looks like this to run it as a Wayland app:

[Desktop Entry]
Encoding=UTF-8
Name=Postman RPM
Comment=Postman RPM
Exec=/home/andrea/bin/Postman/app/Postman --enable-features=UseOzonePlatform --ozone-platform=wayland %U
Icon=/home/andrea/bin/Postman/app/resources/app/assets/icon.png
Terminal=false
Type=Application
Categories=Development;

The problem consists in a coordinate offset between the pointer position and the location at which the effects of mouse actions (hovering, clicking) are produced.

As an example, here I was hovering over some request tabs and clicked on one. Instead of selecting/opening it, the URL bar for the current tab was focused/clicked instead, i.e. my mouse click produced its effects a bunch of pixels away from the pointer position. Notice also how the pointer turned into a caret:

image

I can reproduce this when only when my laptop is connected to an external monitor && the app is on the external monitor. As soon as I move the postman window to the internal display, or disconnect the external monitor and operate the internal one only, the issue disappears. Important: it seems that the issue does not happen on the first start of the app (even if it opens on the external monitor). In this case it's enough to move the app window to the internal display, and then back to the external one, and the coordinate offset will become apparent.

For information, my laptop display scaling is set to 120%, while the external one is unscaled (100%).

I will try to run the app under gnome

Thanks!

andreaippo commented 2 months ago

Hello, I'd like to report an issue when running postman in Wayland mode inside a KDE Plasma 6.0 (Wayland) session

Postman info:

Version
11.1.13
UI version
11.1.13-ui-240520-0433

Desktop platform version
11.1.0

Architecture
x64

OS platform
linux 6.9.1-1-default

System info:

Operating System: openSUSE Tumbleweed 20240520
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.0
Kernel Version: 6.9.1-1-default (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7840U w/ Radeon 780M Graphics
Memory: 30,7 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: Framework
Product Name: Laptop 13 (AMD Ryzen 7040Series)
System Version: A7

App installed via tar.gz.

.desktop file looks like this to run it as a Wayland app:

[Desktop Entry]
Encoding=UTF-8
Name=Postman RPM
Comment=Postman RPM
Exec=/home/andrea/bin/Postman/app/Postman --enable-features=UseOzonePlatform --ozone-platform=wayland %U
Icon=/home/andrea/bin/Postman/app/resources/app/assets/icon.png
Terminal=false
Type=Application
Categories=Development;

The problem consists in a coordinate offset between the pointer position and the location at which the effects of mouse actions (hovering, clicking) are produced.

As an example, here I was hovering over some request tabs and clicked on one. Instead of selecting/opening it, the URL bar for the current tab was focused/clicked instead, i.e. my mouse click produced its effects a bunch of pixels away from the pointer position. Notice also how the pointer turned into a caret:

image

I can reproduce this when only when my laptop is connected to an external monitor && the app is on the external monitor. As soon as I move the postman window to the internal display, or disconnect the external monitor and operate the internal one only, the issue disappears.

For information, my laptop display scaling is set to 120%, while the external one is unscaled (100%).

I will try to run the app under gnome

Thanks!

Note to self:

flatpak app is also affected. To run it as a Wayland app:

Configure it as follows via flatseal: image

Change the Exec directive inside the .desktop file to:

Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=Postman --file-forwarding com.getpostman.Postman --enable-features=UseOzonePlatform --ozone-platform=wayland @@u %U @@
andreaippo commented 2 months ago

I will try to run the app under gnome

Same result, tested with the fedora 40 live medium and the archive I downloaded from https://www.getpostman.com/

You really need to move the window to the internal display (scaled) and back to the external (unscaled) one, only then you will reproduce the issue.

romanstingler commented 2 months ago

yes absolutely true they f*** up something terrible, I tested like 8 electron apps with various Electron versions, all are at least usable. But here I can start it and as soon as you resize it, it just dies. And other stuff like, doesn't rescale when resized. Element interactions are not recognized .....

andreaippo commented 2 months ago

@DannyDainton is this ticket being checked/considered by the Postman DEV team? Is Wayland on your roadmap?

Thanks :)