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
Livewire: " Illuminate\Routing\RouteCollectionInterface is not instantiable", Session IDs not included in AJAX calls #15
Comments
We don't use the module with Livewire so far. Can you try to dig this down for any more verbose error messages or use Xdebug to debug? If you found a fix, a pull request would be very appreciated. |
@amenk are you able to offer any help/guidance on the above. I've had a quick look however from what I can see Util::getParameterClassName($parameter) where $parameter->name ="routes" seems to return "Illuminate\Routing\RouteCollectionInterface" which then seems to traverse down through various functions within Application.php and Container.php before landing at the build() function and hitting an exception because it's not instantiable commentary for the function as below: // If the type is not instantiable, the developer is attempting to resolve |
You could try stackoverflow.com and / or provide a minimal reproducible example of the problem. |
@amenk minimal reproducible example of the problem as below: 1.) Clean install of Laravel |
@amenk a more helpful extract taken directly from my history 1.) composer create-project laravel/laravel=v9.4.0 test --prefer-dist |
Thank you very much for documenting ... we might look into it when we have time; we do provide paid services though which could speed up things... |
@amenk - could you please send me details r.e. paid service |
@elrossco22 Please send me your contact to a.menk at imi.de |
We will try to reproduce with Laravel 9 |
Reproduced on our system locally, trying to fix ... |
Thanks for the update @amenk - look forward to further updates on progress |
We have a possible fix and push it soon to a dev branch for testing. |
@elrossco22 please try requiring the version |
Hey @amenk - I've had a quick look and this partially fixes the problem. That is to say that a blade template that features a LiveWire component will now render however LiveWire itself does not work. LiveWire essentially uses Ajax to update the page data as user interacts - such as clicking a button etc. These interactions/requests are being fired however they do not take into consideration the SID in the url - I can see from my developer tools that LiveWire is posting to |
Steps to reproduce as per our example above with the 1.) Edit If you now visit the page and click the button you will get an error as we never created the function named |
We might need to patch https://github.com/livewire/livewire/blob/7d3a57b3193299cf1a0639a3935c696f4da2cf92/js/connection/index.js#L46 and rebuild the livewire.js (we are using v2.12.6) |
Actually there must be a way to extend the livewire request or payload without patching livewire :-) |
livewire has a message.sent hook, but does not have a message.prepare hook or something similar :-( |
we try the approach via a custom header: https://stackoverflow.com/a/72270789/288568 |
@elrossco22 try the latest push on the branch, pay attention to the "Livewire" section in the readme,
|
@amenk - I will test more extensively over the weekend but on a first pass this looks like it may be working :) |
@elrossco22 Did you have a change to test thoroughly? If so, we would merge the change and publish a new version. |
#15 bind RouteCollectionInterface to fix livewire
Will release a new version, thanks for reporting and the support |
@elrossco22 please contact me |
I'm trying to use this package (laravel-transsid) in conjunction with Livewire. I've followed the instructions in regards to adding the relevant service providers etc however when I call any of my Livewire components from within a blade template using the
@livewire("componentName")
syntax I get the below error[Target [Illuminate\Routing\RouteCollectionInterface] is not instantiable while building [Livewire\Redirector, iMi\LaravelTransSid\UrlGeneratorService].]
Any help would be much appreciated
The text was updated successfully, but these errors were encountered: