{"action":"created","issue":{"url":"https://api.github.com/repos/snipe/snipe-it/issues/1872","repository_url":"https://api.github.com/repos/snipe/snipe-it","labels_url":"https://api.github.com/repos/snipe/snipe-it/issues/1872/labels{/name}","comments_url":"https://api.github.com/repos/snipe/snipe-it/issues/1872/comments","events_url":"https://api.github.com/repos/snipe/snipe-it/issues/1872/events","html_url":"https://github.com/snipe/snipe-it/issues/1872","id":142681851,"number":1872,"title":"500 Error - Creating Asset","user":{"login":"proczero","id":8185011,"avatar_url":"https://avatars.githubusercontent.com/u/8185011?v=3","gravatar_id":"","url":"https://api.github.com/users/proczero","html_url":"https://github.com/proczero","followers_url":"https://api.github.com/users/proczero/followers","following_url":"https://api.github.com/users/proczero/following{/other_user}","gists_url":"https://api.github.com/users/proczero/gists{/gist_id}","starred_url":"https://api.github.com/users/proczero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/proczero/subscriptions","organizations_url":"https://api.github.com/users/proczero/orgs","repos_url":"https://api.github.com/users/proczero/repos","events_url":"https://api.github.com/users/proczero/events{/privacy}","received_events_url":"https://api.github.com/users/proczero/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-03-22T15:16:35Z","updated_at":"2016-03-26T01:12:36Z","closed_at":null,"body":"#### Expected Behavior (or desired behavior if a feature request)\r\nTo create the asset like it worked in the past.\r\n\r\n-----\r\n#### Actual Behavior\r\nI am not sure if this is an actual software or server issue. I have not touched the machine in a while, one of our users reported that this was happening when adding a Asset. I verified on multiple accounts that this was the case. Upgraded a few packages on the server and then updated the SnipeIT software, still nothing.\r\n\r\n\"Ouch.\r\nServer Error: 500 (Internal Server Error)\r\nWhat does this mean?\r\nSomething went wrong on our servers while we were processing your request. We're really sorry about this, and will work hard to get this resolved as soon as possible.\r\nPerhaps you would like to go to our home page?\"\r\n\r\n**With Debug on:**\r\nErrorException (E_RECOVERABLE_ERROR)\r\nHELP\r\nArgument 1 passed to Illuminate\\Database\\Eloquent\\Relations\\BelongsTo::associate() must be an instance of Illuminate\\Database\\Eloquent\\Model, null given, called in /var/www/snipe-it-master/app/controllers/admin/AssetsController.php on line 104 and defined\r\n\r\npublic function associate(Model $model)\r\n{\r\n$this->parent->setAttribute($this->foreignKey, $model->getAttribute($this->otherKey));\r\n\r\n-----\r\n#### Please confirm you have done the following before posting your bug report:\r\n- [x] I have enabled debug mode\r\n- [x] I have read [checked the Common Issues page](http://docs.snipeitapp.com/common-issues.html)\r\n\r\n-----\r\n#### Please provide answers to these questions before posting your bug report:\r\n\r\nSnipe-IT version\tv2.1.0-41-g6d810a9\r\nUbuntu 14.04.4 LTS (VM)\r\nInstalled via install.sh\r\nError provided above\r\nError occurs on /hardware/create page\r\nNo manual edits were made to DB\r\n\r\n\r\napp/storage/logs output for log-apache2handler-2016-03-22.txt:\r\n\r\n#0 /var/www/snipe-it-master/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/BelongsTo.php(203): Illuminate\\Exception\\Handler->handleError(4096, 'Argument 1 pass...', '/var/www/snipe-...', 203, Array)\r\n#1 /var/www/snipe-it-master/app/controllers/admin/AssetsController.php(104): Illuminate\\Database\\Eloquent\\Relations\\BelongsTo->associate(NULL)\r\n#2 [internal function]: Controllers\\Admin\\AssetsController->postCreate()\r\n#3 /var/www/snipe-it-master/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(231): call_user_func_array(Array, Array)\r\n#4 /var/www/snipe-it-master/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(93): Illuminate\\Routing\\Controller->callAction('postCreate', Array)\r\n#5 /var/www/snipe-it-master/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(62): Illuminate\\Routing\\ControllerDispatcher->call(Object(Controllers\\Admin\\AssetsController), Object(Illuminate\\Routing\\Route), 'postCreate')\r\n#6 /var/www/snipe-it-master/vendor/laravel/framework/src/Illuminate/Routing/Router.php(967): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request), 'Controllers\\Adm...', 'postCreate')\r\n#7 [internal function]: Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}()\r\n#8 /var/www/snipe-it-master/vendor/laravel/framework/src/Illuminate/Routing/Route.php(109): call_user_func_array(Object(Closure), Array)\r\n#9 /var/www/snipe-it-master/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1033): Illuminate\\Routing\\Route->run(Object(Illuminate\\Http\\Request))\r\n#10 /var/www/snipe-it-master/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1001): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))\r\n#11 /var/www/snipe-it-master/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(775): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))\r\n#12 /var/www/snipe-it-master/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(745): Illuminate\\Foundation\\Application->dispatch(Object(Illuminate\\Http\\Request))\r\n#13 /var/www/snipe-it-master/vendor/barryvdh/laravel-debugbar/src/Middleware/Stack.php(34): Illuminate\\Foundation\\Application->handle(Object(Illuminate\\Http\\Request), 1, true)\r\n#14 /var/www/snipe-it-master/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(72): Barryvdh\\Debugbar\\Middleware\\Stack->handle(Object(Illuminate\\Http\\Request), 1, true)\r\n#15 /var/www/snipe-it-master/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\\Session\\Middleware->handle(Object(Illuminate\\Http\\Request), 1, true)\r\n#16 /var/www/snipe-it-master/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\\Cookie\\Queue->handle(Object(Illuminate\\Http\\Request), 1, true)\r\n#17 /var/www/snipe-it-master/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\\Cookie\\Guard->handle(Object(Illuminate\\Http\\Request), 1, true)\r\n#18 /var/www/snipe-it-master/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(641): Stack\\StackedHttpKernel->handle(Object(Illuminate\\Http\\Request))\r\n#19 /var/www/snipe-it-master/public/index.php(49): Illuminate\\Foundation\\Application->run()\r\n#20 {main} [] []\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/snipe/snipe-it/issues/comments/201640313","html_url":"https://github.com/snipe/snipe-it/issues/1872#issuecomment-201640313","issue_url":"https://api.github.com/repos/snipe/snipe-it/issues/1872","id":201640313,"user":{"login":"snipe","id":197404,"avatar_url":"https://avatars.githubusercontent.com/u/197404?v=3","gravatar_id":"","url":"https://api.github.com/users/snipe","html_url":"https://github.com/snipe","followers_url":"https://api.github.com/users/snipe/followers","following_url":"https://api.github.com/users/snipe/following{/other_user}","gists_url":"https://api.github.com/users/snipe/gists{/gist_id}","starred_url":"https://api.github.com/users/snipe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snipe/subscriptions","organizations_url":"https://api.github.com/users/snipe/orgs","repos_url":"https://api.github.com/users/snipe/repos","events_url":"https://api.github.com/users/snipe/events{/privacy}","received_events_url":"https://api.github.com/users/snipe/received_events","type":"User","site_admin":false},"created_at":"2016-03-26T01:12:36Z","updated_at":"2016-03-26T01:12:36Z","body":"@davidking727 without error logs, there is literally nothing I can do with that information."}}