Hello,
I keep getting the following notification in my slack channel
Object of class Spatie\Backup\Notifications\Notifiable could not be converted to string
I have no idea why, can someone give me a pointer or is it a bug?
Thanks
The tests prove that this functionality is working as intended. Can you submit a failing test for me to look at?
Also having this issue seemingly since the last release..
Happens in artisan on this line..
$kernel->terminate($input, $status);
--
@egknight Are you by chance using Laravel Telescope?
--
Looks like when running the php artisan backup:run command manually it 'll fail due to this response (below) but in the laravel.log file it does this error message Object of class Spatie\Backup\Notifications\Notifiable could not be converted to string. I'm using Google Drive ext "nao-pon/flysystem-google-drive": "~1.1", so this may be an unexpected response from that package?
I'm running Laravel Telescope but it looks like that could also be the cause for this response.
vagrant@project-homestead:~/project$ artisan backup:run
Starting backup...
Dumping database homestead...
Determining files to backup...
Zipping 30 files...
Created zip containing 30 files. Size is 28.65 MB
Copying zip to disk named google...
Copying zip failed because: {
"error": {
"errors": [
{
"domain": "global",
"reason": "required",
"message": "Login Required",
"locationType": "header",
"location": "Authorization"
}
],
"code": 401,
"message": "Login Required"
}
}
.
Backup failed because {
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "dailyLimitExceededUnreg",
"message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.",
"extendedHelp": "https://code.google.com/apis/console"
}
],
"code": 403,
"message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup."
}
}
.
#0 /home/vagrant/project/vendor/google/apiclient/src/Google/Http/REST.php(94): Google_Http_REST::decodeHttpResponse(Object(GuzzleHttp\Psr7\Response), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...')
#1 /home/vagrant/project/vendor/google/apiclient/src/Google/Task/Runner.php(176): Google_Http_REST::doExecute(Object(GuzzleHttp\Client), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...')
#2 /home/vagrant/project/vendor/google/apiclient/src/Google/Http/REST.php(58): Google_Task_Runner->run()
#3 /home/vagrant/project/vendor/google/apiclient/src/Google/Client.php(798): Google_Http_REST::execute(Object(GuzzleHttp\Client), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...', Array)
#4 /home/vagrant/project/vendor/google/apiclient/src/Google/Service/Resource.php(232): Google_Client->execute(Object(GuzzleHttp\Psr7\Request), 'Google_Service_...')
#5 /home/vagrant/project/vendor/google/apiclient-services/src/Google/Service/Drive/Resource/Files.php(206): Google_Service_Resource->call('list', Array, 'Google_Service_...')
#6 /home/vagrant/project/vendor/nao-pon/flysystem-google-drive/src/GoogleDriveAdapter.php(913): Google_Service_Drive_Resource_Files->listFiles(Array)
#7 /home/vagrant/project/vendor/nao-pon/flysystem-google-drive/src/GoogleDriveAdapter.php(542): Hypweb\Flysystem\GoogleDrive\GoogleDriveAdapter->getItems('', true)
#8 /home/vagrant/project/vendor/league/flysystem/src/Filesystem.php(271): Hypweb\Flysystem\GoogleDrive\GoogleDriveAdapter->listContents('', true)
#9 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php(578): League\Flysystem\Filesystem->listContents('', true)
#10 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php(591): Illuminate\Filesystem\FilesystemAdapter->files('', true)
#11 /home/vagrant/project/vendor/spatie/laravel-backup/src/BackupDestination/BackupDestination.php(103): Illuminate\Filesystem\FilesystemAdapter->allFiles('')
#12 /home/vagrant/project/vendor/spatie/laravel-backup/src/BackupDestination/BackupDestination.php(140): Spatie\Backup\BackupDestination\BackupDestination->backups()
#13 /home/vagrant/project/vendor/spatie/laravel-backup/src/Notifications/BaseNotification.php(44): Spatie\Backup\BackupDestination\BackupDestination->newestBackup()
#14 /home/vagrant/project/vendor/spatie/laravel-backup/src/Notifications/Notifications/BackupHasFailed.php(50): Spatie\Backup\Notifications\BaseNotification->backupDestinationProperties()
#15 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Notifications/Messages/SlackMessage.php(201): Spatie\Backup\Notifications\Notifications\BackupHasFailed->Spatie\Backup\Notifications\Notifications\{closure}(Object(Illuminate\Notifications\Messages\SlackAttachment))
#16 /home/vagrant/project/vendor/spatie/laravel-backup/src/Notifications/Notifications/BackupHasFailed.php(51): Illuminate\Notifications\Messages\SlackMessage->attachment(Object(Closure))
#17 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Notifications/Channels/SlackWebhookChannel.php(45): Spatie\Backup\Notifications\Notifications\BackupHasFailed->toSlack(Object(Spatie\Backup\Notifications\Notifiable))
#18 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(144): Illuminate\Notifications\Channels\SlackWebhookChannel->send(Object(Spatie\Backup\Notifications\Notifiable), Object(Spatie\Backup\Notifications\Notifications\BackupHasFailed))
#19 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(103): Illuminate\Notifications\NotificationSender->sendToNotifiable(Object(Spatie\Backup\Notifications\Notifiable), '35497e92-cffe-4...', Object(Spatie\Backup\Notifications\Notifications\BackupHasFailed), 'slack')
#20 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Support/Traits/Localizable.php(19): Illuminate\Notifications\NotificationSender->Illuminate\Notifications\{closure}()
#21 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(105): Illuminate\Notifications\NotificationSender->withLocale(NULL, Object(Closure))
#22 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(77): Illuminate\Notifications\NotificationSender->sendNow(Array, Object(Spatie\Backup\Notifications\Notifications\BackupHasFailed))
#23 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Notifications/ChannelManager.php(42): Illuminate\Notifications\NotificationSender->send(Array, Object(Spatie\Backup\Notifications\Notifications\BackupHasFailed))
#24 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Notifications/RoutesNotifications.php(18): Illuminate\Notifications\ChannelManager->send(Object(Spatie\Backup\Notifications\Notifiable), Object(Spatie\Backup\Notifications\Notifications\BackupHasFailed))
#25 /home/vagrant/project/vendor/spatie/laravel-backup/src/Notifications/EventHandler.php(33): Spatie\Backup\Notifications\Notifiable->notify(Object(Spatie\Backup\Notifications\Notifications\BackupHasFailed))
#26 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(360): Spatie\Backup\Notifications\EventHandler->Spatie\Backup\Notifications\{closure}(Object(Spatie\Backup\Events\BackupHasFailed))
#27 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(209): Illuminate\Events\Dispatcher->Illuminate\Events\{closure}('Spatie\\Backup\\E...', Array)
#28 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(482): Illuminate\Events\Dispatcher->dispatch('Spatie\\Backup\\E...')
#29 /home/vagrant/project/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJob.php(274): event(Object(Spatie\Backup\Events\BackupHasFailed))
#30 /home/vagrant/project/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJob.php(266): Spatie\Backup\Tasks\Backup\BackupJob->sendNotification(Object(Spatie\Backup\Events\BackupHasFailed))
#31 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Support/Collection.php(418): Spatie\Backup\Tasks\Backup\BackupJob->Spatie\Backup\Tasks\Backup\{closure}(Object(Spatie\Backup\BackupDestination\BackupDestination), 0)
#32 /home/vagrant/project/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJob.php(268): Illuminate\Support\Collection->each(Object(Closure))
#33 /home/vagrant/project/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJob.php(150): Spatie\Backup\Tasks\Backup\BackupJob->copyToBackupDestinations('/home/vagrant/h...')
#34 /home/vagrant/project/vendor/spatie/laravel-backup/src/Commands/BackupCommand.php(52): Spatie\Backup\Tasks\Backup\BackupJob->run()
#35 [internal function]: Spatie\Backup\Commands\BackupCommand->handle()
#36 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
#37 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#38 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#39 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Container/Container.php(572): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#40 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Console/Command.php(183): Illuminate\Container\Container->call(Array)
#41 /home/vagrant/project/vendor/symfony/console/Command/Command.php(255): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#42 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Console/Command.php(170): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#43 /home/vagrant/project/vendor/spatie/laravel-backup/src/Commands/BaseCommand.php(16): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#44 /home/vagrant/project/vendor/symfony/console/Application.php(886): Spatie\Backup\Commands\BaseCommand->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#45 /home/vagrant/project/vendor/symfony/console/Application.php(262): Symfony\Component\Console\Application->doRunCommand(Object(Spatie\Backup\Commands\BackupCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#46 /home/vagrant/project/vendor/symfony/console/Application.php(145): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#47 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Console/Application.php(89): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#48 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(122): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#49 /home/vagrant/project/artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#50 {main}
Backup failed because: unlink(/home/vagrant/project/storage/app/backup-temp/temp/2018-11-26-11-09-33.zip): Text file busy.
This is the stack from the error above.
[2018-11-26 11:05:31] local.ERROR: Object of class Spatie\Backup\Notifications\Notifiable could not be converted to string {"exception":"[object] (ErrorException(code: 0): Object of class Spatie\\Backup\\Notifications\\Notifiable could not be converted to string at /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Support/Str.php:338)
[stacktrace]
#0 /home/vagrant/project/vendor/sentry/sentry/lib/Raven/Breadcrumbs/ErrorHandler.php(34): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(4096, 'Object of class...', '/home/vagrant/h...', 338, Array)
#1 [internal function]: Raven_Breadcrumbs_ErrorHandler->handleError(4096, 'Object of class...', '/home/vagrant/h...', 338, Array)
#2 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Support/Str.php(338): substr_replace('insert into `te...', Object(Spatie\\Backup\\Notifications\\Notifiable), 105, 1)
#3 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Support/Str.php(315): Illuminate\\Support\\Str::replaceFirst('?', Object(Spatie\\Backup\\Notifications\\Notifiable), 'insert into `te...')
#4 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Database/QueryException.php(56): Illuminate\\Support\\Str::replaceArray('?', Array, 'insert into `te...')
#5 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Database/QueryException.php(39): Illuminate\\Database\\QueryException->formatMessage('insert into `te...', Array, Object(ErrorException))
#6 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Database/Connection.php(665): Illuminate\\Database\\QueryException->__construct('insert into `te...', Array, Object(ErrorException))
#7 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Database/Connection.php(624): Illuminate\\Database\\Connection->runQueryCallback('insert into `te...', Array, Object(Closure))
#8 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Database/Connection.php(459): Illuminate\\Database\\Connection->run('insert into `te...', Array, Object(Closure))
#9 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Database/Connection.php(411): Illuminate\\Database\\Connection->statement('insert into `te...', Array)
#10 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2541): Illuminate\\Database\\Connection->insert('insert into `te...', Array)
#11 /home/vagrant/project/vendor/laravel/telescope/src/Storage/DatabaseEntriesRepository.php(167): Illuminate\\Database\\Query\\Builder->insert(Array)
#12 /home/vagrant/project/vendor/laravel/telescope/src/Storage/DatabaseEntriesRepository.php(119): Laravel\\Telescope\\Storage\\DatabaseEntriesRepository->storeTags(Object(Illuminate\\Support\\Collection))
#13 /home/vagrant/project/vendor/laravel/telescope/src/Telescope.php(494): Laravel\\Telescope\\Storage\\DatabaseEntriesRepository->store(Object(Illuminate\\Support\\Collection))
#14 /home/vagrant/project/vendor/laravel/telescope/src/ListensForStorageOpportunities.php(44): Laravel\\Telescope\\Telescope::store(Object(Laravel\\Telescope\\Storage\\DatabaseEntriesRepository))
#15 [internal function]: Laravel\\Telescope\\Telescope::Laravel\\Telescope\\{closure}()
#16 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Object(Closure), Array)
#17 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(75): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#18 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Object(Closure), Object(Closure))
#19 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Container/Container.php(572): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Object(Closure), Array, NULL)
#20 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(965): Illuminate\\Container\\Container->call(Object(Closure))
#21 /home/vagrant/project/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(149): Illuminate\\Foundation\\Application->terminate()
#22 /home/vagrant/project/artisan(51): Illuminate\\Foundation\\Console\\Kernel->terminate(Object(Symfony\\Component\\Console\\Input\\ArgvInput), 1)
#23 {main}
So if I disable Laravel Telescope, this issues exception is not thrown or recorded in the laravel.log but I do see the error in CLI from the command php artisan backup:run.
So it looks like it's a Laravel Telescope issue. Possible fixes are formatting the error from the Backup "plugin", in this case that would be Google but it can also be a fix to the Google Drive package.
I'm thinking this should be reported and fixed over at Telescope.
@freekmurze That was my issue at least, I'm not sure if @egknight is using Telescope or the Google Drive Package.
I am also using telescope @Braunson
Any idea what's the root of this issue in Telescope? I can't replicate it.
Does this help...
Object of class Spatie\Backup\Notifications\Notifiable could not be converted to string
Level
ERROR
Exception
```{
"class": "ErrorException",
"message": "Object of class Spatie\\Backup\\Notifications\\Notifiable could not be converted to string",
"code": 0,
"file": "\/home\/forge\/staging-01.domain.co.uk\/vendor\/laravel\/framework\/src\/Illuminate\/Support\/Str.php:338",
"trace": [
"{\"function\":\"handleError\",\"class\":\"Illuminate\\\\Foundation\\\\Bootstrap\\\\HandleExceptions\",\"type\":\"->\",\"args\":[4096,\"Object of class Spatie\\\\Backup\\\\Notifications\\\\Notifiable could not be converted to string\",\"\/home\/forge\/staging-01.domain.co.uk\/vendor\/laravel\/framework\/src\/Illuminate\/Support\/Str.php\",338,{\"search\":\"?\",\"replace\":\"[object] (Spatie\\\\Backup\\\\Notifications\\\\Notifiable: {})\",\"subject\":\"insert into `telescope_entries_tags` (`entry_uuid`, `tag`) values (8c6c99d8-a363-4894-925b-633718e3e867, ?)\",\"position\":105}]}",
"\/home\/forge\/staging-01.domain.co.uk\/vendor\/laravel\/framework\/src\/Illuminate\/Support\/Str.php:338",
"\/home\/forge\/staging-01.domain.co.uk\/vendor\/laravel\/framework\/src\/Illuminate\/Support\/Str.php:315",
"\/home\/forge\/staging-01.domain.co.uk\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/QueryException.php:56",
"\/home\/forge\/staging-01.domain.co.uk\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/QueryException.php:39",
"\/home\/forge\/staging-01.domain.co.uk\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Connection.php:665",
"\/home\/forge\/staging-01.domain.co.uk\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Connection.php:624",
"\/home\/forge\/staging-01.domain.co.uk\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Connection.php:459",
"\/home\/forge\/staging-01.domain.co.uk\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Connection.php:411",
"\/home\/forge\/staging-01.domain.co.uk\/vendor\/lar…
@themsaid Use Laravel Backup + Google Package nao-pon/flysystem-google-drive (to backup to Google) and then for me, it was thrown when I was exceeding the daily limitdailyLimitExceededUnreg` of API calls presumably.
Looks like the package nao-pon/flysystem-google-drive throws the json error from Google's API as a custom exception/string and Telescope is expecting to be able to convert it to string but isn't.
I am backing up to Spaces on Digital Ocean using S3 disk.
From the main log..
[2018-12-05 03:30:54] production.ERROR: Object of class Spatie\Backup\Notifications\Notifiable could not be converted to string {"exception":"[object] (ErrorException(code: 0): Object of class Spatie\\Backup\\Notifications\\Notifiable could not be converted to string at /home/forge/staging-01.domain.co.uk/vendor/laravel/framework/src/Illuminate/Support/Str.php:338)
[stacktrace]
#0 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(4096, 'Object of class...', '/home/forge/sta...', 338, Array)
#1 /home/forge/staging-01.domain.co.uk/vendor/laravel/framework/src/Illuminate/Support/Str.php(338): substr_replace('insert into `te...', Object(Spatie\\Backup\\Notifications\\Notifiable), 105, 1)
#2 /home/forge/staging-01.domain.co.uk/vendor/laravel/framework/src/Illuminate/Support/Str.php(315): Illuminate\\Support\\Str::replaceFirst('?', Object(Spatie\\Backup\\Notifications\\Notifiable), 'insert into `te...')
#3 /home/forge/staging-01.domain.co.uk/vendor/laravel/framework/src/Illuminate/Database/QueryException.php(56): Illuminate\\Support\\Str::replaceArray('?', Array, 'insert into `te...')
#4 /home/forge/staging-01.domain.co.uk/vendor/laravel/framework/src/Illuminate/Database/QueryException.php(39): Illuminate\\Database\\QueryException->formatMessage('insert into `te...', Array, Object(ErrorException))
#5 /home/forge/staging-01.domain.co.uk/vendor/laravel/framework/src/Illuminate/Database/Connection.php(665): Illuminate\\Database\\QueryException->__construct('insert into `te...', Array, Object(ErrorException))
#6 /home/forge/staging-01.domain.co.uk/vendor/laravel/framework/src/Illuminate/Database/Connection.php(624): Illuminate\\Database\\Connection->runQueryCallback('insert into `te...', Array, Object(Closure))
#7 /home/forge/staging-01.domain.co.uk/vendor/laravel/framework/src/Illuminate/Database/Connection.php(459): Illuminate\\Database\\Connection->run('insert into `te...', Array, Object(Closure))
#8 /home/forge/staging-01.domain.co.uk/vendor/laravel/framework/src/Illuminate/Database/Connection.php(411): Illuminate\\Database\\Connection->statement('insert into `te...', Array)
#9 /home/forge/staging-01.domain.co.uk/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2578): Illuminate\\Database\\Connection->insert('insert into `te...', Array)
#10 /home/forge/staging-01.domain.co.uk/vendor/laravel/telescope/src/Storage/DatabaseEntriesRepository.php(166): Illuminate\\Database\\Query\\Builder->insert(Array)
#11 /home/forge/staging-01.domain.co.uk/vendor/laravel/telescope/src/Storage/DatabaseEntriesRepository.php(118): Laravel\\Telescope\\Storage\\DatabaseEntriesRepository->storeTags(Object(Illuminate\\Support\\Collection))
#12 /home/forge/staging-01.domain.co.uk/vendor/laravel/telescope/src/Telescope.php(484): Laravel\\Telescope\\Storage\\DatabaseEntriesRepository->store(Object(Illuminate\\Support\\Collection))
#13 /home/forge/staging-01.domain.co.uk/vendor/laravel/telescope/src/ListensForStorageOpportunities.php(45): Laravel\\Telescope\\Telescope::store(Object(Laravel\\Telescope\\Storage\\DatabaseEntriesRepository))
#14 [internal function]: Laravel\\Telescope\\Telescope::Laravel\\Telescope\\{closure}()
#15 /home/forge/staging-01.domain.co.uk/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Object(Closure), Array)
#16 /home/forge/staging-01.domain.co.uk/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(75): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#17 /home/forge/staging-01.domain.co.uk/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\\Container\\BoundMethod::callBoundMethod(Object(Illuminate\\Foundation\\Application), Object(Closure), Object(Closure))
#18 /home/forge/staging-01.domain.co.uk/vendor/laravel/framework/src/Illuminate/Container/Container.php(572): Illuminate\\Container\\BoundMethod::call(Object(Illuminate\\Foundation\\Application), Object(Closure), Array, NULL)
#19 /home/forge/staging-01.domain.co.uk/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(967): Illuminate\\Container\\Container->call(Object(Closure))
#20 /home/forge/staging-01.domain.co.uk/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(149): Illuminate\\Foundation\\Application->terminate()
#21 /home/forge/staging-01.domain.co.uk/artisan(51): Illuminate\\Foundation\\Console\\Kernel->terminate(Object(Symfony\\Component\\Console\\Input\\ArgvInput), 0)
#22 {main}
"}
Just had this issue in production when deploying. Before we do so, we run in php artisan backup:run in an Envoyer deployment hook.
The only noteworthy change was an update of the Laravel Framework:
- "laravel/framework": "~5.7.13",
+ "laravel/framework": "~5.7.15",
Also have Telescope ~v1 set up and backing up to Amazon S3.
Log file indicates DB dump failed, yet in our Slack channel we get the Object of class Spatie\Backup\Notifications\Notifiable could not be converted to string exception.
Starting backup...
Dumping database example...
Backup failed because The dumpfile could not be created.
#0 /home/forge/example.com/releases/20181204190433/vendor/spatie/db-dumper/src/DbDumper.php(250): Spatie\DbDumper\Exceptions\DumpFailed::dumpfileWasNotCreated()
#1 /home/forge/example.com/releases/20181204190433/vendor/spatie/db-dumper/src/Databases/MySql.php(142): Spatie\DbDumper\DbDumper->checkIfDumpWasSuccessFul(Object(Symfony\Component\Process\Process), '/home/forge/sma...')
#2 /home/forge/example.com/releases/20181204190433/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJob.php(246): Spatie\DbDumper\Databases\MySql->dumpToFile('/home/forge/sma...')
#3 [internal function]: Spatie\Backup\Tasks\Backup\BackupJob->Spatie\Backup\Tasks\Backup\{closure}(Object(Spatie\DbDumper\Databases\MySql), 'mysql')
#4 /home/forge/example.com/releases/20181204190433/vendor/laravel/framework/src/Illuminate/Support/Collection.php(1007): array_map(Object(Closure), Array, Array)
#5 /home/forge/example.com/releases/20181204190433/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJob.php(249): Illuminate\Support\Collection->map(Object(Closure))
#6 /home/forge/example.com/releases/20181204190433/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJob.php(166): Spatie\Backup\Tasks\Backup\BackupJob->dumpDatabases()
#7 /home/forge/example.com/releases/20181204190433/vendor/spatie/laravel-backup/src/Tasks/Backup/BackupJob.php(142): Spatie\Backup\Tasks\Backup\BackupJob->createBackupManifest()
#8 /home/forge/example.com/releases/20181204190433/vendor/spatie/laravel-backup/src/Commands/BackupCommand.php(52): Spatie\Backup\Tasks\Backup\BackupJob->run()
#9 [internal function]: Spatie\Backup\Commands\BackupCommand->handle()
#10 /home/forge/example.com/releases/20181204190433/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(29): call_user_func_array(Array, Array)
#11 /home/forge/example.com/releases/20181204190433/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#12 /home/forge/example.com/releases/20181204190433/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#13 /home/forge/example.com/releases/20181204190433/vendor/laravel/framework/src/Illuminate/Container/Container.php(572): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#14 /home/forge/example.com/releases/20181204190433/vendor/laravel/framework/src/Illuminate/Console/Command.php(183): Illuminate\Container\Container->call(Array)
#15 /home/forge/example.com/releases/20181204190433/vendor/symfony/console/Command/Command.php(255): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#16 /home/forge/example.com/releases/20181204190433/vendor/laravel/framework/src/Illuminate/Console/Command.php(170): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#17 /home/forge/example.com/releases/20181204190433/vendor/spatie/laravel-backup/src/Commands/BaseCommand.php(16): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /home/forge/example.com/releases/20181204190433/vendor/symfony/console/Application.php(901): Spatie\Backup\Commands\BaseCommand->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /home/forge/example.com/releases/20181204190433/vendor/symfony/console/Application.php(262): Symfony\Component\Console\Application->doRunCommand(Object(Spatie\Backup\Commands\BackupCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /home/forge/example.com/releases/20181204190433/vendor/symfony/console/Application.php(145): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /home/forge/example.com/releases/20181204190433/vendor/laravel/framework/src/Illuminate/Console/Application.php(89): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /home/forge/example.com/releases/20181204190433/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(122): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /home/forge/example.com/releases/20181204190433/artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 {main}
Backup failed because: The dumpfile could not be created.
I think you'll need to inspect what's being recorded, you may dd() or something at the beginning of DatabaseEntriesRepository::store() method to see what's being passed.
Ok we've fixed that in https://github.com/laravel/telescope/commit/0287613e09639dd0784de53ca587e665082b7618
Thanks @themsaid 👍
Most helpful comment
Ok we've fixed that in https://github.com/laravel/telescope/commit/0287613e09639dd0784de53ca587e665082b7618