snipe / snipe-it

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

[Bug] Choosing 'Default Location' in Custom Report produces bad report #5500

Closed lostmydog closed 6 years ago

lostmydog commented 6 years ago

In v4.3 (Master) and reproduceable on Demo, selecting 'Default Location' for a report will cause the report to stop at some point and spit out HTML.

Use these settings to reproduce: image

This is what you get: image

snipe commented 6 years ago

I'd need to know what that error is. (Also your master is out of date.) Always please complete the issue template, or at the very least give me a stack trace, I can't really do much without one.

lostmydog commented 6 years ago

Not sure how to explain it more, the supplied image is from the demo site. The second image is the results of running what is in the first image. No 'error' is given, snipe-it is spewing out that html inside the .csv created with those selected options.

snipe commented 6 years ago

Not sure how to explain it more

As I said, I need a stack trace. Either check your logs, or read through the message in the excel spreadsheet to tell me what the specific error is.

lostmydog commented 6 years ago

Attached is the message, not sure how to get the logs from the demo site `

<!DOCTYPE html>    
     
     
 
<meta name="robots" content="noindex nofollow" />  
|   |   |   |  

|   |   |  

Whoops | looks like something went wrong.

|   |  
|   |  
|   |     |   |   |  
|  
|   |   |  

(1/1) FatalThrowableError

|  

Call to a member function present() on null

in ReportsController.php (line 570)
at ReportsController->App\Http\Controllers\{closure}(object(Collection))in BuildsQueries.php (line 39)
at Builder->chunk(500 | object(Closure))in ReportsController.php (line 669)
at ReportsController->App\Http\Controllers\{closure}()
at call_user_func(object(Closure))in StreamedResponse.php (line 114)
at StreamedResponse->sendContent()in Response.php (line 371)
at Response->send()in index.php (line 61)
|   |   |  
|   |   |     |   |   |  
|   |   |   |   |   |   |   `
snipe commented 6 years ago

You don't get logs from the demo site, you get them from your own install.