Panel: Subusers front-end error on creation. version 1.0.3

Created on 26 Oct 2020  路  8Comments  路  Source: pterodactyl/panel

System information

  • PHP 7.4.11 (cli)
  • Ubuntu 18.04
  • Pterodactyl 1.0.3
  • wings 1.0.1

Client information:
Browser: Google chrome.
OS: windows 10.

To Reproduce
Steps to reproduce the behavior:

  1. Go to servers and choose a server.
  2. Click on subusers and press add user.
  3. fill in a e-mail and press some permissions. and press invite user
  4. See error below (i also included a stacktrace that happens when i press it. located in ./pterodactyl/storage/logs/{current date}).

What i tried so far:

  • Cleaning cache and upgrading pterodactyl through the steps from the official site.
  • Full reinstalling manually.
  • Searching for error on wings [no error while doing wings --debug]

Screenshot:
image

Server is also replying with error code 500:
image

Stack trace:

0 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Database/Connection.php(631): Illuminate\Database\Connection->runQueryCallback

1 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Database/Connection.php(465): Illuminate\Database\Connection->run

2 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Database/Connection.php(417): Illuminate\Database\Connection->statement

3 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php(32): Illuminate\Database\Connection->insert

4 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2772): Illuminate\Database\Query\Processors\Processor->processInsertGetId

5 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Queue/DatabaseQueue.php(162): Illuminate\Database\Query\Builder->insertGetId

6 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Queue/DatabaseQueue.php(83): Illuminate\Queue\DatabaseQueue->pushToDatabase

7 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(182): Illuminate\Queue\DatabaseQueue->push

8 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(158): Illuminate\Bus\Dispatcher->pushCommandToQueue

9 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(73): Illuminate\Bus\Dispatcher->dispatchToQueue

10 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(207): Illuminate\Bus\Dispatcher->dispatch

11 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Notifications/NotificationSender.php(76): Illuminate\Notifications\NotificationSender->queueNotification

12 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Notifications/ChannelManager.php(39): Illuminate\Notifications\NotificationSender->send

13 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Notifications/RoutesNotifications.php(18): Illuminate\Notifications\ChannelManager->send

14 /var/www/pterodactyl/app/Observers/SubuserObserver.php(41): Pterodactyl\Models\User->notify

15 (0): Pterodactyl\Observers\SubuserObserver->created

16 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(400): call_user_func_array

17 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(226): Illuminate\Events\Dispatcher->Illuminate\Events{closure}

18 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php(189): Illuminate\Events\Dispatcher->dispatch

19 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(886): Illuminate\Database\Eloquent\Model->fireModelEvent

20 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(728): Illuminate\Database\Eloquent\Model->performInsert

21 /var/www/pterodactyl/app/Repositories/Eloquent/EloquentRepository.php(106): Illuminate\Database\Eloquent\Model->save

22 /var/www/pterodactyl/app/Services/Subusers/SubuserCreationService.php(104): Pterodactyl\Repositories\Eloquent\EloquentRepository->create

23 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php(28): Pterodactyl\Services\Subusers\SubuserCreationService->Pterodactyl\Services\Subusers{closure}

24 /var/www/pterodactyl/app/Services/Subusers/SubuserCreationService.php(106): Illuminate\Database\Connection->transaction

25 /var/www/pterodactyl/app/Http/Controllers/Api/Client/Servers/SubuserController.php(92): Pterodactyl\Services\Subusers\SubuserCreationService->handle

26 (0): Pterodactyl\Http\Controllers\Api\Client\Servers\SubuserController->store

27 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array

28 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction

29 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Routing/Route.php(239): Illuminate\Routing\ControllerDispatcher->dispatch

30 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Routing/Route.php(196): Illuminate\Routing\Route->runController

31 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Routing/Router.php(685): Illuminate\Routing\Route->run

32 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Routing\Router->Illuminate\Routing{closure}

33 /var/www/pterodactyl/app/Http/Middleware/Api/Client/Server/SubuserBelongsToServer.php(29): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}

34 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Pterodactyl\Http\Middleware\Api\Client\Server\SubuserBelongsToServer->handle

35 /var/www/pterodactyl/app/Http/Middleware/Api/Client/Server/AuthenticateServerAccess.php(84): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}

36 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Pterodactyl\Http\Middleware\Api\Client\Server\AuthenticateServerAccess->handle

37 /var/www/pterodactyl/app/Http/Middleware/Api/AuthenticateIPAccess.php(28): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}

38 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Pterodactyl\Http\Middleware\Api\AuthenticateIPAccess->handle

39 /var/www/pterodactyl/app/Http/Middleware/Api/AuthenticateKey.php(82): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}

40 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Pterodactyl\Http\Middleware\Api\AuthenticateKey->handle

41 /var/www/pterodactyl/app/Http/Middleware/Api/ApiSubstituteBindings.php(75): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}

42 /var/www/pterodactyl/app/Http/Middleware/Api/Client/SubstituteClientApiBindings.php(60): Pterodactyl\Http\Middleware\Api\ApiSubstituteBindings->handle

43 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Pterodactyl\Http\Middleware\Api\Client\SubstituteClientApiBindings->handle

44 /var/www/pterodactyl/app/Http/Middleware/Api/IsValidJson.php(36): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}

45 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Pterodactyl\Http\Middleware\Api\IsValidJson->handle

46 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Session/Middleware/AuthenticateSession.php(58): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}

47 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Session\Middleware\AuthenticateSession->handle

48 /var/www/pterodactyl/app/Http/Middleware/Api/SetSessionDriver.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}

49 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Pterodactyl\Http\Middleware\Api\SetSessionDriver->handle

50 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}

51 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Routing\Middleware\ThrottleRequests->handle

52 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}

53 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(62): Illuminate\Session\Middleware\StartSession->handleStatefulRequest

54 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Session\Middleware\StartSession->handle

55 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}

56 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Routing/Router.php(687): Illuminate\Pipeline\Pipeline->then

57 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Routing/Router.php(662): Illuminate\Routing\Router->runRouteWithinStack

58 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Routing/Router.php(628): Illuminate\Routing\Router->runRoute

59 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Routing/Router.php(617): Illuminate\Routing\Router->dispatchToRoute

60 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(165): Illuminate\Routing\Router->dispatch

61 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http{closure}

62 /var/www/pterodactyl/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}

63 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\Proxy\TrustProxies->handle

64 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}

65 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle

66 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}

67 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle

68 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}

69 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle

70 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(66): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}

71 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\EncryptCookies->handle

72 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(63): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}

73 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle

74 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}

75 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(140): Illuminate\Pipeline\Pipeline->then

76 /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(109): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter

77 /var/www/pterodactyl/public/index.php(53): Illuminate\Foundation\Http\Kernel->handle

All 8 comments

Please include the actual error with the stack, it's the one line you didn't include.

Additionally please keep the error stack inside a code block so scrolling though this issue and reading it is easier.

@DaneEveritt i think the error is at the wings side because when i use the post api for subusers i get:
"errors": [ { "code": "QueryException", "status": "500", "detail": "An unexpected error was encountered while processing this request, please try again." } ]
the other part of the stack trace is:

[2020-10-26 09:59:45] production.ERROR: QueryException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'queue' in 'field list' (SQL: insert intojobs(queue,attempts,reserved_at,available_at,created_at,payload) values (standard, 0, ?, 1603720785, 1603720785, {"uuid":"REDACTED","displayName":"Pterodactyl\\Notifications\\AddedToServer","job":"Illuminate\\Queue\\CallQueuedHandler@call","maxTries":null,"maxExceptions":null,"delay":null,"timeout":null,"timeoutAt":null,"data":{"commandName":"Illuminate\\Notifications\\SendQueuedNotifications","command":"O:48:\"Illuminate\\Notifications\\SendQueuedNotifications\":13:{s:11:\"notifiables\";O:45:\"Illuminate\\Contracts\\Database\\ModelIdentifier\":4:{s:5:\"class\";s:23:\"Pterodactyl\\Models\\User\";s:2:\"id\";a:1:{i:0;i:2;}s:9:\"relations\";a:0:{}s:10:\"connection\";s:5:\"mysql\";}s:12:\"notification\";O:39:\"Pterodactyl\\Notifications\\AddedToServer\":10:{s:6:\"server\";O:8:\"stdClass\":3:{s:4:\"user\";s:5:\"Dylan\";s:4:\"name\";s:18:\"Testserver\";s:9:\"uuidShort\";s:8:\"REDACTED\";}s:2:\"id\";s:36:\"REDACTED\";s:6:\"locale\";N;s:10:\"connection\";N;s:5:\"queue\";N;s:15:\"chainConnection\";N;s:10:\"chainQueue\";N;s:5:\"delay\";N;s:10:\"middleware\";a:0:{}s:7:\"chained\";a:0:{}}s:8:\"channels\";a:1:{i:0;s:4:\"mail\";}s:5:\"tries\";N;s:7:\"timeout\";N;s:3:\"job\";N;s:10:\"connection\";N;s:5:\"queue\";N;s:15:\"chainConnection\";N;s:10:\"chainQueue\";N;s:5:\"delay\";N;s:10:\"middleware\";a:0:{}s:7:\"chained\";a:0:{}}"}})) in /var/www/pterodactyl/vendor/laravel/framework/src/Illuminate/Database/Connection.php:671 // I REPLACED SOME PARTS WITH 'REDACTED'

It looks like something is wrong with your database setup, since it is trying to access a column that does not exist at all.

@DaneEveritt The database should be fine.
I also manually added the rows for the subuser and everything is working. but what i said: the error has to be on the wings side because when i do an api request with curl i can fetch and everything. and i can change users that exist.

BUT when i ADD a user the api replies with: '"errors": [ { "code": "QueryException", "status": "500", "detail": "An unexpected error was encountered while processing this request, please try again." } ]' so there has to be something wrong there.

this is the error i get from CURL and from the html inspector.

i also enabled wings by doing wings --debug but there was not appearing anything while making that request

Subuser creation/management/deletion does not communicate with Wings, at all, so not sure what is leading you to believe that. :)

Also, the error is literally:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'queue' in 'field list'

my bad then! :)
But i do not know what happend with the database then. i did a full reinstall 2 times.

Sorry if it was a failure by me in any way then i am sorry i did take your time.

i was confinced it was a global bug and not a database bug. because i did a clean install a 2 times and also the database i followed the steps from the main site. but i wil take a deeper look then.

If your jobs table does not match this structure then I don't know what to tell you other than something is wrong with your database or you're not running the migrations properly.

CREATE TABLE `jobs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `queue` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `attempts` tinyint unsigned NOT NULL,
  `reserved_at` int unsigned DEFAULT NULL,
  `available_at` int unsigned NOT NULL,
  `created_at` int unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `jobs_queue_reserved_at_index` (`queue`,`reserved_at`)
) ENGINE=InnoDB AUTO_INCREMENT=21364 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;    

If your jobs table does not match this structure then I don't know what to tell you other than something is wrong with your database or you're not running the migrations properly.

CREATE TABLE `jobs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `queue` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `attempts` tinyint unsigned NOT NULL,
  `reserved_at` int unsigned DEFAULT NULL,
  `available_at` int unsigned NOT NULL,
  `created_at` int unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `jobs_queue_reserved_at_index` (`queue`,`reserved_at`)
) ENGINE=InnoDB AUTO_INCREMENT=21364 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;  

thanks this fixed all my issues.
creating that table did it. thanks!!
you made my day 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Doc94 picture Doc94  路  4Comments

zKoz210 picture zKoz210  路  4Comments

CoolJWB picture CoolJWB  路  4Comments

msharp19 picture msharp19  路  4Comments

schrej picture schrej  路  3Comments