Closed jmartins1 closed 4 years ago
asset picture missing only displaying place holder
Not sure what you mean exactly? What placeholder?
What's your APP_URL in your .env? What's the URL of the image it's trying to load?
APP_URL=https://ARPSINV1
Does that file actually exist there?
no, it exists here C:\wamp\www\snipe-it\public\uploads\models
I do not have this directory
no, it exists here C:\wamp\www\snipe-it\public\uploads\models
That's where it should be, and that's where that URL should be trying to find it.
Yes, but the images are not appearing in the emails notifications.
I'm not able to reproduce this locally.
Do you have the "Show images in emails" setting turned on in your Admin > Settings > General
Yes
Maybe this might help?
I re-ran the following commands; in this order:
composer dump-autoload composer clear-compiled php artisan config:clear php artisan view:clear php artisan cache:clear php artisan route:clear php update.php
Here are the results:
I can't fathom why it wouldn't be able to find the update.php file. It's definitely checked into the source...
What happens if you run git pull
?
It's indeed odd. I was on 5.0.1 and ran these commands except php update php. Then I submitted an issue that I was receiving a 500 server error. One of the users then advised me to run php update.php, which I did. There didn't appear to be any issues running the command and it cleared the 500 error. Today I updated to 5.0.2 (although the missing notifications issue existed in 5.0.1), I then tested the notifications email and had the same issue. I again ran all the commands this time to include the php upgrade.php but the issue still exists.
I attempted git pull. Here is the result. Please note I run this on Windows Server 2012 R2. SnipeIT is hosted on a WAMP Server.
Ah, this wasn't installed via git then? In your first post, you mentioned you ran update.php
, but now you can't anymore?
Correct. If you look at #8583 that might help.
Attempted to start from scratch using instructions on: https://snipe-it.readme.io/docs/wamp
When attempting to run: composer install --no-dev --prefer-source
Received the following errors (small snapshot):
I ran composer update, which fixed this issue.
I then ran php update.php, because I was still getting the 500 server error.
These two actions appears to fix both issues. However, after importing my database and necessary files (uploads, etc.) the inventory system indicates total assets greater than zero. Running a custom report, indicates there are items in the inventory system. I am able to search for an asset tag and bring it up, but nothing appears in the All Assets, Recent Activity, etc.
I am also now unable to roll-back php below 7.2.33.
The WAMP Installation No Workie.
You should never ever be running composer update. It means your composer.lock file and ours will be out of sync, and that can cause problems for you down the line (and potential bugs that we won't be able to reproduce.)
Without knowing why those package installs failed, it's tough for us to know that's going on here.
Understood. I ran this on a test installation to try to get past the error.
On Oct 26, 2020, 3:36 PM, at 3:36 PM, snipe notifications@github.com wrote:
You should never ever be running composer update. It means your composer.lock file and ours will be out of sync, and that can cause problems for you down the line (and potential bugs that we won't be able to reproduce.)
Without knowing why those package installs failed, it's tough for us to know that's going on here.
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/snipe/snipe-it/issues/8601#issuecomment-716837528
Try running (on the instance you didn't composer update
on):
composer install --no-dev --prefer-source --verbose
This can hopefully give you a more verbose output for your composer install process.
Can you run:
php --version
which php
and tell me the output? (That second one might not work on windows...not sure, I don't use windows.)
I've never seen composer fail like that with no actual specific error messages. I'd have to guess it's a PHP extension issue or a version issue.
which php is not recognized
I run ( composer install --no-dev --prefer-source --verbose ) on a new installation of WAMP Server. After installing WAMP, I downloaded Snipeit version 5.0.6 as per https://snipe-it.readme.io/docs/wamp.
What about php -m
?
(Can you just paste it in? It makes it difficult to command+f to search on the page and compare with what you should have)
[PHP Modules] bcmath bz2 calendar Core ctype curl date dom exif fileinfo filter gd gettext gmp hash iconv imap intl json ldap libxml mbstring mysqli mysqlnd openssl pcre PDO pdo_mysql pdo_sqlite Phar readline Reflection session SimpleXML soap sockets SPL standard tokenizer wddx xml xmlreader xmlrpc xmlwriter xsl zip zlib
[Zend Modules]
Thanks - I know it's dumb, but it makes my life easier vs scrubbing through images.
I don't see anything funny in there - nothing obvious missing, I mean.
I'm honestly stumped. As I mentioned, I've never seen such a weird error from composer before. :-/
I would not question your greatness... :)
LOL well you probably should....
I haven't given up on this, but I'd love it if other folks who may have seen this before could chime in.
Hopefully you guys can figure this out. I've been religious about updating Snipe-IT since 3.something.
I'm sure we will. Just hang tight. I'm nothing if not stubborn.
So I guess I'm wondering if this is something about permissions? Wouldn't make sense that you can create the image file, but then can't display it. That's unusual.
Another thought - the URL that you're using is definitely only accessible from the inside of your corporate network. So long as you're testing your emails and whatnot from the inside, it should definitely work.
Something else to try - what if you grab the attempted URL of both the logo image and the model image, and try and view those just in a web browser inside your network?
Also, I'm seeing https://
as your protocol, but you're using a hostname that probably isn't going to be able to be issued a conventional certificate - maybe something wonky there?
The other thing I'm thinking is that. maybe WAMP has itself configured to send URL's correctly to PHP, but not to be able to browse regular files? That'd be weird, because that's basically how Apache tends to work, by default.
Hi uberbrady, thanks for the feedback.
Another thought - the URL that you're using is definitely only accessible from the inside of your corporate network. So long as you're testing your emails and whatnot from the inside, it should definitely work.
Yes, this is the case. Our inventory system is accessible internally only.
Something else to try - what if you grab the attempted URL of both the logo image and the model image, and try and view those just in a web browser inside your network?
I've attempted to view the images in a browser and only a placeholder is provided. I don't think it's a permissions issue as it worked through multiple SnipeIT versions. Permissions have not been modified.
Also, I'm seeing https:// as your protocol, but you're using a hostname that probably isn't going to be able to be issued a conventional certificate - maybe something wonky there?
Since our inventory system is for internal use only, we use a self-signed certificate (we use LDAP) This was true since version 4.9.4. The break was at version 5.0.0.
The other thing I'm thinking is that. maybe WAMP has itself configured to send URL's correctly to PHP, but not to be able to browse regular files? That'd be weird, because that's basically how Apache tends to work, by default.
Not sure here.
I created a test SnipeIT installation. Installed WAMP, Composer and SnipeIT, but when I ran composer install --no-dev --prefer-source I had nothing but failures. I thought it might be my web filter, so I turn it off temporarily. I also tried doing the install at home. In both cases I still received failures.
Thank you again!
@uberbrady also we embed images in the emails, so even if the Snipe-IT install isn't accessible to the outside world, they are attached to the email inline.
Okay, let's test things one-by-one here. First, drop a plain text file in your public/
directory at the base of your Snipe-IT install. Try to browse to https://arpsinv1/yourfilename.txt
Do you 404? or do you see the contents?
If you see the contents, then I think we might have some permissioning issues on the other directories (uploads/models, etc, etc). If not, then maybe it's a web-server config issue.
okay, good! so we have basic files that we can look at, here.
Do also check https://arpsinv1/test.txt
as well, it's absolutely possible that we have some http/https config issue here.
If that checks out, play around with moving your test file up into ./uploads
and then even into some of the subdirectories under uploads. (Then test https://arpsinv1/uploads/text.txt
, etc).
I feel like we're at least kinda getting somewhere now - and I now at least have a theory that could make sense, which is a good start!
Have you tried this btw? https://github.com/snipe/snipe-it/issues/8701#issuecomment-724653350
Uberbrady, I receive a 404 error when moving the file to the suggested location(s).
The .ENV settings are already in place
@jmartins1 So do you get that 404 via https:// as well as when you move into those directories?
If the https:// test failed, then there's probably something in your apache config - we might want to at least eyeball that. If you can throw it into a gist and paste the link here we can take a look.
Directory configs - look at the permissions in the ./public
directory and compare them to the ./public/uploads
as well as ./public/uploads/models
. If you have any directories that work for images, definitely compare those too. If you see anything glaringly different, mess around with those permissions and see if that gets you anywhere?
Oh, and do try a php artisan config:clear
in there too, just in case.
Incidentally, I do see the images in SnipeIT. I just don't see them in the emails.
Well that's weird. huh. we did do some major changes to the storage subsystem in v5, maybe we missed something in the email-image embedding system?
When you hover over those device image URL's, what're the URL's for those images?
@uberbrady again, I'm unable to reproduce this tho :(
Before you ask :), yes the jpg is in this directory.
Just curious, have you tried installing a WAMP server and walk through the steps in your documents? I tried multiple times and cannot get composer install --no-dev --prefer-source to run without error. I'm happy to backup SnipeIT and start over but I can't get past the Composer install to make it to the pre-flight page.
Please confirm you have done the following before posting your bug report:
Describe the bug Email notifications: asset picture missing only displaying place holder. Setting to include/not include asset picture in notification missing from notifications settings.
I've run php upgrade.php
To Reproduce Steps to reproduce the behavior: Normal process to check out an item
Expected behavior Asset picture appears or option not to or to include picture available under email notifications settings.
Server (please complete the following information):
Desktop (please complete the following information):