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

After install, errors with laravel db functions #43

Open
ghost opened this issue May 13, 2019 · 15 comments
Open

After install, errors with laravel db functions #43

ghost opened this issue May 13, 2019 · 15 comments

Comments

@ghost
Copy link

ghost commented May 13, 2019

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!

@impactcolor
Copy link

@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.

@DonxDaniyar
Copy link

@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

@impactcolor
Copy link

impactcolor commented Sep 20, 2019

How did you integrate routes into your project? @DonxDaniyar

@impactcolor
Copy link

impactcolor commented Sep 20, 2019

Actually that did it for me composer.json to ^1.0.0. You're awesome @DonxDaniyar THANK YOU!

@DonxDaniyar
Copy link

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

@impactcolor
Copy link

Ya same here, I'm digging into that right now @DonxDaniyar

@impactcolor
Copy link

impactcolor commented Sep 20, 2019

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

@akazorg
Copy link
Member

akazorg commented Sep 20, 2019

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!

@DonxDaniyar
Copy link

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

@DonxDaniyar
Copy link

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!!!

@impactcolor
Copy link

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.

@DonxDaniyar
Copy link

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!!!

@impactcolor
Copy link

@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
Copy link

@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.

@impactcolor
Copy link

Yes I did uncomment.
@DonxDaniyar can you push your whole build to git hub using laravel 5.7?

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

No branches or pull requests

3 participants