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

Method Illuminate\Auth\RequestGuard::getUser does not exist. #317

Closed
Mattnmoore opened this issue Nov 3, 2018 · 3 comments
Closed

Method Illuminate\Auth\RequestGuard::getUser does not exist. #317

Mattnmoore opened this issue Nov 3, 2018 · 3 comments

Comments

@Mattnmoore
Copy link

Seems to be related to #277, I'm getting the following error:

Method Illuminate\Auth\RequestGuard::getUser does not exist.

And the interface doesn't seem to have that method defined.

@themsaid
Copy link
Member

themsaid commented Nov 3, 2018

Telescope doesn't use getUser() anywhere! Please share the complete stack trace.

@Mattnmoore
Copy link
Author

0: "#0 /vagrant/api/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php(292): Illuminate\Auth\RequestGuard->__call('getUser', Array)"
1: "#1 /vagrant/api/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(223): Illuminate\Auth\AuthManager->__call('getUser', Array)"
2: "#2 /vagrant/api/vendor/laravel/telescope/src/Telescope.php(200): Illuminate\Support\Facades\Facade::__callStatic('getUser', Array)"
3: "#3 /vagrant/api/vendor/laravel/telescope/src/Telescope.php(275): Laravel\Telescope\Telescope::record('exception', Object(Laravel\Telescope\IncomingExceptionEntry))"
4: "#4 /vagrant/api/vendor/laravel/telescope/src/Watchers/ExceptionWatcher.php(46): Laravel\Telescope\Telescope::recordException(Object(Laravel\Telescope\IncomingExceptionEntry))"
5: "#5 /vagrant/api/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(360): Laravel\Telescope\Watchers\ExceptionWatcher->recordException(Object(Illuminate\Log\Events\MessageLogged))"
6: "#6 /vagrant/api/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(209): Illuminate\Events\Dispatcher->Illuminate\Events\{closure}('Illuminate\\Log\\...', Array)"
7: "#7 /vagrant/api/vendor/laravel/framework/src/Illuminate/Log/Logger.php(210): Illuminate\Events\Dispatcher->dispatch('Illuminate\\Log\\...')"
8: "#8 /vagrant/api/vendor/laravel/framework/src/Illuminate/Log/Logger.php(174): Illuminate\Log\Logger->fireLogEvent('error', 'Method Illumina...', Array)"
9: "#9 /vagrant/api/vendor/laravel/framework/src/Illuminate/Log/Logger.php(87): Illuminate\Log\Logger->writeLog('error', 'Method Illumina...', Array)"
10: "#10 /vagrant/api/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(490): Illuminate\Log\Logger->error('Method Illumina...', Array)"
11: "#11 /vagrant/api/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(114): Illuminate\Log\LogManager->error('Method Illumina...', Array)"
12: "#12 /vagrant/api/app/Core/Exceptions/Handler.php(37): Illuminate\Foundation\Exceptions\Handler->report(Object(BadMethodCallException))"
13: "#13 /vagrant/api/vendor/dingo/api/src/Exception/Handler.php(77): Dinolytics\Core\Exceptions\Handler->report(Object(BadMethodCallException))"
14: "#14 /vagrant/api/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(81): Dingo\Api\Exception\Handler->report(Object(BadMethodCallException))"
15: "#15 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleException(Object(BadMethodCallException))"
16: "#16 {main}"

Looks like at Lines 199-201 in Telescope.php

   if (Auth::hasUser()) {
        $entry->user(Auth::getUser());
   }

@Mattnmoore
Copy link
Author

Mattnmoore commented Nov 3, 2018

Looks like I have an old version of the code as that line is correctly calling Auth::user() on the 1.0 branch. I installed this last night with composer require laravel/telescope, any idea why I'd get an older version? Looks like it calls getUser() on the master branch.

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

2 participants