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

[Bug]: All Shopify cli commands yield no result at all on macOS 13 Ventura #697

Closed
2 tasks done
ananthu-kurup opened this issue Nov 1, 2022 · 16 comments · Fixed by #753 or #754
Closed
2 tasks done

[Bug]: All Shopify cli commands yield no result at all on macOS 13 Ventura #697

ananthu-kurup opened this issue Nov 1, 2022 · 16 comments · Fixed by #753 or #754
Labels
Type: Bug Something isn't working

Comments

@ananthu-kurup
Copy link

Please confirm that you have:

  • Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
  • Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?

Theme

Expected behavior

Following through the Shopify documentation for CLI installation for macOS, the final step for verification should yield the version number of Shopify-cli as the result.

The installation verification is to be done using the below command
shopify version

Actual behavior

Running the command does not yield any output. Any Shopify command results in nothing being printed on console or anything action being performed. I have replicated the same on two separate MacBooks, both have been setup from scratch post macOS 13 Ventura installation after formatting the drives.

Stack trace

No response

Reproduction steps

  1. brew install shopify-cli
  2. shopify version

Screenshot 2022-11-01 at 6 35 53 PM

Operating System

Mac OS Ventura

Shopify CLI version (check your project's package.json if you're not sure)

3.21.0

Shell

zsh

Node version (run node -v if you're not sure)

v14.15.5

What language and version are you using in your application?

3.1.2

@ananthu-kurup ananthu-kurup added the Type: Bug Something isn't working label Nov 1, 2022
@ananthu-kurup ananthu-kurup changed the title [Bug]: All Shopify cli commands yield no result all on macOS 13 Ventura [Bug]: All Shopify cli commands yield no result at all on macOS 13 Ventura Nov 3, 2022
@ananthu-kurup
Copy link
Author

Was able to replicate this on another MacBook with macOS 12. So my initial opinion on this being related to Ventura doesn't seem to have any grounds.

@amcaplan
Copy link
Contributor

amcaplan commented Nov 8, 2022

Hi @ananthu-kurup, thanks for opening an issue!

I was waiting to respond until upgrading, now I upgraded and it still works fine, and I see you also reproduced on macos 12. So yes, not related.

I'm really not sure what would be causing this, but I have 2 suggestions for diagnosis:

  1. Please try running shopify version --verbose and paste what gets printed.
  2. It might have something to do with color support. Pipe to cat to simulate a non-TTY environment, which should disable colors and formatting, and let me know what happens. shopify version | cat

@ananthu-kurup
Copy link
Author

Hey @amcaplan, thank you for the response.

This is a weird issue indeed. I have tried the following so far:

  1. Ran shopify version --verbose and the behaviour is pretty much the same, no output.
  2. Piped to cat, i.e ran shopify version | cat, with no output.
  3. Redirected the output to a file using >> and > for good measure, i.e shopify version >> output.txt. Just an empty text file.

Also tried going through any signs on console.app. Nothing there either. All 3 MacBooks I tried this on are setup in the same manner, so if this is indeed a colour support issue related to the way the shell is setup, it would affect all of them.

Just to add to context, theme check server crashes when I load VS Code. Though I am not sure how much of that is related to this.

@amcaplan
Copy link
Contributor

amcaplan commented Nov 9, 2022

Hmmmm, this is a stumper.

I wonder if it has something to do with node generally, since printing is generally happening via console.log.

Just as a broad sanity check, what happens if you run:

node -e "console.log('hello')"

@ananthu-kurup
Copy link
Author

Running the node command results in expected result of printing hello on the console. I also have other projects that I work on built on node and there are no issues with those projects at all.

@pakatagoh
Copy link

pakatagoh commented Nov 9, 2022

I'm having the same issue. I made sure to uninstall all previous shopify-cli tools and reinstalled the latest shopify-cli

and running shopify commands results in an empty response in the console + nothing happens

I'm on macos 12.5.1

node v14.15.0

@amcaplan
Copy link
Contributor

amcaplan commented Nov 9, 2022

This is really baffling. 2 more ideas:

  1. Run with DEBUG flag set as well. DEBUG=* shopify version --verbose
  2. What is the process exit code? Run shopify version then echo $? and write what happens.

@amcaplan
Copy link
Contributor

amcaplan commented Nov 9, 2022

Also, another sanity check, just to make sure shopify is the right one. What is the output for which shopify?

@amcaplan
Copy link
Contributor

amcaplan commented Nov 9, 2022

And actually if you can print cat $(which shopify) as well, please.

I wonder if there's something left over from CLI2 that's breaking things.

@ananthu-kurup
Copy link
Author

The following are the outputs of all the above commands.

➜ cd ~

~
➜ DEBUG=* shopify version --verbose

~
➜ shopify version

~
➜ echo $?
0

~
➜ cat $(which shopify)
#!/usr/bin/env node

process.env.SHOPIFY_RUBY_BINDIR = "/opt/homebrew/opt/ruby/bin"
process.env.SHOPIFY_HOMEBREW_FORMULA = "shopify-cli"

import("./shopify-original");

@amcaplan
Copy link
Contributor

amcaplan commented Nov 9, 2022

OK, so I've played around with different node versions, and it seems that something about node 14.15, recent macos, and Shopify CLI isn't playing well together. When I run locally on 14.15.5, I get this error:

$  shopify -h

<--- Last few GCs --->

[6310:0x140008000]       18 ms: Scavenge 3.0 (4.9) -> 2.6 (5.6) MB, 0.5 / 0.0 ms  (average mu = 1.000, current mu = 1.000) allocation failure 


<--- JS stacktrace --->

FATAL ERROR: wasm code commit Allocation failed - process out of memory
 1: 0x10240ab04 node::Abort() [/opt/dev/sh/nvm/versions/node/v14.15.5/bin/node]
 2: 0x10240ac68 node::OnFatalError(char const*, char const*) [/opt/dev/sh/nvm/versions/node/v14.15.5/bin/node]
 3: 0x10252c0f0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/opt/dev/sh/nvm/versions/node/v14.15.5/bin/node]
 4: 0x10252c070 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/opt/dev/sh/nvm/versions/node/v14.15.5/bin/node]
 5: 0x102aef0fc v8::internal::wasm::WasmCodeAllocator::AllocateForCodeInRegion(v8::internal::wasm::NativeModule*, unsigned long, v8::base::AddressRegion, v8::internal::wasm::WasmCodeAllocator::OptionalLock const&) [/opt/dev/sh/nvm/versions/node/v14.15.5/bin/node]
 6: 0x102aefcd0 v8::internal::wasm::NativeModule::CreateEmptyJumpTableInRegion(int, v8::base::AddressRegion, v8::internal::wasm::WasmCodeAllocator::OptionalLock const&) [/opt/dev/sh/nvm/versions/node/v14.15.5/bin/node]
 7: 0x102aee8d0 v8::internal::wasm::NativeModule::AddCodeSpace(v8::base::AddressRegion, v8::internal::wasm::WasmCodeAllocator::OptionalLock const&) [/opt/dev/sh/nvm/versions/node/v14.15.5/bin/node]
 8: 0x102aefae0 v8::internal::wasm::NativeModule::NativeModule(v8::internal::wasm::WasmEngine*, v8::internal::wasm::WasmFeatures const&, v8::internal::VirtualMemory, std::__1::shared_ptr<v8::internal::wasm::WasmModule const>, std::__1::shared_ptr<v8::internal::Counters>, std::__1::shared_ptr<v8::internal::wasm::NativeModule>*) [/opt/dev/sh/nvm/versions/node/v14.15.5/bin/node]
 9: 0x102af22c4 v8::internal::wasm::WasmCodeManager::NewNativeModule(v8::internal::wasm::WasmEngine*, v8::internal::Isolate*, v8::internal::wasm::WasmFeatures const&, unsigned long, std::__1::shared_ptr<v8::internal::wasm::WasmModule const>) [/opt/dev/sh/nvm/versions/node/v14.15.5/bin/node]
10: 0x102afe474 v8::internal::wasm::WasmEngine::NewNativeModule(v8::internal::Isolate*, v8::internal::wasm::WasmFeatures const&, std::__1::shared_ptr<v8::internal::wasm::WasmModule const>, unsigned long) [/opt/dev/sh/nvm/versions/node/v14.15.5/bin/node]
11: 0x102acc188 v8::internal::wasm::AsyncCompileJob::CreateNativeModule(std::__1::shared_ptr<v8::internal::wasm::WasmModule const>, unsigned long) [/opt/dev/sh/nvm/versions/node/v14.15.5/bin/node]
12: 0x102acc364 v8::internal::wasm::AsyncCompileJob::GetOrCreateNativeModule(std::__1::shared_ptr<v8::internal::wasm::WasmModule const>, unsigned long) [/opt/dev/sh/nvm/versions/node/v14.15.5/bin/node]
13: 0x102ad4af8 v8::internal::wasm::AsyncCompileJob::PrepareAndStartCompile::RunInForeground(v8::internal::wasm::AsyncCompileJob*) [/opt/dev/sh/nvm/versions/node/v14.15.5/bin/node]
14: 0x102ad48d8 v8::internal::wasm::AsyncCompileJob::CompileTask::RunInternal() [/opt/dev/sh/nvm/versions/node/v14.15.5/bin/node]
15: 0x102469a0c node::PerIsolatePlatformData::RunForegroundTask(std::__1::unique_ptr<v8::Task, std::__1::default_delete<v8::Task> >) [/opt/dev/sh/nvm/versions/node/v14.15.5/bin/node]
16: 0x10246868c node::PerIsolatePlatformData::FlushForegroundTasksInternal() [/opt/dev/sh/nvm/versions/node/v14.15.5/bin/node]
17: 0x102c5ea68 uv__async_io [/opt/dev/sh/nvm/versions/node/v14.15.5/bin/node]
18: 0x102c70d68 uv__io_poll [/opt/dev/sh/nvm/versions/node/v14.15.5/bin/node]
19: 0x102c5ef24 uv_run [/opt/dev/sh/nvm/versions/node/v14.15.5/bin/node]
20: 0x102443c7c node::NodeMainInstance::Run() [/opt/dev/sh/nvm/versions/node/v14.15.5/bin/node]
21: 0x1023e2dfc node::Start(int, char**) [/opt/dev/sh/nvm/versions/node/v14.15.5/bin/node]
22: 0x1af533e50 start [/usr/lib/dyld]
zsh: abort      shopify -h

I'm not sure why I see the error and it just stays blank for you... but I suspect it might be related.

Can you try upgrading node and seeing what happens? It seems to work for me on 14.21.

@amcaplan
Copy link
Contributor

amcaplan commented Nov 9, 2022

For more information, node 14.x < 14.17 doesn't support apple silicon.

@pakatagoh
Copy link

verified it works after switching to node v16.x

and re-ran the installation. Also during the re-installation you can see that shopify cli was upgraded 3.21.0 -> 3.22.1

See video

Screen.Recording.2022-11-09.at.21.51.53.mov

also see the issue appearing when switching between versions

Screen.Recording.2022-11-09.at.21.56.00.mov

Maybe the shopify docs should indicate a section about compatibility with apple silicon macs and node

@amcaplan
Copy link
Contributor

amcaplan commented Nov 9, 2022

I'm glad this solved it for you! It's the first time we've come across this, but we'll be sure to make a fix to prevent this happening in the future!

@MLDMoritz
Copy link

This should not be closed. Same issues on WSL2 ubuntu with Node 19.

@amcaplan
Copy link
Contributor

Hi @MLDMoritz, thanks for bringing this up! I don't recommend commenting on closed issues, as the weekly on-call will not get notified. Instead, please open a new issue as the details and diagnosis may be different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
4 participants