Shopify / shopify-cli

Shopify CLI helps you build against the Shopify platform faster.
https://shopify.dev/tools/cli
Other
1.01k stars 201 forks source link

[Bug]: Shopify CLI commands doesn't work due to marshal data too short issue #2686

Closed vantrangaof closed 1 year ago

vantrangaof commented 2 years ago

Please confirm that you:

What type of project are you working on?

theme

Expected behavior

The commands should have worked as usual.

Actual behavior

I have been using Shopify CLI 2.x for a while and there was no issue. However, all of a sudden, all Shopify CLI commands showed the "marshal data too short (ArgumentError)" issue as shown in the stack trace.

I have tried updating to the latest Shopify CLI 3.x, reinstalling Shopify CLI 2.x, and also updating Ruby ver. but it still doesn't work.

I have also looked for this issue online but to no avail. I'm still fresh in the field so I might have missed out on something. It would be great to have your support to look into this issue. Thank you.

Stack trace

/Users/username/.rbenv/versions/3.0.0/lib/ruby/3.0.0/pstore.rb:484:in `load': marshal data too short (ArgumentError)
    from /Users/username/.rbenv/versions/3.0.0/lib/ruby/3.0.0/pstore.rb:484:in `load'
    from /Users/username/.rbenv/versions/3.0.0/lib/ruby/3.0.0/pstore.rb:404:in `load_data'
    from /Users/username/.rbenv/versions/3.0.0/lib/ruby/3.0.0/pstore.rb:330:in `transaction'
    from /Users/username/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/shopify-cli-2.31.0/lib/shopify_cli/db.rb:86:in `get'
    from /Users/username/.rbenv/versions/3.0.0/lib/ruby/3.0.0/forwardable.rb:238:in `get'
    from /Users/username/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/shopify-cli-2.31.0/lib/shopify_cli/migrator.rb:28:in `last_migration_date'
    from /Users/username/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/shopify-cli-2.31.0/lib/shopify_cli/migrator.rb:11:in `migrate'
    from /Users/username/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/shopify-cli-2.31.0/lib/shopify_cli.rb:189:in `<module:ShopifyCLI>'
    from /Users/username/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/shopify-cli-2.31.0/lib/shopify_cli.rb:42:in `<top (required)>'
    from <internal:/Users/username/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
    from <internal:/Users/username/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
    from /Users/username/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/shopify-cli-2.31.0/bin/shopify:9:in `require'
    from /Users/username/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/shopify-cli-2.31.0/bin/load_shopify.rb:18:in `<top (required)>'
    from /Users/username/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/shopify-cli-2.31.0/bin/shopify:45:in `require_relative'
    from /Users/username/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/shopify-cli-2.31.0/bin/shopify:45:in `<top (required)>'
    from /Users/username/.rbenv/versions/3.0.0/bin/shopify:23:in `load'
    from /Users/username/.rbenv/versions/3.0.0/bin/shopify:23:in `<main>'

Reproduction steps

  1. Run any Shopify CLI commands, including shopify shopify2 i.e. A command such as shopify version will show the error

Operating System

MacOS Ventura 13.0.1

CLI version (run shopify version if you're not sure)

3.22.1

Shell

bash

Ruby version (run ruby -v if you're not sure)

ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin22]

What language and version are you using in your application?

No response

github-actions[bot] commented 1 year ago

This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action.

→ If there's no activity within a week, then a bot will automatically close this.

Thanks for helping to improve Shopify's dev tooling and experience.