snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

[Bug]: No email sent on asset check in

Open Sc00by121 opened this issue 2 months ago • 23 comments

Snipe-IT Version

v8.3.4 build 20218

PHP Version

8.3.7

Composer Version

2.8.10

MySQL/MariaDB version

MySQL 5.7

How did you install Snipe-IT?

Git install

Is this a fresh install or an upgrade?

Upgrade

What happened?

We have upgraded from 8.2.1 to 8.3.4 and on 8.2.1 check in emails were sent. On the latest 8.3.4 check IN emails are not sent.

There looks to be no attempt from SNIPE to sent this message. No logs either in SNIPE or our mail server

Check OUT, acceptance emails etc all send OK

What browsers are you seeing the problem on?

No response

Can you reproduce this on the public demo?

N/A

Do you have full multiple company support enabled?

Yes

If you have full multiple company support enabled, do you have location scoping to company enabled?

Yes

Application log output


Browser console output


Common Issues

  • [x] I have searched this repo for existing issues related to my issue (including closed issues)
  • [x] My APP_URL is set correctly in my .env file (including http or https and no trailing slash)
  • [x] I have searched the official Snipe-IT documentation and have checked the Common Issues documentation (where applicable)
  • [x] I have run database migrations (where applicable).
  • [x] I have attached screenshots and/or videos of the issue (where applicable)

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

Sc00by121 avatar Oct 29 '25 12:10 Sc00by121

Hi @Sc00by121

Are you able to send a test email from the General Settings (/admin/settings):

Image

Can you share a screenshot (redacted as needed) of the category edit screen for the item you checked out?

Image

marcusmoore avatar Oct 29 '25 20:10 marcusmoore

Yes, test emails work. Check OUT emails work along with acceptance. Only check IN emails that do not get sent

Image

Sc00by121 avatar Oct 30 '25 10:10 Sc00by121

Sorry for the delay @Sc00by121.

Can you share your Notification settings:

Image

Can you also try to click the Save button for the category to see if that helps the situation?

marcusmoore avatar Nov 12 '25 21:11 marcusmoore

Hi, Have tried the same button - still no change

Image

Sc00by121 avatar Nov 15 '25 13:11 Sc00by121

You don't have an email address in your CC email

snipe avatar Nov 18 '25 12:11 snipe

All emails are sent except check IN when there is nothing in the CC field. The user doesn't get a check IN. If I put in an address in the CC the check IN is sent but only to the CC address

The end user never receives a check IN regardless of the setting but the terminology on the page suggests they should be given that the CC is only there to receive COPIES of messages.

Sc00by121 avatar Nov 19 '25 11:11 Sc00by121

@Sc00by121 I'm having a hard time tracking down what could be causing this for you.

We recently the category settings page to improve the terminology and more accurately represent what settings are actually being stored:

Image

Can you update to the latest version and see if that helps?


If you have the ability and are comfortable with it, can you switch your value for APP_DEBUG in .env to APP_DEBUG=true and dump some logging information in this file?

Specifically replacing the onCheckedIn() method on lines 152-243 with the contents of this gist.

Then do the checkout/check-in process and share (redacted as needed) what shows up in the application's log file?

Remember to revert the changes! APP_DEBUG=false and you can just stash the changes for potential future debugging by running git stash in the terminal.

marcusmoore avatar Nov 19 '25 19:11 marcusmoore

I'm not sure what's going on now. I run git pull as I have done numerous times before and I am now being prompted to Sign In - I sign in with my account for this and it fails with a fatal error

I can't find anything in the issue log to a change that might cause this, is this now normal to have to sign in when running git pull?

Sc00by121 avatar Nov 24 '25 13:11 Sc00by121

signing into the app, or into GH for the pull?

snipe avatar Nov 24 '25 13:11 snipe

On our IIS server, past upgrades have been via DOS prompt, running git pull then upgrade.php - Never an issue

When I run git pull now I now get a box popping up asking me to sign into GitHub

Sc00by121 avatar Nov 24 '25 14:11 Sc00by121

GH for some reason removed our redirect from the old location. See the release notes for how to change your origin to the correct url

snipe avatar Nov 24 '25 14:11 snipe

Thank you! - Todays version update wasn't live when I started this :-) - spotted it now and currently updating. Will report back on findings....

Sc00by121 avatar Nov 24 '25 14:11 Sc00by121

Which log am I looking at? - I only have laravel in the logs folder and that doesn't contain anything different

Also, i'm not sure if closed issues are notified but the issue I raised in #18119 is still there

Sc00by121 avatar Nov 24 '25 14:11 Sc00by121

Not sure what you mean about logs?

snipe avatar Nov 24 '25 15:11 snipe

Not sure what you mean about logs?

Sorry, I'm back to the last post from Marcus. The last step -

Then do the checkout/check-in process and share (redacted as needed) what shows up in the application's log file?

I can't find which log file he is referring to

Sc00by121 avatar Nov 24 '25 15:11 Sc00by121

Just to update - I've ran through the update again, applied the above patch, enabled debug but nothing gets saved to any logs

Sc00by121 avatar Nov 26 '25 16:11 Sc00by121

applied the above patch, enabled debug but nothing gets saved to any logs

Are you not seeing the string "onCheckedIn in the Checkoutable listener fired" in the log file storage/logs/laravel.log at all?

marcusmoore avatar Dec 03 '25 18:12 marcusmoore

applied the above patch, enabled debug but nothing gets saved to any logs

Are you not seeing the string "onCheckedIn in the Checkoutable listener fired" in the log file storage/logs/laravel.log at all?

No

Sc00by121 avatar Dec 04 '25 08:12 Sc00by121

The log file exists and you are seeing other logs in there (with recent timestamps)?

marcusmoore avatar Dec 04 '25 17:12 marcusmoore

The log file exists and you are seeing other logs in there (with recent timestamps)?

Yes - I have another open issue where logs for that have been gathered from the laravel file

Sc00by121 avatar Dec 05 '25 08:12 Sc00by121

Is the history being updated to show that the item was checked in?

Image

If so then I'm not sure why the LogListener is firing but the CheckoutableListener is not firing for check-ins.

Can you paste the output of git status?

marcusmoore avatar Dec 08 '25 18:12 marcusmoore

Yes it is

`On`` branch master Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git restore ..." to discard changes in working directory) modified: app/Listeners/CheckoutableListener.php modified: public/web.config

Untracked files: (use "git add ..." to include in what will be committed) app/Listeners/CheckoutableListener - Copy.php web.config

no changes added to commit (use "git add" and/or "git commit -a")`

Sc00by121 avatar Dec 09 '25 09:12 Sc00by121

If you've set APP_DEBUG=true in your environment and and you're not seeing onCheckedIn in the Checkoutable listener fired appear in your log files when you check in an item then I'm not sure how one listener is firing but not the other while also not dropping some error information in the log file 🤔

Your comment about #18119 made me think: what are your APP_TIMEZONE and APP_LOCALE set to in .env?

marcusmoore avatar Dec 09 '25 17:12 marcusmoore

Tested again, still no output to the log

However, good point on the TIMEZONE, I have changed both to my location and that has fixed the other issue (I'll update that bug)

Sc00by121 avatar Dec 10 '25 14:12 Sc00by121

Image

It's working! - Still nothing in the logs but I've gone back to the original file and all is good.

I went back into the category setting and the 'Send email to user upon checking' was UNTICKED - However, I've never seen this before! - As you can see from an earlier screenshot up the thread it wasn't there - It's there now! - Ticked it and it works - I did see that unticking some hides other settings, perhaps an update has fixed this, not sure, but it's working - and to top it off the other issue I had is also fixed - Happy days

Thank you!

Sc00by121 avatar Dec 10 '25 14:12 Sc00by121

There was a little work done around that recently. Glad to see it's working for you now!

marcusmoore avatar Dec 10 '25 19:12 marcusmoore