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.85k stars 839 forks source link

postman fails to start under WSL2/Ubuntu 22.04 with ARM64 architecture #13014

Open etxaleku opened 3 months ago

etxaleku commented 3 months ago

Is there an existing issue for this?

Describe the Issue

Environment = WSL2/Ubuntu 22.04 with ARM64 architecture

Installed postman using: sudo snap install postman

Installation went smoothly and /snap/postman/260 mounted.

Startup fails as follows:

$ postman
The disableGPU setting is set to undefined
Not disabling GPU
(node:203841) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency
(Use `postman --trace-warnings ...` to show where the warning was created)
(node:203841) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'find' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'head' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'set' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'test' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'to' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency
(node:203841) Warning: Accessing non-existent property 'which' of module exports inside circular dependency
[203841:0716/125056.442288:ERROR:ozone_platform_x11.cc(247)] Missing X server or $DISPLAY
[203841:0716/125056.442367:ERROR:env.cc(226)] The platform failed to initialize.  Exiting.
[0716/125056.453466:ERROR:scoped_ptrace_attach.cc(27)] ptrace: Operation not permitted (1)
Segmentation fault

Interestingly I noticed that the file

/snap/postman/260/usr/share/postman/resources/app/node_modules/shelljs/commands.js

contains all those "properties" in exactly the order listed in the errors above but unable to figure out what, if anything, that means.

Several other X-windows applications work smoothly, e.g. emacs, gnome-tweaks, etc. DISPLAY variable is set and exported as usual.

$ echo $DISPLAY
:0

Tried postman --trace-warnings but the error message was exactly the same with no additional information.

Tried DISABLE_WAYLAND=1 snap run postman which several others reported as helpful but again the error message was unchanged.

Tried bash --norc to get a shell with no local profile environmental modifications (in case those were causing the issue) and then tried running postman but again the error message was unchanged.

Tried to get snap logs but since postman never started I was not too surprised to see -

$ sudo snap logs postman
error: snap "postman" has no services

Snap info -

$ snap info postman
name:      postman
summary:   API Development Environment
publisher: Postman, Inc. (postman-inc**)
store-url: https://snapcraft.io/postman
contact:   https://www.postman.com/contact-us
license:   unset
description: |
  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. Over 30 million
  developers and 500,000 organizations use Postman, which is available for Mac OS X, Windows, Linux,
  and Chrome users.
commands:
  - postman
snap-id:      fFcOtEEF4EdyYb95IUE5Isy28tICYMLf
tracking:     v11/stable
refresh-date: 3 days ago, at 17:21 CDT
channels:
  v11/stable:       11.2.0   2024-06-18 (260) 177MB -
  v11/candidate:    ^
  v11/beta:         ^
  v11/edge:         11.2.0   2024-06-18 (260) 177MB -
  latest/stable:    11.2.0   2024-06-18 (260) 177MB -
  latest/candidate: ^
  latest/beta:      ^
  latest/edge:      ^
  v10/stable:       10.24.26 2024-06-03 (255) 174MB -
  v10/candidate:    ^
  v10/beta:         ^
  v10/edge:         10.24.26 2024-06-03 (255) 174MB -
installed:          11.2.0              (260) 177MB -

My emacs was installed via snap and it works smoothly without any issues that I can see. I mention emacs because

$ which postman
/snap/bin/postman
$ which emacs
/snap/bin/emacs

Steps To Reproduce

  1. Boot up a WSL2/Ubuntu 22.04 operating system running on ARM64 architecture (Surface Pro 11)
  2. Open a terminal window in Ubuntu
  3. Install Postman snap a. sudo snap install postman
  4. Run postman a. postman

Screenshots or Videos

No response

Operating System

Linux

Postman Version

11.2.0

Postman Platform

Postman App

User Account Type

Signed In User

Additional Context?

The WSL2 environment, even on the Surface Pro 11 with ARM64 (Snapdragon), seems very stable. Able to compile gcc and emacs both from source (complex compilations done as an exercise to understand WSL2/arm64 compatibility) and have not really run into any issues other than this one with Postman and unfortunately the fact that the JetBrains IDEs IntelliJ and Pycharm snaps are not available on ARM64. :(

I really appreciate and enjoy snap, and the Snap Store just makes installation/maintenance a pleasure! I have been using snaps for about a year now on my old Intel platform and never had a need to understand more about snap than "snap install" and go! After running into this Postman issue I have had a chance to read up on snap and it is very comprehensive.

JF04 commented 1 week ago

Same error here with x64/WSL2

$ postman
The disableGPU setting is set to undefined
Not disabling GPU
[6480:1105/123806.561077:ERROR:ozone_platform_x11.cc(240)] Missing X server or $DISPLAY
[6480:1105/123806.561113:ERROR:env.cc(257)] The platform failed to initialize.  Exiting.
[1105/123806.569050:ERROR:scoped_ptrace_attach.cc(27)] ptrace: Operation not permitted (1)
Segmentation fault (core dumped)

$ DISABLE_WAYLAND=1 snap run postman
The disableGPU setting is set to undefined
Not disabling GPU
[2180:1105/125032.495313:ERROR:ozone_platform_x11.cc(240)] Missing X server or $DISPLAY
[2180:1105/125032.495361:ERROR:env.cc(257)] The platform failed to initialize.  Exiting.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04.1 LTS
Release:        24.04
Codename:       noble

$ snap list postman
Name     Version  Rev  Tracking    Publisher     Notes
postman  11.18.0  287  v11/stable  postman-inc✓  -

Did you find a solution?

etxaleku commented 1 week ago

I have not found a solution and the issue still persists today.

$ snap list postman Name Version Rev Tracking Publisher Notes postman 11.18.0 288 v11/stable postman-inc** -

I saw a lot of people saying they had success with various xhost commands but I even tried

$ xhost + access control disabled, clients can connect from any host

But still no luck.

Of course the fact that postman can be run from a browser or installed locally via tarball greatly reduces the impact of this issue - but it would be nice to have it managed through the snap framework.