telescope: Base table or view not found: 1146 Table 'homestead.telescope_entries' doesn't exist when trying to composer require the package
Looks like this is trying to record the package:discover command before i have had chance to run the migrations. đŚ
[2018-10-29 15:06:05] local.ERROR: SQLSTATE[42S02]: Base table or view not found: 1146 Table âhomestead.telescope_entriesâ doesnât exist (SQL: insert into telescope_entries
(batch_id
, content
, created_at
, type
, uuid
) values (8c23240c-60f0-4435-8031-9b393766394a, {âcommandâ:âpackage:discoverâ,âexit_codeâ:0,âargumentsâ:{âcommandâ:âpackage:discoverâ},âoptionsâ:{âhelpâ:false,âquietâ:false,âverboseâ:false,âversionâ:false,âansiâ:false,âno-ansiâ:false,âno-interactionâ:false,âenvâ:null},âoutputâ:ââ,âhostnameâ:â5b3b6f02f219â}, 2018-10-29 15:06:05, command, 8c23240c-6080-402b-92d3-6bc3bf0b3554)) {âexceptionâ:"[object] (Illuminate\Database\QueryException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table âhomestead.telescope_entriesâ doesnât exist (SQL: insert into telescope_entries
(batch_id
, content
, created_at
, type
, uuid
) values (8c23240c-60f0-4435-8031-9b393766394a, {"command":"package:discover","exit_code":0,"arguments":{"command":"package:discover"},"options":{"help":false,"quiet":false,"verbose":false,"version":false,"ansi":false,"no-ansi":false,"no-interaction":false,"env":null},"output":"","hostname":"5b3b6f02f219"}, 2018-10-29 15:06:05, command, 8c23240c-6080-402b-92d3-6bc3bf0b3554)) at /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664, Doctrine\DBAL\Driver\PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table âhomestead.telescope_entriesâ doesnât exist at /app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:82, PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table âhomestead.telescope_entriesâ doesnât exist at /app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:80)
[stacktrace]
#0 /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php(624): Illuminate\Database\Connection->runQueryCallback(âinsert into te...', Array, Object(Closure)) #1 /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php(459): Illuminate\\Database\\Connection->run('insert into
teâŚâ, Array, Object(Closure))
#2 /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php(411): Illuminate\Database\Connection->statement(âinsert into te...', Array) #3 /app/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2541): Illuminate\\Database\\Connection->insert('insert into
teâŚâ, Array)
#4 /app/vendor/laravel/telescope/src/Storage/DatabaseEntriesRepository.php(117): Illuminate\Database\Query\Builder->insert(Array)
#5 /app/vendor/laravel/telescope/src/Telescope.php(453): Laravel\Telescope\Storage\DatabaseEntriesRepository->store(Object(Illuminate\Support\Collection))
#6 /app/vendor/laravel/telescope/src/ListensForStorageOpportunities.php(44): Laravel\Telescope\Telescope::store(Object(Laravel\Telescope\Storage\DatabaseEntriesRepository))
#7 [internal function]: Laravel\Telescope\Telescope::Laravel\Telescope\{closure}()
#8 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Object(Closure), Array)
#9 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(75): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#10 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Object(Closure), Object(Closure))
#11 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(571): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Object(Closure), Array, NULL)
#12 /app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(965): Illuminate\Container\Container->call(Object(Closure))
#13 /app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(149): Illuminate\Foundation\Application->terminate()
#14 /app/artisan(54): Illuminate\Foundation\Console\Kernel->terminate(Object(Symfony\Component\Console\Input\ArgvInput), 0)
#15 {main}
"}
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 22 (1 by maintainers)
I encountered this issue when running
php artisan migrate
. As far as I can tell, telescope is trying to log cache hits before there was a cache table in my database. Iâm unsure of exactly what the issue is, but this was the error message:Base' table or view not found: 1146 Table 'x.cache' doesn't exist (SQL: select * from 'cache' where 'key' = x_cachetelescope:dump-watcher limit 1)
On Laravel 5.8, using the database as a cache driver.
I resolved it by changing
CACHE_DRIVER=file
in.env
, running the migration and then changing theCACHE_DRIVER
back to databaseHope that helps someone whoâs stuck.
Having the same issue (using L5.8). It helped running
php artisan migrate
first before runningphp artisan telescope:install
to make it install without errors.If anyone still has this issue, make sure to run:
php artisan optimize
composer dump-autoload
php artisan cache:table php artisan migrate
fixed it for me
âMe tooâ on the CI/docker front. You can reproduce by just doing :