mercurius
mercurius copied to clipboard
After install, errors with laravel db functions
Write a subject for the ISSUE
Having laravel function issues after installation
Server environment
- PHP: v7.2.17
- Laravel: v5.7
- Database: MySQL 5.7.25
Description
After installation, I am getting popup errors and logs are showing me things like this in the various http calls:
"message": "Call to undefined method Illuminate\\Foundation\\Application::select()", "exception": "Symfony\\Component\\Debug\\Exception\\FatalThrowableError", "file": "/home/xxx/xxx/vendor/launcher/mercurius/src/Repositories/ConversationRepository.php",
Seems like a basic error but I'm not sure what I'm missing. Any suggestions?
Thanks!
@rj1 Same here, did you get this resolved? The DB is not being read. In ConversationRepository.php this causes the error:
$res = Mercurius::model('message')
->select('sender_id')
->where('receiver_id', '=', $user)
->whereNull('seen_at')
->count();
I tried setting config/mercurius to be a local model and I'm still getting the same issue.
@rj1 Same here, did you get this resolved? The DB is not being read. In ConversationRepository.php this causes the error:
$res = Mercurius::model('message') ->select('sender_id') ->where('receiver_id', '=', $user) ->whereNull('seen_at') ->count();
I tried setting config/mercurius to be a local model and I'm still getting the same issue.
HI, i resolve the issue by change package version in composer.json to ^1.0.0 and all work. Maybe help
How did you integrate routes into your project? @DonxDaniyar
Actually that did it for me composer.json to ^1.0.0. You're awesome @DonxDaniyar THANK YOU!
Actually that did it for me composer.json to ^1.0.0. You're awesome @rj1 THANK YOU!
All is great but i have another issue that says 403 forbidden ib broadcast/auth and when click 1 user to chat all users in sidebar take active class. Can't resolve this
Ya same here, I'm digging into that right now @DonxDaniyar
Still hitting other issues but as for the broadcast/auth moving Mercurius.js to your public js file fixed that. In example I have a laravel project and I moved Mercurius.js to my own public/ directory that that solved that part. @DonxDaniyar
Hello everyone! I've been extremely busy with life, I'll do my best to fix Mercurius asap. Meanwhile, please fell free to submit a PR for fixing this issue. Thank you!
Still hitting other issues but as for the broadcast/auth moving Mercurius.js to your public js file fixed that. In example I have a laravel project and I moved Mercurius.js to my own public/ directory that that solved that part. @DonxDaniyar
Hi!! Thanks for reply! In my case moving mercurius.js from vendor\launcher\mercurius\publishable\js to public\js and rename head script in master.blade.php doesn't work. When i trace network there are 2 requests broadcast/auth first send channel_name: private-mercurius.null and call error Symfony \ Component \ HttpKernel \ Exception \ AccessDeniedHttpException No message Second request channel_name: private-mercurius.conversation.null and call status 200 OK. I can't understand how to fix this. Still take all client active when click 1 user. I install webpack and rebuid all vue files, but this didn't help. Any ideas? Thanks
Hello everyone! I've been extremely busy with life, I'll do my best to fix Mercurius asap. Meanwhile, please fell free to submit a PR for fixing this issue. Thank you!
Cool project. I love it. Want to add some functionality, but i can't use it from install)). Hope to fix all problems. In my case conversation object have this structure avatar:"vendor/mercurius/img/avatar/avatar_noa.png" created_at:"2019-09-13 14:19:28" is_online:1 message:"Sure! on the way!" seen_at:null sender:null slug:null user:"Noa Robison" Slug always null. Any idea why? Thanks!!!
I have the same issue also with the broadcasting:auth. I’m wondering if it’s because there’s a routes/channel in the Mercurius package but also one in my package? I’ve followed custom install and mixed the relative assets into my project.
I have the same issue also with the broadcasting:auth. I’m wondering if it’s because there’s a routes/channel in the Mercurius package but also one in my package? I’ve followed custom install and mixed the relative assets into my project.
I spend a lot of time to solve this and i can. In my variant i install fresh laravel 5.7 then install pusher-php-server ^3.2. Finally install mercurius ^1.0.0-alpha.2 without update. Directly install. And it works!!!
@DonxDaniyar
Any way you can detail steps?
I did all above installed Laravel 5.7, pusher php server, Mercurius 1.0.0 alpha 2 and I still get 403 error.
Here's part of my composer file:
"launcher/mercurius": "1.0.0-alpha.2",
"pusher/pusher-php-server": "3.2"
@DonxDaniyar Any way you can detail steps? I did all above installed Laravel 5.7, pusher php server, Mercurius 1.0.0 alpha 2 and I still get 403 error. Here's part of my composer file:
"launcher/mercurius": "1.0.0-alpha.2", "pusher/pusher-php-server": "3.2"
It looks like you don't uncommet BroadcastServiceProvider in config/broadcasting.php file.
Yes I did uncomment. @DonxDaniyar can you push your whole build to git hub using laravel 5.7?