-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
Could not open input file: <project root>/crunz #176
Comments
Regarding the "No task found" error, I encountered the same when trying to use the 1.11.0 beta few weeks ago after the empty email log fix was added. It only happened on my production server (Ubuntu 16.04.5, PHP 7.2.13). I had to rollback. I couldn't reproduce the bug locally so I didn't report it, thinking it was a problem on my side. I couldn't investigate more on my production server, I needed my tasks to run again really quickly sorry. |
@pridit i need some details to reproduce, please provide paths relative to
@kinoute Could you try to investigate this bug locally? I think that this bug is caused by changes in #146, all paths are relative to |
The thing is, I can't reproduce it locally on My Mac. With an empty project, respecting the same project's tree and even importing my crunz.yml file, it works (with the beta or the rc1 version). IIRC, I even tried on my server with an empty project and it was working as well, that's why I didn't report it, thinking my project was the problem. |
Since @pridit said he wasn't able to reproduce the bug everytime, I made a loop to see if I could catch it: We can see that with the loop, I get the "No task error" every time. But running directly the script, It works. Could it be a problem about how schedule:run is called, by who and where? When I use part of the cronjob entry to simulate the cronjob that should run every minute, I get the same error as well: |
I think the key here is where, after #146 all paths resolution is relative to About the second screenshot, try to do |
We have answer, thanks @kinoute. |
@pridit @kinoute colud you test that version https://github.com/PabloKowalczyk/crunz/tree/fix-missing-tasks-source? Remember about adding |
It is :) Forgot about |
@kinoute could test again after update, please? |
Interesting, where are your tasks? In |
So, i must also fallback |
Already pushed fixes, could retest please? |
Did that task work in |
the task is only |
Your screenshot tells |
It's because I use the
|
Done some testing with similar task:
|
Same problem with v1.10.1. Do you want me to upload my test repo? |
No, it is not necessary. Bug seems solved to me, WDYT? |
Really? I have still the problem here, even with your last commits on Running vendor/bin/crunz schedule:run -vvv within the repo : works https://gist.github.com/kinoute/2f1eec3c4908f17b63001aa29bc38795 |
Isn't it the same behavior as on |
Okay sure, I will maybe create another issue to it. But I thought we were fixing path related problems at once, that's why. Since you took over the development of this library, I run in production tasks with all of them using |
What version you use in production? Maybe I'm wrong and |
I posted my test repo here: https://github.com/kinoute/crunz-error (used locally on PHP 7.3 by the way, using your latest fixes on your personal GitHub repo). That's the one who works from within the repo, but the task fails when getting called by the cronjob call /path/to/project etc. To sum up my use of crunz, I've been using the same kind of tasks (all of them using Therefore, I updated my version in production, but then I got the problem described here, "No task found". I immediately downgraded at that time because I couldn't reproduce the bug locally. Since this issue has been discussed here, I updated again to v1.11.0-rc.1 in production. I still have the same issue about tasks not being found, but I use a workaround to avoid this error (I basically changed the cronjob call to " I also have a problem where some scripts generate an empty error every time from crunz as discussed in the other issue, but it seems related to a PHP 7.3.0 bug and I'm waiting 7.3.1 or 7.3.2 to see how it goes. For the moment, I disabled |
Tested your repository against |
Thanks for the answer. Now I know why my production tasks were working when the local ones weren't. I think the initial error of this issue has been fixed in your own repo so I have no more to add. I will update when PHP 7.3.2 is released since, according to one of the developers, it will fix my annoying other bug. |
Glad to hear. |
Crunz version:
v1.11.0-beta.1
PHP version:
7.2.5
Operating system type and version:
Ubuntu 18.04.1
Description
Since upgrading to this beta release, calling
crunz schedule:run
results inCould not open input file: <project root>/crunz
Intermittently, it may also throw
No task found! Please check your source path.
as well without any configuration change, but I have not been able to reliably reproduce this one.Both of these are not an issue for releases prior to this version.
How to reproduce
Upgrade to v1.11.0-beta.1 or later and attempt to call
schedule:run
.The text was updated successfully, but these errors were encountered: