den1n / nova-queues

Queues resource for Laravel Nova.
MIT License
12 stars 8 forks source link

Failed to parse time string #1

Closed Jamesking56 closed 3 years ago

Jamesking56 commented 3 years ago

Getting this exception in logs when trying to view queues in Nova:

(Exception(code: 0): DateTime::__construct(): Failed to parse time string (1620634615) at position 8 (1): Unexpected character at /home/futwatch/staging/releases/19/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php:85)
[stacktrace]
#0 /home/futwatch/staging/releases/19/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php(85): DateTime->__construct('1620634615', Object(Carbon\\CarbonTimeZone))
#1 /home/futwatch/staging/releases/19/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php(183): Carbon\\Carbon->__construct('1620634615', NULL)
#2 /home/futwatch/staging/releases/19/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php(214): Carbon\\Carbon::rawParse('1620634615', NULL)
#3 /home/futwatch/staging/releases/19/vendor/den1n/nova-queues/src/Resources/Job.php(106): Carbon\\Carbon::parse('1620634615')
#4 [internal function]: Den1n\\NovaQueues\\Resources\\Job->Den1n\\NovaQueues\\Resources\\{closure}('1620634615', Object(Den1n\\NovaQueues\\Models\\Job), 'available_at')
#5 /home/futwatch/staging/releases/19/vendor/laravel/nova/src/Fields/Field.php(252): call_user_func(Object(Closure), '1620634615', Object(Den1n\\NovaQueues\\Models\\Job), 'available_at')
#6 /home/futwatch/staging/releases/19/vendor/laravel/framework/src/Illuminate/Support/helpers.php(263): Laravel\\Nova\\Fields\\Field->Laravel\\Nova\\Fields\\{closure}('1620634615')
#7 /home/futwatch/staging/releases/19/vendor/laravel/nova/src/Fields/Field.php(253): tap('1620634615', Object(Closure))
#8 /home/futwatch/staging/releases/19/vendor/laravel/nova/src/Fields/Field.php(217): Laravel\\Nova\\Fields\\Field->resolve(Object(Den1n\\NovaQueues\\Models\\Job), 'available_at')
#9 /home/futwatch/staging/releases/19/vendor/laravel/nova/src/ResolvesFields.php(39): Laravel\\Nova\\Fields\\Field->resolveForDisplay(Object(Den1n\\NovaQueues\\Models\\Job))
#10 /home/futwatch/staging/releases/19/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php(234): Laravel\\Nova\\Resource->Laravel\\Nova\\{closure}(Object(Laravel\\Nova\\Fields\\DateTime), 6)
#11 /home/futwatch/staging/releases/19/vendor/laravel/nova/src/ResolvesFields.php(47): Illuminate\\Support\\Collection->each(Object(Closure))
#12 /home/futwatch/staging/releases/19/vendor/laravel/nova/src/Resource.php(463): Laravel\\Nova\\Resource->indexFields(Object(Laravel\\Nova\\Http\\Requests\\ResourceIndexRequest))
#13 /home/futwatch/staging/releases/19/vendor/laravel/framework/src/Illuminate/Collections/HigherOrderCollectionProxy.php(60): Laravel\\Nova\\Resource->serializeForIndex(Object(Laravel\\Nova\\Http\\Requests\\ResourceIndexRequest))
#14 [internal function]: Illuminate\\Support\\HigherOrderCollectionProxy->Illuminate\\Support\\{closure}(Object(Den1n\\NovaQueues\\Resources\\Job), 0)
#15 /home/futwatch/staging/releases/19/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(642): array_map(Object(Closure), Array, Array)
#16 /home/futwatch/staging/releases/19/vendor/laravel/framework/src/Illuminate/Collections/HigherOrderCollectionProxy.php(61): Illuminate\\Support\\Collection->map(Object(Closure))
#17 /home/futwatch/staging/releases/19/vendor/laravel/nova/src/Http/Controllers/ResourceIndexController.php(24): Illuminate\\Support\\HigherOrderCollectionProxy->__call('serializeForInd...', Array)
#18 /home/futwatch/staging/releases/19/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): Laravel\\Nova\\Http\\Controllers\\ResourceIndexController->handle(Object(Laravel\\Nova\\Http\\Requests\\ResourceIndexRequest), 'jobs')
#19 /home/futwatch/staging/releases/19/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction('handle', Array)
#20 /home/futwatch/staging/releases/19/vendor/laravel/framework/src/Illuminate/Routing/Route.php(254): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(Laravel\\Nova\\Http\\Controllers\\ResourceIndexController), 'handle')

... and so on ...
den1n commented 3 years ago

Please try to update to v1.1.5.

Jamesking56 commented 3 years ago

I tried to update and got an error during deployment (when running php artisan view:cache):

The "/home/sites/15a/5/564543e965/staging/releases/234/vendor/den1n/nova-queues/src/../resources/views" directory does not exist.
den1n commented 3 years ago

@Jamesking56 Thanks for PR. New tag v1.1.6.

Jamesking56 commented 3 years ago

Confirmed this is now fixed