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

Fatal error when running shift-cli #7

Closed
mberneis opened this issue Sep 26, 2023 · 11 comments
Closed

Fatal error when running shift-cli #7

mberneis opened this issue Sep 26, 2023 · 11 comments
Labels
bug Something isn't working

Comments

@mberneis
Copy link

  • Laravel Version: 10.25.0
  • PHP Version: 8.2.10
  • Shift CLI Version: 0.2.7
  • Platform: Mac

Issue:

Get fatal error when running shift-cli

Command:

shift-cli

Output:

Fatal error: Uncaught Error: Call to undefined function _HumbugBox31b2283d0314\app() in phar:///Users/mberneis/.composer/vendor/laravel-shift/cli/builds/shift-cli/vendor/autoload.php:64
Stack trace:
#0 /Users/mberneis/dev/nanofetch-21/vendor/spatie/ray/src/helpers.php(23): app('Spatie\\LaravelR...')
#1 /Users/mberneis/dev/nanofetch-21/vendor/spatie/ray/src/helpers.php(55): ray()
#2 [internal function]: {closure}()
#3 {main}
  thrown in phar:///Users/mberneis/.composer/vendor/laravel-shift/cli/builds/shift-cli/vendor/autoload.php on line 64

Before/After Snippets:

// PLEASE PASTE THE CODE SNIPPET BEFORE RUNNING THE COMMAND...
// PLEASE PASTE THE CODE SNIPPET AFTER RUNNING THE COMMAND...
@mberneis mberneis added the bug Something isn't working label Sep 26, 2023
@jasonmccreary
Copy link
Collaborator

This is a known bug/incompatibility with Spatie's Ray package. As a temporary work around, you may remove the spatie/ray package.

@AdamWills
Copy link

Just ran into this myself. Will likely hold off adding shift-cli until this is resolved.

Looking forward to using this!

@tshafer
Copy link

tshafer commented Sep 27, 2023

Same problem, going to hold off as well.

@jasonmccreary
Copy link
Collaborator

I'll take a look at this today. It's something with the bundling either in the Shift CLI or Ray.

@jasonmccreary
Copy link
Collaborator

@mberneis, I'm not able to reproduce this error. I believe this happens if the Shift CLI encounters an error when it runs and is attempting to send it to Ray.

Can you let me know if this happens when you run a single, simple task like down-migration.

Also if you are running the Ray app in the background or just the open source package?

@mberneis
Copy link
Author

@jasonmccreary - I am not running ray (although I have it in my composer but I have not started the ray app at the moment)

The error appears only with one task:

shift-cli run model-table

I have no explicit ray calls but something throws an error.
However, my laravel log does not show any error when I run the shift command

@AdamWills
Copy link

I'm having the same experience with that single shift if that's helpful at all.

@jasonmccreary
Copy link
Collaborator

Thanks @mberneis, that does help.

I have pushed a new build (0.2.8) which I believe will solve this problem. Please run composer update and let me know. Note: I have not rebuilt the cli-premium package. I want to ensure this works first.

@mberneis
Copy link
Author

Yes, no more errors (the model-table task did not make any changes to my code, but probably none were needed)
Thanks, JMac!

@AdamWills
Copy link

Confirmed that the new release is working over here as well!

Thanks!

@jasonmccreary
Copy link
Collaborator

Woohoo!

Thanks all. And thanks @freekmurze for granting my access to Ray so I could diagnose the issue. It was the bundling for Shift CLI, but the stack trace was nonetheless helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants