cant see branding logo and signatures after upgrade from 4.9.5 to latest 5.0.1
Please confirm you have done the following before posting your bug report:
- [YES ] I have enabled debug mode
- [ YES] I have read checked the Common Issues page
Describe the bug
after upgrading from latest version of 4 to latest build 5.0.1 i cant see any branding, signatures etc.
Also i had to swap php version from 7.3.22 to 7.4.3, otherwise app wasnt working at all, throw unspecified error 500 and on logs there was this:
production.ERROR: Erroneous data format for unserializing 'Symfony\Component\Routing\CompiledRoute' {"exception":"[object] (ErrorException(code: 0): Erroneous data format for unserializing 'Symfony\Component\Routing\CompiledRoute' at C:\inetpub\wwwroot\snipe-it\bootstrap\cache
outes.php:15)
Figgured out, that problem is in routes.php somewhere. So i followed some laravel helps on stackoverflow and tried to delete (rename) routes.php, which helped, but branding and signatures wasnt still loading in app. But i had app working on same php version it was runnning smoothly with 4.9.5.
To Reproduce Steps to reproduce the behavior:
- upgrade app from 4.9.5 to 5.0.0 then to 5.0.1
Expected behavior branding logos and signatures should be seen in app
Screenshots can provide, if needed
Server (please complete the following information):
- Snipe-IT Version 5.0.1
- OS: Windows Server 2012
- Web Server: IIS
- PHP Version 7.3.22 or later 7.4.3
Desktop (please complete the following information):
- OS: Windows 10 Pro 2004
- Browser Chrome
- Version latest
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Error Messages
[2020-10-22 08:52:07] production.ERROR: Erroneous data format for unserializing 'Symfony\Component\Routing\CompiledRoute' {"exception":"[object] (ErrorException(code: 0): Erroneous data format for unserializing 'Symfony\Component\Routing\CompiledRoute' at C:\inetpub\wwwroot\snipe-it\bootstrap\cache
outes.php:15)
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'Erroneous data ...', 'C:\inetpub\wwwr...', 15, Array)
#1 C:\inetpub\wwwroot\snipe-it\bootstrap\cache\routes.php(15): unserialize('O:34:"Illuminat...')
#2 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Support\Providers\RouteServiceProvider.php(75): require('C:\inetpub\wwwr...')
#3 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(895): Illuminate\Foundation\Support\Providers\RouteServiceProvider->Illuminate\Foundation\Support\Providers{closure}(Object(Illuminate\Foundation\Application))
#4 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(844): Illuminate\Foundation\Application->fireAppCallbacks(Array)
#5 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\BootProviders.php(17): Illuminate\Foundation\Application->boot()
#6 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(219): Illuminate\Foundation\Bootstrap\BootProviders->bootstrap(Object(Illuminate\Foundation\Application))
#7 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(156): Illuminate\Foundation\Application->bootstrapWith(Array)
#8 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(140): Illuminate\Foundation\Http\Kernel->bootstrap()
#9 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(110): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#10 C:\inetpub\wwwroot\snipe-it\public\index.php(58): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#11 {main}
but currently it shows no errors. This one is last logged.
Additional context
- Is this a fresh install or an upgrade? Upgrade from php upgrade.php
- What OS and web server you're running Snipe-IT on
- What method you used to install Snipe-IT (install.sh, manual installation, docker, etc)
- Include what you've done so far in the installation, and if you got any error messages along the way.
- Indicate whether or not you've manually edited any data directly in the database
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.
👋 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.
Thanks so much for this report! If you copy the files that were (inadvertently) moved from storage/private_uploads to app/storage/public back to storage/private_uploads does that help?
I have the same issue. and all signatures sitll in signatures but can not show in asset history
+1
Thanks so much for this report! If you copy the files that were (inadvertently) moved from storage/private_uploads to app/storage/public back to storage/private_uploads does that help?
hey, nothing have been actually moved from storage/private_uploads. All signatures remains there and folder app/storage isnt event present. Not really sure how to proceed now. Thanks!
btw there is not even link to missing image (signature).
had this problem few months ago and i was able to solve it (not remember how, but its not important). Just saying, that this is probably somewhere deeper.
But there is link to missing image at where logo should be.
Thanks
Hey guys!
I think it may also be related to the following problem: https://github.com/snipe/snipe-it/issues/8574
Because the error occurs at the same time.
Is there any fix or methord can load images? or How to restore data in a lower version instance.
For me, after upgrade from v4.9.3 to v5.0.0, images where not showing because of the way v5 interacts with my LAMP server. Check the URL of an image. In my case it was duplicating the IP and it looked like this - http://192.168.XX.XX:5555/192.168.XX.XX:5555/uploads/logo.png. I changed app_url to null in .env file and everything works fine now.
images where not showing because of the way v5 interacts with my LAMP server.
That seems unlikely. There's nothing special about v5 that would affect how your LAMP server works.
I changed app_url to null in .env file and everything works fine now.
That should never be the answer though, as it will undoubtedly cause other issues down the line.
When you had the APP_URL, did you have a protocol specified (http://192.168.XX.XX:5555 versus 192.168.XX.XX:5555)? The protocol is always required for APP_URL.
well for me there is just blank space instead of broken URL. If it would be just broken link, i should be able to fix it, but this is just next level :(
well for me there is just blank space instead of broken URL
What's the URL of the broken logo?
well for me there is just blank space instead of broken URL
What's the URL of the broken logo?
since i tried to change logo there is now broken URL: servername/uploads/setting-logo-Uu6sbXE1c4.jpg --> which means \public\uploads logo that worked on 4.9.5 was (and physicaly still is) here --> \storage\app\public
cant tell you URL of signatures, since there is none atm
@helloweenx
Logo that worked on 4.9.5 was (and physicaly still is) here --> \storage\app\public
That's never been the place where we keep public uploads though. Public uploads have always been in public/uploads
I just pushed out a fix for signatures on develop
Our directory structure has always been:
- Publicly viewable uploads (logo, asset models, locations, etc) are in
public/uploads - Private uploads (ones that we need to check your auth to see whether you're allowed to view it, such as license uploads) live in
storage/private_uploads
images where not showing because of the way v5 interacts with my LAMP server.
That seems unlikely. There's nothing special about v5 that would affect how your LAMP server works.
I changed app_url to null in .env file and everything works fine now.
That should never be the answer though, as it will undoubtedly cause other issues down the line.
When you had the APP_URL, did you have a protocol specified (
http://192.168.XX.XX:5555versus192.168.XX.XX:5555)? The protocol is always required for APP_URL.
Protocol was specified as http://
With the Release 5.0.2 I am still seeing now Server 500 errors while uploading any kind of pictures to assets or even the branding logo.
Anyone an idea why?
I'd need a specific error message to work with.
(Also try adding PUBLIC_FILESYSTEM_DISK=local_public to your .env file and clear your config cache by running php artisan config:cache)