-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Failed to load image #8574
Comments
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. |
same as: #6953 |
+1 for this issue after upgrading to 5.0.1. This is on Windows Server 2016 running IIS |
Can confirm as well. I tried moving the files in app/storage/uploads back to public/uploads, but didn't see any symlinks that the updater created. Upgraded from 4.9.5 to 5.0.1, clearing cache in local browser and re-logging, as we all clearing cache in artisan. |
I'm not sure why moving those files back wouldn't work though... I haven't been able to reproduce this :( |
The update fixed issue for me (v5.0.3) Thank you Guys! |
Looks like it worked on 5.0.4! Thanks for the update to v5 and all the work that went into it. |
We didn't actually do anything with images in v5.0.3, so my guess is just that the upgrade process blew out whatever cached config stuff was in there and was causing the issues. |
I helped clear cashe: https://snipe-it.readme.io/docs/clearing-the-config-cache
|
hi add command and Done sudo apt install php-{opcache,pdo,bcmath,bz2,calendar,ctype,exif,ffi,fileinfo,ftp,gd,iconv,intl,json,mbstring,mysqli,phar,posix,readline,shmop,sockets,sysvmsg,sysvsem,sysvshm,tokenizer,zip,curl,ldap} php-cli git unzip |
Please confirm you have done the following before posting your bug report:
[ x ] I have enabled debug mode
[ x ] I have read checked the Common Issues page
Describe the bug
A clear and concise description of what the bug is.
Images uploaded seems to be uploaded to storage/app/public/...
To Reproduce
Steps to reproduce the behavior:
Go to e.g. Asset
Click on "Edit Asset"
Scroll down to 'Upload Image'
Click "Save"
Image shows broken link
Upon clicking the broken link it shows "Failed to load image"
Expected behavior
A clear and concise description of what you expected to happen.
Asset image or any images are supposed to save into the public/uploads/... folder.
Screenshots
If applicable, add screenshots to help explain your problem.
image
image
image
Server (please complete the following information):
Snipe-IT Version v5.0.0-beta-2 - build 4009
OS: [e.g. Ubuntu, CentOS] Windows Server 2012R2
Web Server: [e.g. Apache, IIS] IIS
PHP Version 7.3.4
Desktop (please complete the following information):
OS: [e.g. iOS] Windows 10 Pro
Browser [e.g. chrome, safari] Firefox
Version [e.g. 22] 66.0.3
Error Messages
WITH DEBUG TURNED ON, if you're getting an error in your browser, include that error
no errors
If a stacktrace is provided in the error, include that too.
[2019-04-26 03:48:49] production.INFO: ErrorException: unlink(C:\inetpub\wwwroot\snipe\public/uploads/assets/asset-lqy3k6RsIcPHJUfzbW.png): No such file or directory in C:\inetpub\wwwroot\snipe\app\Http\Controllers\Assets\AssetsController.php:308
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'unlink(C:\inetp...', 'C:\inetpub\wwwr...', 308, Array)
#1 C:\inetpub\wwwroot\snipe\app\Http\Controllers\Assets\AssetsController.php(308): unlink('C:\inetpub\wwwr...')
#2 [internal function]: App\Http\Controllers\Assets\AssetsController->update(Object(App\Http\Requests\ImageUploadRequest), '3')
#3 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Controller.php(54): call_user_func_array(Array, Array)
#4 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction('update', Array)
#5 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Route.php(219): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(App\Http\Controllers\Assets\AssetsController), 'update')
#6 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Route.php(176): Illuminate\Routing\Route->runController()
#7 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Router.php(682): Illuminate\Routing\Route->run()
#8 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(30): Illuminate\Routing\Router->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#9 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Auth\Middleware\Authenticate.php(43): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#10 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(163): Illuminate\Auth\Middleware\Authenticate->handle(Object(Illuminate\Http\Request), Object(Closure))
#11 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#12 C:\inetpub\wwwroot\snipe\vendor\laravel\passport\src\Http\Middleware\CreateFreshApiToken.php(50): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#13 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(163): Laravel\Passport\Http\Middleware\CreateFreshApiToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#14 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#15 C:\inetpub\wwwroot\snipe\app\Http\Middleware\CheckForTwoFactor.php(53): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#16 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(163): App\Http\Middleware\CheckForTwoFactor->handle(Object(Illuminate\Http\Request), Object(Closure))
#17 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#18 C:\inetpub\wwwroot\snipe\app\Http\Middleware\CheckLocale.php(37): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#19 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(163): App\Http\Middleware\CheckLocale->handle(Object(Illuminate\Http\Request), Object(Closure))
#20 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#21 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken.php(75): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#22 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(163): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#23 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#24 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse.php(37): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#25 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(163): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#26 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#27 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\EncryptCookies.php(66): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#28 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(163): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#29 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#30 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(104): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#31 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Router.php(684): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#32 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Router.php(659): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#33 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Router.php(625): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))
#34 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Router.php(614): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#35 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(176): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#36 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(30): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http{closure}(Object(Illuminate\Http\Request))
#37 C:\inetpub\wwwroot\snipe\vendor\barryvdh\laravel-debugbar\src\Middleware\InjectDebugbar.php(65): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#38 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(163): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle(Object(Illuminate\Http\Request), Object(Closure))
#39 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#40 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php(31): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#41 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(163): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#42 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#43 C:\inetpub\wwwroot\snipe\app\Http\Middleware\CheckForDebug.php(25): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#44 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(163): App\Http\Middleware\CheckForDebug->handle(Object(Illuminate\Http\Request), Object(Closure))
#45 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#46 C:\inetpub\wwwroot\snipe\app\Http\Middleware\CheckForSetup.php(26): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#47 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(163): App\Http\Middleware\CheckForSetup->handle(Object(Illuminate\Http\Request), Object(Closure))
#48 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#49 C:\inetpub\wwwroot\snipe\vendor\fideloper\proxy\src\TrustProxies.php(57): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#50 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(163): Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
#51 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#52 C:\inetpub\wwwroot\snipe\app\Http\Middleware\NosniffGuard.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#53 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(163): App\Http\Middleware\NosniffGuard->handle(Object(Illuminate\Http\Request), Object(Closure))
#54 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#55 C:\inetpub\wwwroot\snipe\app\Http\Middleware\ContentSecurityPolicyHeader.php(18): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#56 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(163): App\Http\Middleware\ContentSecurityPolicyHeader->handle(Object(Illuminate\Http\Request), Object(Closure))
#57 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#58 C:\inetpub\wwwroot\snipe\app\Http\Middleware\ReferrerPolicyHeader.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#59 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(163): App\Http\Middleware\ReferrerPolicyHeader->handle(Object(Illuminate\Http\Request), Object(Closure))
#60 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#61 C:\inetpub\wwwroot\snipe\app\Http\Middleware\XssProtectHeader.php(18): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#62 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(163): App\Http\Middleware\XssProtectHeader->handle(Object(Illuminate\Http\Request), Object(Closure))
#63 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#64 C:\inetpub\wwwroot\snipe\app\Http\Middleware\FrameGuard.php(17): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#65 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(163): App\Http\Middleware\FrameGuard->handle(Object(Illuminate\Http\Request), Object(Closure))
#66 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#67 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\View\Middleware\ShareErrorsFromSession.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#68 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(163): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#69 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#70 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php(63): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#71 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(163): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#72 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#73 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode.php(62): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#74 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(163): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#75 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
#76 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(104): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
#77 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(151): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#78 C:\inetpub\wwwroot\snipe\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(116): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#79 C:\inetpub\wwwroot\snipe\public\index.php(58): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#80 {main}
Any errors that appear in your browser's error console.
Failed to load image: http://xxxxxx.com/storage/assets/asset-WvpLcYsZOMQM3s901y.png
Confirm whether the error is reproducible on the demo: https://snipeitapp.com/demo.
no errors
Include any additional information you can find in storage/logs and your webserver's logs.
Additional context
Is this a fresh install or an upgrade? fresh
What OS and web server you're running Snipe-IT on - Windows Server 2012R2 IIS
What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) - manual install
Include what you've done so far in the installation, and if you got any error messages along the way. - no
Indicate whether or not you've manually edited any data directly in the database - no
.env file has been checked to ensure APP_URL is correct.
Add any other context about the problem here.
Please do not post an issue without answering the related questions above. If you have opened a different issue and already answered these questions, answer them again, once for every ticket. It will be next to impossible for us to help you.#### Please confirm you have done the following before posting your bug report:
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Server (please complete the following information):
Desktop (please complete the following information):
Smartphone (please complete the following information):
Error Messages
storage/logs
and your webserver's logs.Additional context
Add any other context about the problem here.
Please do not post an issue without answering the related questions above. If you have opened a different issue and already answered these questions, answer them again, once for every ticket. It will be next to impossible for us to help you.
The text was updated successfully, but these errors were encountered: