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

Issue with Bus facade/batches in computed property #47

Closed
undjike opened this issue Sep 8, 2023 · 4 comments
Closed

Issue with Bus facade/batches in computed property #47

undjike opened this issue Sep 8, 2023 · 4 comments
Assignees

Comments

@undjike
Copy link

undjike commented Sep 8, 2023

Volt Version

1.3.0

Laravel Version

10.10.0

PHP Version

8.2.3

Database Driver & Version

MySQL 8.0.28

Description

I don't know what's wrong but this code generates an error.

$batch = computed(fn () => Bus::findBatch($this->batchId));

// Even when I use a constant as batch ID like...
$batch = computed(fn () => Bus::findBatch('xxxxxxxx'));

image
image

Even if I create a variable to assign this expression on mount, same error.
But once I put something other than this expression, everything works.

I wonder whether it's caused by the Bus facade...

Here is how the view code looks like
image

Steps To Reproduce

In a Volt component (here anonymous), create a computed property retrieving a batch instance from the database.

@undjike
Copy link
Author

undjike commented Sep 9, 2023

Even this syntax causes the same issue.

image

Here, the batchId is coming from Folio.

@undjike
Copy link
Author

undjike commented Sep 10, 2023

More and more strange.

I even created a classic Livewire full page component.
But it seems like, with Volt installed, the problem stays the same.

image

@undjike
Copy link
Author

undjike commented Sep 14, 2023

I think I found out where this issue is coming from.

It's caused by these lines of code :

  1. Within \Illuminate\Bus\Dispatcher::findBatch

image

  1. Within \Illuminate\Bus\Batchable::batch

image

Any idea of how we can tacle it?

@nunomaduro
Copy link
Collaborator

Hey there,

Can you first please try one of the support channels below? If you can actually identify this as a bug, feel free to open up a new issue with a link to the original one and we'll gladly help you out.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants