Cron error periodically

Helpdesk for my helpdesk software

Moderator: mkoch227

hesker
Posts: 25
Joined: Thu Jan 16, 2020 11:35 pm

Re: Cron error periodically

Post by hesker »

Just got it again, slightly over an hour after the previous one.
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Cron error periodically

Post by Klemen »

Both POP3 and IMAP use the same code to parse received email so no matter how they are received they all get processed (passed to) the same functions.

Please turn Debug mode ON in Hesk admin panel > Settings > Help desk tab > look under Features and we'll see if we get a better error message.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
hesker
Posts: 25
Joined: Thu Jan 16, 2020 11:35 pm

Re: Cron error periodically

Post by hesker »

Finally had a chance to look into this, but debug mode revealed nothing:
Connected to the IMAP server "{domain.com:993/imap/ssl/novalidate-cert}".
No unread messages found.
Disconnected from the IMAP server.
Now what?
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Cron error periodically

Post by Klemen »

That's a normal response. I'd keep the debug mode active and see what it says when an error occurs.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
hesker
Posts: 25
Joined: Thu Jan 16, 2020 11:35 pm

Re: Cron error periodically

Post by hesker »

As far as I can tell this IS the debug error. This is what I keep being sent, multiple times per day every day now. If I disable debug mode, I just get "An error occurred". If I enable debug, I get a seemingly normal response. I'm at a loss.
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Cron error periodically

Post by Klemen »

Yeh, that's how Cron works - anything returned by the script will be emailed to you.

Unfortunately, there's no way around it - you need to keep debug mode active and receive an email every time the Cron job runs. When a connection error does occur, the error message should be different (and hopefully help us find the issue)?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
hesker
Posts: 25
Joined: Thu Jan 16, 2020 11:35 pm

Re: Cron error periodically

Post by hesker »

i'll leave it running a few more days but so far, nothing but "correct" responses with debug enabled.
hesker
Posts: 25
Joined: Thu Jan 16, 2020 11:35 pm

Re: Cron error periodically

Post by hesker »

Still nothing but normal responses with debug enabled. I have no reason to think that's going to change.
hesker
Posts: 25
Joined: Thu Jan 16, 2020 11:35 pm

Re: Cron error periodically

Post by hesker »

I'm reasonably sure this error messages is a false positive. I only get it if debug is disabled, and there is no actual problem as the fetching works perfectly fine (both pop and imap).
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Cron error periodically

Post by Klemen »

Rather than a false one, it's probably a temporary one. On the next run, the mail server connection works fine so emails get fetched.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
hesker
Posts: 25
Joined: Thu Jan 16, 2020 11:35 pm

Re: Cron error periodically

Post by hesker »

But then why, when debug is enabled, do I never get any errors, not even once?
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Cron error periodically

Post by Klemen »

Murphy :roll: ?

Nothing changes in the debug mode except that steps Hesk performs and PHP error messages are output, instead of silenced.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
hesker
Posts: 25
Joined: Thu Jan 16, 2020 11:35 pm

Re: Cron error periodically

Post by hesker »

Yeah that's what I mean by some sort of false positive. Something, maybe specific to this host (SiteGround), is triggering the error messages frequently but not on every run, only when debug is disabled. But since I have no idea what to point them to, they just point to the script and say "talk to the author".
hesker
Posts: 25
Joined: Thu Jan 16, 2020 11:35 pm

Re: Cron error periodically

Post by hesker »

Now that debug is turned off again, I got the error once more.

<h2>An error occured.</h2><p>For details turn <b>Debug mode</b> ON in settings and run this script again.</p>
hesker
Posts: 25
Joined: Thu Jan 16, 2020 11:35 pm

Re: Cron error periodically

Post by hesker »

Wow I actually got a different error for once...

<pre>Can not authenticate to IMAP server: [CLOSED] IMAP connection broken (authenticate)</pre>
Locked