Skip to content
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

Cron Job giving error #593

Closed
diondkb opened this issue Apr 27, 2020 · 12 comments
Closed

Cron Job giving error #593

diondkb opened this issue Apr 27, 2020 · 12 comments

Comments

@diondkb
Copy link

diondkb commented Apr 27, 2020

Hi,

I am getting the following error when the cron job runs:-

In ArgvInput.php line 265:

Invalid argument supplied for foreach()

X-Powered-By: PHP/7.3.14
Content-type: text/html; charset=UTF-8

Any help would be appreciated

Thanks,
Dion

@Filoz
Copy link
Contributor

Filoz commented Apr 27, 2020

Hi,
I think that it might be useful if you post the cronjob command that you have scheduled

@diondkb
Copy link
Author

diondkb commented Apr 27, 2020

Hi,

Here we are -

  • | * | * | * | * | php /home/drfc30/public_html/freescout/artisan schedule:run >> /dev/null 2>&1
    -- | -- | -- | -- | -- | --

@diondkb
Copy link
Author

diondkb commented Apr 27, 2020

Found this in the logs -

Invalid argument supplied for foreach() {"exception":"[object] (ErrorException(code: 0): Invalid argument supplied for foreach() at /home/drfc30/public_html/freescout/vendor/symfony/console/Input/ArgvInput.php:265)
[stacktrace]
#0 /home/drfc30/public_html/freescout/vendor/symfony/console/Input/ArgvInput.php(265): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'Invalid argumen...', '/home/drfc30/pu...', 265, Array)
#1 /home/drfc30/public_html/freescout/vendor/symfony/console/Application.php(1007): Symfony\Component\Console\Input\ArgvInput->getFirstArgument()
#2 /home/drfc30/public_html/freescout/vendor/laravel/framework/src/Illuminate/Console/Application.php(79): Symfony\Component\Console\Application->getCommandName(Object(Symfony\Component\Console\Input\ArgvInput))
#3 /home/drfc30/public_html/freescout/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(121): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /home/drfc30/public_html/freescout/artisan(42): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 {main}
"}

@Filoz
Copy link
Contributor

Filoz commented Apr 27, 2020

Check this issue:
#145
He says that was caused by an incomplete configuration

And, this might help: https://laracasts.com/discuss/channels/laravel/invalid-argument-supplied-for-foreach-when-scheduling-task

@diondkb
Copy link
Author

diondkb commented Apr 27, 2020

I went back to the setup of the mailbox and in the connection settings and tested the connection and got an error
image

These are the settings I use on other clients which work?

@diondkb
Copy link
Author

diondkb commented Apr 27, 2020

Applying nate_nolting's solution worked - not getting the foreach() errors. Still cant connect when clicking test connection in email setup. Also get the following fetch error in fetch logs -
Error: imap_open(): Couldn't open stream {pop.europe.secureserver.net:995/pop3/ssl}. Can't connect to n1plpop04-v01.prod.ams1.secureserver.net,995: Connection refused; File: /home/drfc30/public_html/freescout/overrides/Webklex/IMAP/Client.php (230)

@Filoz
Copy link
Contributor

Filoz commented Apr 28, 2020

/usr/bin/php-cli (nate_nolting's solution) looks like a solution for goddy hosting.
Maybe @freescout-helpdesk , it could be added to Troubleshooting? Do you want a pr?

@diondkb
if you try with godaddy imap instead of pop3, same result?
imap.secureserver.net 993 (SSL)

@freescout-helpdesk
Copy link
Contributor

/usr/bin/php-cli (nate_nolting's solution) looks like a solution for goddy hosting.
Maybe @freescout-helpdesk , it could be added to Troubleshooting? Do you want a pr?

Yes. Feel free to submit a PR, we will check it.

@diondkb
Copy link
Author

diondkb commented Apr 28, 2020

Ok. What is a PR?

@diondkb
Copy link
Author

diondkb commented May 6, 2020

I contacted GoDaddy and asked if port 995. They confirmed it was. Is there a setting I need to change because the app is run on the same server as the mail server?

@diondkb
Copy link
Author

diondkb commented May 6, 2020

This is the error reported in the 'App Logs'

image

@freescout-helpdesk
Copy link
Contributor

Closing for no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants