snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
11.09k stars 3.18k forks source link

server 500 #14489

Open uglycrab opened 7 months ago

uglycrab commented 7 months ago

Debug mode

Describe the bug

I enabled the signature feature, but server 500 appeared when the user received the asset signature, and the return screen showed an error: The asset has been accepted

Reproduction steps

I enabled the signature feature, but server 500 appeared when the user received the asset signature, and the return screen showed an error: The asset has been accepted

Expected behavior

I enabled the signature feature, but server 500 appeared when the user received the asset signature, and the return screen showed an error: The asset has been accepted

Screenshots

No response

Snipe-IT Version

6

Operating System

centos

Web Server

阿帕奇

PHP Version

7.4

Operating System

No response

Browser

No response

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

No response

snipe commented 7 months ago

Need app error logs. https://snipe-it.readme.io/docs/getting-help

Snipe-IT Documentation
Getting Help
If you're having trouble setting up Snipe-IT, don't worry!
uglycrab commented 7 months ago

需要应用程序错误日志。https://snipe-it.readme.io/docs/getting-help

Snipe-IT文档寻求帮助如果您在设置 Snipe-IT 时遇到问题,请不要担心!

Error in browser: TypeError Return value of App\Models\CheckoutAcceptance::routeNotificationForMail() must be of the type string, null returned

laravel.log: production.ERROR: Return value of App\Models\CheckoutAcceptance::routeNotificationForMail() must be of the type string, null returned {"userId":95,"exception":"[object] (TypeError(code: 0): Return value of App\Models\CheckoutAcceptance::routeNotificationForMail() must be of the type string, null returned at C:\wamp64\www\snipe-it\app\Models\CheckoutAcceptance.php:24)

[stacktrace]

0 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Notifications\RoutesNotifications.php(43): App\Models\CheckoutAcceptance->routeNotificationForMail(Object(App\Notifications\AcceptanceAssetAcceptedNotification))

1 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Notifications\Channels\MailChannel.php(53): App\Models\CheckoutAcceptance->routeNotificationFor('mail', Object(App\Notifications\AcceptanceAssetAcceptedNotification))

2 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Notifications\NotificationSender.php(148): Illuminate\Notifications\Channels\MailChannel->send(Object(App\Models\CheckoutAcceptance), Object(App\Notifications\AcceptanceAssetAcceptedNotification))

3 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Notifications\NotificationSender.php(106): Illuminate\Notifications\NotificationSender->sendToNotifiable(Object(App\Models\CheckoutAcceptance), '6a40d6a2-f1f2-4...', Object(App\Notifications\AcceptanceAssetAcceptedNotification), 'mail')

4 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Support\Traits\Localizable.php(19): Illuminate\Notifications\NotificationSender->Illuminate\Notifications\{closure}()

5 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Notifications\NotificationSender.php(109): Illuminate\Notifications\NotificationSender->withLocale(NULL, Object(Closure))

6 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Notifications\NotificationSender.php(79): Illuminate\Notifications\NotificationSender->sendNow(Object(Illuminate\Database\Eloquent\Collection), Object(App\Notifications\AcceptanceAssetAcceptedNotification))

7 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Notifications\ChannelManager.php(39): Illuminate\Notifications\NotificationSender->send(Object(Illuminate\Database\Eloquent\Collection), Object(App\Notifications\AcceptanceAssetAcceptedNotification))

8 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Notifications\RoutesNotifications.php(18): Illuminate\Notifications\ChannelManager->send(Object(App\Models\CheckoutAcceptance), Object(App\Notifications\AcceptanceAssetAcceptedNotification))

9 C:\wamp64\www\snipe-it\app\Http\Controllers\Account\AcceptanceController.php(241): App\Models\CheckoutAcceptance->notify(Object(App\Notifications\AcceptanceAssetAcceptedNotification))

10 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Controller.php(54): App\Http\Controllers\Account\AcceptanceController->store(Object(Illuminate\Http\Request), '251')

11 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction('store', Array)

12 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Route.php(262): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(App\Http\Controllers\Account\AcceptanceController), 'store')

13 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Route.php(205): Illuminate\Routing\Route->runController()

14 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Router.php(721): Illuminate\Routing\Route->run()

15 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(128): Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))

16 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Session\Middleware\AuthenticateSession.php(58): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

17 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Session\Middleware\AuthenticateSession->handle(Object(Illuminate\Http\Request), Object(Closure))

18 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Auth\Middleware\Authenticate.php(44): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

19 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Auth\Middleware\Authenticate->handle(Object(Illuminate\Http\Request), Object(Closure))

20 C:\wamp64\www\snipe-it\app\Http\Middleware\AssetCountForSidebar.php(55): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

21 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): App\Http\Middleware\AssetCountForSidebar->handle(Object(Illuminate\Http\Request), Object(Closure))

22 C:\wamp64\www\snipe-it\vendor\laravel\passport\src\Http\Middleware\CreateFreshApiToken.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

23 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Laravel\Passport\Http\Middleware\CreateFreshApiToken->handle(Object(Illuminate\Http\Request), Object(Closure))

24 C:\wamp64\www\snipe-it\app\Http\Middleware\CheckForTwoFactor.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

25 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): App\Http\Middleware\CheckForTwoFactor->handle(Object(Illuminate\Http\Request), Object(Closure))

26 C:\wamp64\www\snipe-it\app\Http\Middleware\CheckUserIsActivated.php(47): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

27 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): App\Http\Middleware\CheckUserIsActivated->handle(Object(Illuminate\Http\Request), Object(Closure))

28 C:\wamp64\www\snipe-it\app\Http\Middleware\CheckLocale.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

29 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): App\Http\Middleware\CheckLocale->handle(Object(Illuminate\Http\Request), Object(Closure))

30 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken.php(78): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

31 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))

32 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

33 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))

34 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

35 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))

36 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

37 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Router.php(723): Illuminate\Pipeline\Pipeline->then(Object(Closure))

38 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Router.php(698): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))

39 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Router.php(662): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))

40 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Routing\Router.php(651): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))

41 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(167): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))

42 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(128): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))

43 C:\wamp64\www\snipe-it\vendor\livewire\livewire\src\DisableBrowserCache.php(19): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

44 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Livewire\DisableBrowserCache->handle(Object(Illuminate\Http\Request), Object(Closure))

45 C:\wamp64\www\snipe-it\vendor\barryvdh\laravel-debugbar\src\Middleware\InjectDebugbar.php(66): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

46 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle(Object(Illuminate\Http\Request), Object(Closure))

47 C:\wamp64\www\snipe-it\vendor\fruitcake\laravel-cors\src\HandleCors.php(38): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

48 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Fruitcake\Cors\HandleCors->handle(Object(Illuminate\Http\Request), Object(Closure))

49 C:\wamp64\www\snipe-it\app\Http\Middleware\PreventBackHistory.php(23): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

50 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): App\Http\Middleware\PreventBackHistory->handle(Object(Illuminate\Http\Request), Object(Closure))

51 C:\wamp64\www\snipe-it\app\Http\Middleware\SecurityHeaders.php(26): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

52 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): App\Http\Middleware\SecurityHeaders->handle(Object(Illuminate\Http\Request), Object(Closure))

53 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

54 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull.php(31): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))

55 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle(Object(Illuminate\Http\Request), Object(Closure))

56 C:\wamp64\www\snipe-it\app\Http\Middleware\CheckForDebug.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

57 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): App\Http\Middleware\CheckForDebug->handle(Object(Illuminate\Http\Request), Object(Closure))

58 C:\wamp64\www\snipe-it\app\Http\Middleware\CheckForSetup.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

59 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): App\Http\Middleware\CheckForSetup->handle(Object(Illuminate\Http\Request), Object(Closure))

60 C:\wamp64\www\snipe-it\vendor\fideloper\proxy\src\TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

61 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))

62 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\View\Middleware\ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

63 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))

64 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

65 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest(Object(Illuminate\Http\Request), Object(Illuminate\Session\Store), Object(Closure))

66 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))

67 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

68 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle(Object(Illuminate\Http\Request), Object(Closure))

69 C:\wamp64\www\snipe-it\app\Http\Middleware\NoSessionStore.php(28): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

70 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(167): App\Http\Middleware\NoSessionStore->handle(Object(Illuminate\Http\Request), Object(Closure))

71 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))

72 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(142): Illuminate\Pipeline\Pipeline->then(Object(Closure))

73 C:\wamp64\www\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(111): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))

74 C:\wamp64\www\snipe-it\public\index.php(52): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))

75 {main}

"}

[PHP Modules] bcmath bz2 calendar Core ctype curl date dom exif fileinfo filter gd gettext gmp hash iconv imap intl json ldap libxml mbstring mysqli mysqlnd openssl pcre PDO pdo_mysql pdo_sqlite Phar readline Reflection session SimpleXML soap sockets sodium SPL standard tokenizer xml xmlreader xmlrpc xmlwriter xsl zip zlib

Snipe-IT Documentation
Getting Help
If you're having trouble setting up Snipe-IT, don't worry!
snipe commented 7 months ago

Is it possible that user (or multiple users) were imported somehow with a space as their email address?

uglycrab commented 7 months ago

是否有可能以某种方式导入用户(或多个用户)并使用空格作为其电子邮件地址?

No user is imported and the administrator manually creates the user. When the user receives the asset signature, server 500 appears. A page refresh error indicates that the asset has been accepted

snipe commented 7 months ago

I'm not able to reproduce this locally :(

mengxunlingxue commented 3 months ago

我在7.0.9版本中也遇到了同样的问题,不过通过日志,我解决了该问题,并能使用户成功签署,以下是操作方法,你也可以尝试下 `cd /var/www/html/snipeit/storage/logs chmod 777 laravel.log

php artisan config:cache php artisan config:clear php artisan cache:clear php artisan view:clear `