Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3 Error When Checking Out Licenses #2149

Closed
2 tasks done
veen1981 opened this issue Jun 13, 2016 · 20 comments
Closed
2 tasks done

V3 Error When Checking Out Licenses #2149

veen1981 opened this issue Jun 13, 2016 · 20 comments

Comments

@veen1981
Copy link

Expected Behavior (or desired behavior if a feature request)

When checking out a license, the license should be able to be checked out to any device or user regardless of the licensed to name and email.


Actual Behavior

Example - TeamViewer has 12 licenses, the registered to user and email is set to the software asset manager who purchased the software. When attempting to checkout any of the seats to the devices the licenses are installed on, the following error appears:
Error: The asset you are trying to associate with this license is owned by somene other than the person selected in the assigned to dropdown.

capture2

If I remove the licensed to name and email, I can then check the license out. Not sure if this is the intended behavior, but most of our licenses are only licensed to one email address, but are assigned to several workstations. This is especially true for licenses with a large seat number with 200 more seats.


Please confirm you have done the following before posting your bug report:


Please provide answers to these questions before posting your bug report:

  • Version of Snipe-IT you're running = v3.0.0-dev-3-g6d810a9
  • What OS and web server you're running Snipe-IT on = CentOS 7, Apache
  • What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) = Manual upgrade from V2*
  • What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error = /admin/licenses/12774/checkout
  • Confirm whether the error is reproduceable on the demo. = cannot reproduce error in V3 demo
  • Indicate whether or not you've manually edited any data directly in the database = no
@snipe
Copy link
Owner

snipe commented Jun 13, 2016

Are you selecting an asset AND a user from that checkout screen?

@veen1981
Copy link
Author

No, I thought that might have been what was happening too. I think I might have something wonky going on with my install, as did a clean install on a VM and imported my DB and was unable to replicate. I'm now doing a clean install on the test server to see if that fixes it.

@snipe
Copy link
Owner

snipe commented Jun 13, 2016

Okay, I'm going to close this for now, since you can't replicate it, but feel free to update this issue if you run into it again.

@snipe snipe closed this as completed Jun 13, 2016
@veen1981
Copy link
Author

Yeah, I got it working now. I dropped the database and started from scratch with the v3 install.sh script. Re-imported my database and copied over my files and all is good now. Sorry for not trying that first! :)

@snipe
Copy link
Owner

snipe commented Jun 13, 2016

Still weird that it happened at all. I'm glad you got it working though.

30-rock-highfiving-angels

@veen1981
Copy link
Author

lmao - you and your gifs!

@snipe
Copy link
Owner

snipe commented Jun 13, 2016

Heh - those gifs are sometimes the only thing between me and losing my mind.

adventure_time_conte_limoncello_corre_e_si_spoglia

@veen1981
Copy link
Author

So, things were working fine when I left work yesterday. I came in today, applied the updates from your most recent commits and am back to where I was before lol. I think I found the issue though.

Here is a view of an asset that I want to assign a license to. You can see it is assigned to the user Math Lab.

capture3

However, when I go into the license and search for this device, it is displaying as (unassigned).

capture4

If I select both the device and the user, I am able to successfully check-out the license, but if I select only the device, I get the error mentioned above. Any ideas?

@snipe
Copy link
Owner

snipe commented Jun 14, 2016

Huh. I didn't make any changes to that process yesterday, I don't think. I'll take a look.

@veen1981
Copy link
Author

Not that process in particular... I just saw you pushed out some new commits last night, so applied them this morning.

snipe added a commit that referenced this issue Jul 7, 2016
@snipe
Copy link
Owner

snipe commented Jul 7, 2016

Are you on v3, or v3-master? I think I may have fixed your issue. My change is pushed out to the v3 branch

@veen1981
Copy link
Author

veen1981 commented Jul 7, 2016

v3-Master

@snipe
Copy link
Owner

snipe commented Jul 7, 2016

K, I just pushed it up to master. Let me know if that helps.

@veen1981
Copy link
Author

veen1981 commented Jul 7, 2016

Will do! I get into to work around 6:30 am Eastern. I'll apply it first thing and let you know!

@veen1981
Copy link
Author

veen1981 commented Jul 7, 2016

Ok, so I am no longer getting the message Error: The asset you are trying to associate with this license is owned by somene other than the person selected in the assigned to dropdown. Now I am getting the Whoops! Looks like something went wrong. error. Here is my laravel log for this error:

[2016-07-07 07:06:17] production.ERROR: ErrorException: Undefined variable: is_asset_id in /var/www/html/snipeit/app/Http/Controllers/LicensesController.php:551
Stack trace:
#0 /var/www/html/snipeit/app/Http/Controllers/LicensesController.php(551): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'Undefined varia...', '/var/www/html/s...', 551, Array)
#1 [internal function]: App\Http\Controllers\LicensesController->postCheckout('10000')
#2 /var/www/html/snipeit/bootstrap/cache/compiled.php(9419): call_user_func_array(Array, Array)
#3 /var/www/html/snipeit/bootstrap/cache/compiled.php(9481): Illuminate\Routing\Controller->callAction('postCheckout', Array)
#4 /var/www/html/snipeit/bootstrap/cache/compiled.php(9461): Illuminate\Routing\ControllerDispatcher->call(Object(App\Http\Controllers\LicensesController), Object(Illuminate\Routing\Route), 'postCheckout')
#5 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#6 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#7 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#8 /var/www/html/snipeit/bootstrap/cache/compiled.php(9938): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#9 /var/www/html/snipeit/bootstrap/cache/compiled.php(9462): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#10 /var/www/html/snipeit/bootstrap/cache/compiled.php(9449): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(App\Http\Controllers\LicensesController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'postCheckout')
#11 /var/www/html/snipeit/bootstrap/cache/compiled.php(8517): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'App\Http\Contro...', 'postCheckout')
#12 /var/www/html/snipeit/bootstrap/cache/compiled.php(8504): Illuminate\Routing\Route->runController(Object(Illuminate\Http\Request))
#13 /var/www/html/snipeit/bootstrap/cache/compiled.php(8218): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#14 [internal function]: Illuminate\Routing\Router->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#15 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#16 /var/www/html/snipeit/app/Http/Middleware/CheckPermissions.php(27): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#17 [internal function]: App\Http\Middleware\CheckPermissions->handle(Object(Illuminate\Http\Request), Object(Closure), 'licenses.view')
#18 /var/www/html/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#19 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#20 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#21 /var/www/html/snipeit/app/Http/Middleware/Authenticate.php(45): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#22 [internal function]: App\Http\Middleware\Authenticate->handle(Object(Illuminate\Http\Request), Object(Closure))
#23 /var/www/html/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#24 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#25 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#26 /var/www/html/snipeit/app/Http/Middleware/CheckLocale.php(40): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#27 [internal function]: App\Http\Middleware\CheckLocale->handle(Object(Illuminate\Http\Request), Object(Closure))
#28 /var/www/html/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#29 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#30 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#31 /var/www/html/snipeit/bootstrap/cache/compiled.php(3225): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#32 [internal function]: Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#33 /var/www/html/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#34 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#35 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#36 /var/www/html/snipeit/bootstrap/cache/compiled.php(13139): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#37 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#38 /var/www/html/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#39 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#40 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#41 /var/www/html/snipeit/bootstrap/cache/compiled.php(13076): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#42 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#43 /var/www/html/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#44 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#45 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#46 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#47 /var/www/html/snipeit/bootstrap/cache/compiled.php(9938): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#48 /var/www/html/snipeit/bootstrap/cache/compiled.php(8219): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#49 /var/www/html/snipeit/bootstrap/cache/compiled.php(8210): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#50 /var/www/html/snipeit/bootstrap/cache/compiled.php(8200): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#51 /var/www/html/snipeit/bootstrap/cache/compiled.php(2419): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#52 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http{closure}(Object(Illuminate\Http\Request))
#53 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#54 /var/www/html/snipeit/vendor/fideloper/proxy/src/TrustProxies.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#55 [internal function]: Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
#56 /var/www/html/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#57 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#58 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#59 /var/www/html/snipeit/app/Http/Middleware/CheckForSetup.php(22): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#60 [internal function]: App\Http\Middleware\CheckForSetup->handle(Object(Illuminate\Http\Request), Object(Closure))
#61 /var/www/html/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#62 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#63 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#64 /var/www/html/snipeit/app/Http/Middleware/NosniffGuard.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#65 [internal function]: App\Http\Middleware\NosniffGuard->handle(Object(Illuminate\Http\Request), Object(Closure))
#66 /var/www/html/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#67 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#68 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#69 /var/www/html/snipeit/app/Http/Middleware/XssProtectHeader.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#70 [internal function]: App\Http\Middleware\XssProtectHeader->handle(Object(Illuminate\Http\Request), Object(Closure))
#71 /var/www/html/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#72 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#73 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#74 /var/www/html/snipeit/app/Http/Middleware/FrameGuard.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#75 [internal function]: App\Http\Middleware\FrameGuard->handle(Object(Illuminate\Http\Request), Object(Closure))
#76 /var/www/html/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#77 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#78 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#79 /var/www/html/snipeit/bootstrap/cache/compiled.php(13400): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#80 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#81 /var/www/html/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#82 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#83 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#84 /var/www/html/snipeit/bootstrap/cache/compiled.php(11943): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#85 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#86 /var/www/html/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#87 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#88 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#89 /var/www/html/snipeit/bootstrap/cache/compiled.php(3286): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#90 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#91 /var/www/html/snipeit/bootstrap/cache/compiled.php(9953): call_user_func_array(Array, Array)
#92 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#93 /var/www/html/snipeit/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#94 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#95 /var/www/html/snipeit/bootstrap/cache/compiled.php(9938): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#96 /var/www/html/snipeit/bootstrap/cache/compiled.php(2366): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#97 /var/www/html/snipeit/bootstrap/cache/compiled.php(2350): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#98 /var/www/html/snipeit/public/index.php(54): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#99 {main}

@veen1981
Copy link
Author

veen1981 commented Jul 7, 2016

I can still check out to users without an issue. I can also check out to an asset, as long as the corresponding user is also selected, but checking out to just an asset is a no go.

@snipe
Copy link
Owner

snipe commented Jul 7, 2016

Pull and try again please

@veen1981
Copy link
Author

veen1981 commented Jul 7, 2016

On it!

@veen1981
Copy link
Author

veen1981 commented Jul 7, 2016

capture

tumblr_n4yxgfej4z1qf9mevo1_500

@snipe
Copy link
Owner

snipe commented Jul 7, 2016

dog-thank-you-gif-97y2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants