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

Imports checking out to a User on import not working #14891

Closed
2 tasks done
yetanothersys-admin opened this issue Jun 18, 2024 · 15 comments
Closed
2 tasks done

Imports checking out to a User on import not working #14891

yetanothersys-admin opened this issue Jun 18, 2024 · 15 comments
Assignees
Labels
❓ not sure if bug This issue has not been confirmed as a bug yet

Comments

@yetanothersys-admin
Copy link

Debug mode

Describe the bug

(Note: after the upgrade to v7 a coworker told me to update php to 8.3.8 since the "php_max_major_minor" is "8.3" now - is it even compatible with Snipe-IT yet? or could it be a php issue?)

When I try to import an asset with either the "Checked out to: Full Name" option:

image

or the "Checked out to: Email" / "Checked out to: Username" (our users' usernames are their email)

image

the import wont check the asset out to the person...

Reproduction steps

  1. Go to the importer and import the .csv
  2. Try to check out an asset to someone with "Check out to: Username" / Email / Full Name
  3. See result in asset list
    ...

Expected behavior

I expect that the asset gets checked out to the specified user...

Screenshots

No response

Snipe-IT Version

7.0.2

Operating System

Windows

Web Server

IIS

PHP Version

8.3.8

Operating System

No response

Browser

No response

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

cant be reproduced, because the import is disabled

Additional context

Like I said in the beginning, a coworker wanted to update php - maybe an issue with that?

Also, we've updated snipe with the --skip-compatibility parameter recently, since we cant get the "normal" upgrade.php to work... so it may be a broken installation?... (upgrade.php problem -> problem with our proxy or antivirus or something?)

@snipe
Copy link
Owner

snipe commented Jun 18, 2024

PHP 8.3.8 should work fine - we're looking into this issue for you.

@snipe
Copy link
Owner

snipe commented Jun 18, 2024

Can you give me more info on how your normal upgrade.php doesn't work tho?

@yetanothersys-admin
Copy link
Author

Hey snipe!

Sure, we always get the "Failed to retrieve remote requirements" error:
image

But when we navigate to that github file through a browser, it opens just fine:
image

so we just used the "--skip-php-compatibility-checks" option after checking the file for the "php_max_major_minor" versions :)


regarding the import issue - I've got no clue what happened there :)
are there any logs for that?

@snipe
Copy link
Owner

snipe commented Jun 18, 2024

Re: failed to retrieve, is it possible you have some internal firewalls or network traffic restrictions on your server?

Is there anything interesting in your app logs? (storage/logs/laravel.log)

@yetanothersys-admin
Copy link
Author

After looking at our firewalls, we've found nothing that would block it.


A backup dump that failed

[2024-06-18 08:44:10] production.ERROR: The dump process failed with a none successful exitcode.

Do you need the stacktrace of it?

@snipe
Copy link
Owner

snipe commented Jun 18, 2024

Are you doing a backup before import? I assume your backups don't work in general, when manually triggered via GUI or cli?

@yetanothersys-admin
Copy link
Author

I don't check the "Backup before import" checkbox in the import window since we back up the whole server with Veeam... but I think it would be good to fix that as well... :)

Another problem found then
image

 Error: Backup failed because: The dump process failed with a none successful exitcode. Exitcode ======== 1: General error Output ====== <no output> Error Output ============ <no output>. #0 D:\Web\snipeittest\vendor\spatie\db-dumper\src\DbDumper.php(194): Spatie\DbDumper\Exceptions\DumpFailed::processDidNotEndSuccessfully() #1 D:\Web\snipeittest\vendor\spatie\db-dumper\src\Databases\MySql.php(143): Spatie\DbDumper\DbDumper->checkIfDumpWasSuccessFul() #2 D:\Web\snipeittest\vendor\spatie\laravel-backup\src\Tasks\Backup\BackupJob.php(280): Spatie\DbDumper\Databases\MySql->dumpToFile() #3 [internal function]: Spatie\Backup\Tasks\Backup\BackupJob->Spatie\Backup\Tasks\Backup\{closure}() #4 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Collections\Arr.php(600): array_map() #5 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Collections\Collection.php(777): Illuminate\Support\Arr::map() #6 D:\Web\snipeittest\vendor\spatie\laravel-backup\src\Tasks\Backup\BackupJob.php(249): Illuminate\Support\Collection->map() #7 D:\Web\snipeittest\vendor\spatie\laravel-backup\src\Tasks\Backup\BackupJob.php(189): Spatie\Backup\Tasks\Backup\BackupJob->dumpDatabases() #8 D:\Web\snipeittest\vendor\spatie\laravel-backup\src\Tasks\Backup\BackupJob.php(163): Spatie\Backup\Tasks\Backup\BackupJob->createBackupManifest() #9 D:\Web\snipeittest\vendor\spatie\laravel-backup\src\Commands\BackupCommand.php(65): Spatie\Backup\Tasks\Backup\BackupJob->run() #10 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(36): Spatie\Backup\Commands\BackupCommand->handle() #11 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Container\Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() #12 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure() #13 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod() #14 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Container\Container.php(662): Illuminate\Container\BoundMethod::call() #15 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Console\Command.php(211): Illuminate\Container\Container->call() #16 D:\Web\snipeittest\vendor\symfony\console\Command\Command.php(326): Illuminate\Console\Command->execute() #17 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Console\Command.php(180): Symfony\Component\Console\Command\Command->run() #18 D:\Web\snipeittest\vendor\spatie\laravel-backup\src\Commands\BaseCommand.php(28): Illuminate\Console\Command->run() #19 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Console\Concerns\CallsCommands.php(67): Spatie\Backup\Commands\BaseCommand->run() #20 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Console\Concerns\CallsCommands.php(28): Illuminate\Console\Command->runCommand() #21 D:\Web\snipeittest\app\Console\Commands\SystemBackup.php(48): Illuminate\Console\Command->call() #22 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(36): App\Console\Commands\SystemBackup->handle() #23 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Container\Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() #24 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure() #25 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod() #26 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Container\Container.php(662): Illuminate\Container\BoundMethod::call() #27 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Console\Command.php(211): Illuminate\Container\Container->call() #28 D:\Web\snipeittest\vendor\symfony\console\Command\Command.php(326): Illuminate\Console\Command->execute() #29 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Console\Command.php(180): Symfony\Component\Console\Command\Command->run() #30 D:\Web\snipeittest\vendor\symfony\console\Application.php(1096): Illuminate\Console\Command->run() #31 D:\Web\snipeittest\vendor\symfony\console\Application.php(324): Symfony\Component\Console\Application->doRunCommand() #32 D:\Web\snipeittest\vendor\symfony\console\Application.php(175): Symfony\Component\Console\Application->doRun() #33 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Console\Application.php(162): Symfony\Component\Console\Application->run() #34 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(400): Illuminate\Console\Application->call() #35 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php(355): Illuminate\Foundation\Console\Kernel->call() #36 D:\Web\snipeittest\app\Http\Controllers\SettingsController.php(1125): Illuminate\Support\Facades\Facade::__callStatic() #37 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Routing\Controller.php(54): App\Http\Controllers\SettingsController->postBackups() #38 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php(43): Illuminate\Routing\Controller->callAction() #39 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Routing\Route.php(259): Illuminate\Routing\ControllerDispatcher->dispatch() #40 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Routing\Route.php(205): Illuminate\Routing\Route->runController() #41 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Routing\Router.php(806): Illuminate\Routing\Route->run() #42 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(144): Illuminate\Routing\Router->Illuminate\Routing\{closure}() #43 D:\Web\snipeittest\app\Http\Middleware\CheckPermissions.php(24): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #44 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(183): App\Http\Middleware\CheckPermissions->handle() #45 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Session\Middleware\AuthenticateSession.php(60): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #46 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(183): Illuminate\Session\Middleware\AuthenticateSession->handle() #47 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Auth\Middleware\Authenticate.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #48 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(183): Illuminate\Auth\Middleware\Authenticate->handle() #49 D:\Web\snipeittest\app\Http\Middleware\AssetCountForSidebar.php(119): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #50 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(183): App\Http\Middleware\AssetCountForSidebar->handle() #51 D:\Web\snipeittest\vendor\laravel\passport\src\Http\Middleware\CreateFreshApiToken.php(63): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #52 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(183): Laravel\Passport\Http\Middleware\CreateFreshApiToken->handle() #53 D:\Web\snipeittest\app\Http\Middleware\CheckForTwoFactor.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #54 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(183): App\Http\Middleware\CheckForTwoFactor->handle() #55 D:\Web\snipeittest\app\Http\Middleware\CheckUserIsActivated.php(47): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #56 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(183): App\Http\Middleware\CheckUserIsActivated->handle() #57 D:\Web\snipeittest\app\Http\Middleware\CheckLocale.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #58 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(183): App\Http\Middleware\CheckLocale->handle() #59 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken.php(78): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #60 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(183): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle() #61 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #62 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(183): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle() #63 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #64 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(183): Illuminate\Cookie\Middleware\EncryptCookies->handle() #65 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(119): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #66 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Routing\Router.php(805): Illuminate\Pipeline\Pipeline->then() #67 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Routing\Router.php(784): Illuminate\Routing\Router->runRouteWithinStack() #68 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Routing\Router.php(748): Illuminate\Routing\Router->runRoute() #69 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Routing\Router.php(737): Illuminate\Routing\Router->dispatchToRoute() #70 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(200): Illuminate\Routing\Router->dispatch() #71 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(144): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}() #72 D:\Web\snipeittest\vendor\livewire\livewire\src\DisableBrowserCache.php(19): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #73 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(183): Livewire\DisableBrowserCache->handle() #74 D:\Web\snipeittest\vendor\barryvdh\laravel-debugbar\src\Middleware\InjectDebugbar.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #75 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(183): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle() #76 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Http\Middleware\HandleCors.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #77 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(183): Illuminate\Http\Middleware\HandleCors->handle() #78 D:\Web\snipeittest\app\Http\Middleware\PreventBackHistory.php(23): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #79 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(183): App\Http\Middleware\PreventBackHistory->handle() #80 D:\Web\snipeittest\app\Http\Middleware\SecurityHeaders.php(26): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #81 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(183): App\Http\Middleware\SecurityHeaders->handle() #82 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #83 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull.php(31): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle() #84 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(183): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle() #85 D:\Web\snipeittest\app\Http\Middleware\CheckForDebug.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #86 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(183): App\Http\Middleware\CheckForDebug->handle() #87 D:\Web\snipeittest\app\Http\Middleware\CheckForSetup.php(25): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #88 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(183): App\Http\Middleware\CheckForSetup->handle() #89 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\View\Middleware\ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #90 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(183): Illuminate\View\Middleware\ShareErrorsFromSession->handle() #91 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #92 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest() #93 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(183): Illuminate\Session\Middleware\StartSession->handle() #94 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance.php(99): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #95 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(183): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle() #96 D:\Web\snipeittest\app\Http\Middleware\NoSessionStore.php(28): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #97 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(183): App\Http\Middleware\NoSessionStore->handle() #98 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(119): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() #99 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(175): Illuminate\Pipeline\Pipeline->then() #100 D:\Web\snipeittest\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(144): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter() #101 D:\Web\snipeittest\public\index.php(51): Illuminate\Foundation\Http\Kernel->handle() #102 {main} Backup failed because: The dump process failed with a none successful exitcode. Exitcode ======== 1: General error Output ====== <no output> Error Output ============ <no output>.

@snipe
Copy link
Owner

snipe commented Jun 18, 2024

That can be caused by a few different reasons, usually the path to mysqldump is incorrect or permissions to the backup-temp dir is not writable, etc. We should probably try to get that sorted for you too if it's possible.

I'm wondering though if, since upgrade.php isn't working, if maybe the upgrade was only partial? If something got missed somehow? (We're still looking into the import+checkout issue for you internally tho)

@yetanothersys-admin
Copy link
Author

Hmm... I just tried doing a backup by cli and that works? o.o
image

So I'm guessing the permissions are alright. Checked them as well and it looks ok...


A partial / broken installation was also my suspicion since you specified the upgrade with the "skip compatibility checks" option as a "do at your own risk" option :)

@yetanothersys-admin
Copy link
Author

yetanothersys-admin commented Jun 18, 2024

Just tested the backup through the GUI on our production system that is on 6.4.2 - cant back it up with the GUI as well...
I could also make a seperate issue for the backup problem :)

@yetanothersys-admin
Copy link
Author

yetanothersys-admin commented Jun 19, 2024

What I tried and can confirm, is that when I try to start an import with the GUI, it doesnt start a backup (because I don't tick the checkbox).

So the backup isn't related to the import problem.

@snipe
Copy link
Owner

snipe commented Jun 19, 2024

Hm. I just pushed out some minor fixes - can you pull latest from master? I'm not able to reproduce your issue locally at this time, at least using the sample CSVs. I wonder if there's something funny with the mapping.

@yetanothersys-admin
Copy link
Author

The import works again :D
Whatever it was, seems to be gone now :p

The backup issue is still the same tho.
Doesn't work with the GUI but the CLI version works fine... not that big of a problem for us since we back up the server with Veeam but yea... gonna open another issue for that since the import got fixed :)

Thanks! :D

@snipe
Copy link
Owner

snipe commented Jun 20, 2024

@marcusmoore can you see if you can reproduce this import issue?

@snipe snipe added the ❓ not sure if bug This issue has not been confirmed as a bug yet label Jun 20, 2024
@marcusmoore
Copy link
Collaborator

@snipe I tried this locally and it was successful like reported. I'm going to look into that back up issue #14910 too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❓ not sure if bug This issue has not been confirmed as a bug yet
Projects
None yet
Development

No branches or pull requests

3 participants