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

Importer not working #3106

Closed
xxtheatrainxx opened this issue Dec 27, 2016 · 9 comments
Closed

Importer not working #3106

xxtheatrainxx opened this issue Dec 27, 2016 · 9 comments

Comments

@xxtheatrainxx
Copy link

Expected Behavior (or desired behavior if a feature request)

Click import, choose file and successfully import assets
or
run CLI command and successfully import assets
(what you expect to happen goes here)


Actual Behavior

The progress bar goes up to 100% but doesn't do anything from there. Whether I wait 10 minutes or 2 hours the assets are still not imported into the database.
The CLI command just goes back to the prompt.
(what actually happens goes here)


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


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

@xxtheatrainxx
Copy link
Author

The .csv only contains 143 lines of data, all in line with the new sample import .csv

@xxtheatrainxx
Copy link
Author

Update:

Broke the .csv file down and was able to upload 11 assets. Tried again with 30 and it finishes the upload and allows me to select "process" but then gives the error 500 page.

@snipe
Copy link
Owner

snipe commented Dec 27, 2016

Turn on debugging and tell me what the 500 error is when you try to process

@xxtheatrainxx
Copy link
Author

It's 129 lines, sorry!

@xxtheatrainxx
Copy link
Author

[2016-12-28 08:34:02] production.ERROR: exception 'InvalidArgumentException' with message 'The array must contain unique values' in C:\inetpub\wwwroot\assets\vendor\league\csv\src\Reader.php:249
Stack trace:
#0 C:\inetpub\wwwroot\assets\vendor\league\csv\src\Reader.php(218): League\Csv\Reader->validateAssocKeys(Array)
#1 C:\inetpub\wwwroot\assets\vendor\league\csv\src\Reader.php(184): League\Csv\Reader->getAssocKeys(0)
#2 C:\inetpub\wwwroot\assets\app\Console\Commands\ObjectImportCommand.php(90): League\Csv\Reader->fetchAssoc()
#3 [internal function]: App\Console\Commands\ObjectImportCommand->fire()
#4 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(1257): call_user_func_array(Array, Array)
#5 C:\inetpub\wwwroot\assets\vendor\laravel\framework\src\Illuminate\Console\Command.php(169): Illuminate\Container\Container->call(Array)
#6 C:\inetpub\wwwroot\assets\vendor\symfony\console\Command\Command.php(256): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput))
#7 C:\inetpub\wwwroot\assets\vendor\laravel\framework\src\Illuminate\Console\Command.php(155): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput))
#8 C:\inetpub\wwwroot\assets\vendor\symfony\console\Application.php(794): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput))
#9 C:\inetpub\wwwroot\assets\vendor\symfony\console\Application.php(186): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\ObjectImportCommand), Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput))
#10 C:\inetpub\wwwroot\assets\vendor\symfony\console\Application.php(117): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput))
#11 C:\inetpub\wwwroot\assets\vendor\laravel\framework\src\Illuminate\Console\Application.php(64): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\BufferedOutput))
#12 C:\inetpub\wwwroot\assets\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(170): Illuminate\Console\Application->call('snipeit:import', Array)
#13 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(6327): Illuminate\Foundation\Console\Kernel->call('snipeit:import', Array)
#14 C:\inetpub\wwwroot\assets\app\Http\Controllers\AssetsController.php(973): Illuminate\Support\Facades\Facade::__callStatic('call', Array)
#15 C:\inetpub\wwwroot\assets\app\Http\Controllers\AssetsController.php(973): Illuminate\Support\Facades\Artisan::call('snipeit:import', Array)
#16 [internal function]: App\Http\Controllers\AssetsController->postProcessImportFile()
#17 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(9424): call_user_func_array(Array, Array)
#18 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(9486): Illuminate\Routing\Controller->callAction('postProcessImpo...', Array)
#19 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(9466): Illuminate\Routing\ControllerDispatcher->call(Object(App\Http\Controllers\AssetsController), Object(Illuminate\Routing\Route), 'postProcessImpo...')
#20 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#21 C:\inetpub\wwwroot\assets\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#22 C:\inetpub\wwwroot\assets\app\Http\Middleware\Authenticate.php(45): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#23 [internal function]: App\Http\Middleware\Authenticate->handle(Object(Illuminate\Http\Request), Object(Closure))
#24 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(9963): call_user_func_array(Array, Array)
#25 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#26 C:\inetpub\wwwroot\assets\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#27 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#28 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(9948): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#29 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(9467): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#30 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(9454): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(App\Http\Controllers\AssetsController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'postProcessImpo...')
#31 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(8524): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'App\Http\Contro...', 'postProcessImpo...')
#32 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(8511): Illuminate\Routing\Route->runController(Object(Illuminate\Http\Request))
#33 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(8225): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#34 [internal function]: Illuminate\Routing\Router->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#35 C:\inetpub\wwwroot\assets\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#36 C:\inetpub\wwwroot\assets\app\Http\Middleware\CheckPermissions.php(28): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#37 [internal function]: App\Http\Middleware\CheckPermissions->handle(Object(Illuminate\Http\Request), Object(Closure), 'assets.create')
#38 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(9963): call_user_func_array(Array, Array)
#39 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#40 C:\inetpub\wwwroot\assets\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#41 C:\inetpub\wwwroot\assets\app\Http\Middleware\Authenticate.php(45): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#42 [internal function]: App\Http\Middleware\Authenticate->handle(Object(Illuminate\Http\Request), Object(Closure))
#43 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(9963): call_user_func_array(Array, Array)
#44 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#45 C:\inetpub\wwwroot\assets\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#46 C:\inetpub\wwwroot\assets\app\Http\Middleware\CheckForTwoFactor.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#47 [internal function]: App\Http\Middleware\CheckForTwoFactor->handle(Object(Illuminate\Http\Request), Object(Closure))
#48 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(9963): call_user_func_array(Array, Array)
#49 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#50 C:\inetpub\wwwroot\assets\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#51 C:\inetpub\wwwroot\assets\app\Http\Middleware\CheckLocale.php(42): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#52 [internal function]: App\Http\Middleware\CheckLocale->handle(Object(Illuminate\Http\Request), Object(Closure))
#53 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(9963): call_user_func_array(Array, Array)
#54 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#55 C:\inetpub\wwwroot\assets\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#56 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(3225): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#57 [internal function]: Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#58 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(9963): call_user_func_array(Array, Array)
#59 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#60 C:\inetpub\wwwroot\assets\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#61 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(13213): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#62 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#63 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(9963): call_user_func_array(Array, Array)
#64 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#65 C:\inetpub\wwwroot\assets\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#66 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(13150): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#67 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#68 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(9963): call_user_func_array(Array, Array)
#69 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#70 C:\inetpub\wwwroot\assets\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#71 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#72 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(9948): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#73 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(8226): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#74 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(8217): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#75 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(8207): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#76 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(2419): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#77 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http{closure}(Object(Illuminate\Http\Request))
#78 C:\inetpub\wwwroot\assets\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#79 C:\inetpub\wwwroot\assets\app\Http\Middleware\CheckForDebug.php(25): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#80 [internal function]: App\Http\Middleware\CheckForDebug->handle(Object(Illuminate\Http\Request), Object(Closure))
#81 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(9963): call_user_func_array(Array, Array)
#82 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#83 C:\inetpub\wwwroot\assets\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#84 C:\inetpub\wwwroot\assets\vendor\fideloper\proxy\src\TrustProxies.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#85 [internal function]: Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
#86 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(9963): call_user_func_array(Array, Array)
#87 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#88 C:\inetpub\wwwroot\assets\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#89 C:\inetpub\wwwroot\assets\app\Http\Middleware\CheckForSetup.php(27): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#90 [internal function]: App\Http\Middleware\CheckForSetup->handle(Object(Illuminate\Http\Request), Object(Closure))
#91 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(9963): call_user_func_array(Array, Array)
#92 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#93 C:\inetpub\wwwroot\assets\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#94 C:\inetpub\wwwroot\assets\app\Http\Middleware\NosniffGuard.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#95 [internal function]: App\Http\Middleware\NosniffGuard->handle(Object(Illuminate\Http\Request), Object(Closure))
#96 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(9963): call_user_func_array(Array, Array)
#97 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#98 C:\inetpub\wwwroot\assets\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#99 C:\inetpub\wwwroot\assets\app\Http\Middleware\XssProtectHeader.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#100 [internal function]: App\Http\Middleware\XssProtectHeader->handle(Object(Illuminate\Http\Request), Object(Closure))
#101 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(9963): call_user_func_array(Array, Array)
#102 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#103 C:\inetpub\wwwroot\assets\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#104 C:\inetpub\wwwroot\assets\app\Http\Middleware\FrameGuard.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#105 [internal function]: App\Http\Middleware\FrameGuard->handle(Object(Illuminate\Http\Request), Object(Closure))
#106 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(9963): call_user_func_array(Array, Array)
#107 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#108 C:\inetpub\wwwroot\assets\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#109 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(13474): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#110 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#111 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(9963): call_user_func_array(Array, Array)
#112 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#113 C:\inetpub\wwwroot\assets\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#114 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(11964): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#115 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#116 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(9963): call_user_func_array(Array, Array)
#117 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#118 C:\inetpub\wwwroot\assets\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#119 C:\inetpub\wwwroot\assets\vendor\misterphilip\maintenance-mode\src\MisterPhilip\MaintenanceMode\Http\Middleware\CheckForMaintenanceMode.php(145): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#120 [internal function]: MisterPhilip\MaintenanceMode\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#121 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(9963): call_user_func_array(Array, Array)
#122 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#123 C:\inetpub\wwwroot\assets\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#124 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#125 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(9948): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#126 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(2366): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#127 C:\inetpub\wwwroot\assets\bootstrap\cache\compiled.php(2350): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#128 C:\inetpub\wwwroot\assets\public\index.php(60): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#129 {main}

@xxtheatrainxx
Copy link
Author

I was able to get everything uploaded by breaking it down into groups of 20-30. Not sure why it wouldn't let me upload all assets at once...

@dmeltzer
Copy link
Contributor

Did you possibly have two columns with the same header name? That error looks like you might have had two "asset_tag" columns or similar.

@xxtheatrainxx
Copy link
Author

xxtheatrainxx commented Dec 28, 2016 via email

@snipe
Copy link
Owner

snipe commented Dec 29, 2016

The usual cause for that is extra columns in your CSV. You won't see them in excel, but if you open it in a text editor, extra columns show up as a bunch of commas. The importer expects every column to be unique and when you have multiple blank headers, it sees those as duplicates.

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

3 participants