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

🐛 Majestic not showing ui #223

Open
sschneider-ihre-pvs opened this issue Mar 29, 2022 · 2 comments
Open

🐛 Majestic not showing ui #223

sschneider-ihre-pvs opened this issue Mar 29, 2022 · 2 comments

Comments

@sschneider-ihre-pvs
Copy link

sschneider-ihre-pvs commented Mar 29, 2022

I only see the following on starting majestic �ÿ

Majestic v1.8.1 is running at http://localhost:4000

System:
    OS: Windows 10 10.0.19042
    CPU: (16) x64 Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz
  Binaries:
    Node: 16.14.2
    Yarn: 1.22.4
    npm: 8.5.0
  npmPackages:
    jest: ^27.5.1 => 27.5.1
@MattCollins84
Copy link

MattCollins84 commented May 10, 2022

I am getting the same, it opens the URL in the browser but nothing happens except it refuses to connect/times out.

using the --debug flag shows nothing either

OS: Windows 11
Node: 14.81.1
NPM: 6.14.15
Jest: ^27.4.7

@david-alexander
Copy link

david-alexander commented May 30, 2023

I know this is an old issue, but I've just come across some information that may be helpful.

I ran into the issue today, and did some digging into what was going on. It was getting stuck on this spawnSync call, trying to list the tests. Basically this is running jest --listTests --json.

When I run jest --listTests --json manually. that hangs too, so that explains why Majestic was getting stuck. I haven't looked into exactly why this command hangs (it's probably something peculiar about the way my tests are set up, and not a Jest or Majestic issue per se), but I was able to work around it by adding --runInBand to the Jest command line (based on this StackOverflow answer to a similar sounding issue). Then I was able apply this workaround to Majestic by adding the following to my package.json:

  "majestic": {
    "args": ["--runInBand"]
  }

Assuming the cause of the issue is the same for others, they may be able to use this workaround as well.

Although the underlying issue isn't in Majestic, it might be helpful to make a couple of tweaks to make this more debuggable, such as:

  • Not using spawnSync, as this blocks the main thread and causes the Majestic HTTP server to stop responding, making it impossible to load the UI.
  • Adding some logging (maybe just in --debug mode), or something to the UI (if there isn't already -- I wasn't able to test this due to the UI not loading because of spawnSync) to show that it's trying to list the tests. That way you'd know where it was getting stuck.

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

3 participants