> yii\base\UnknownMethodException: Calling unknown method: yii\console\Application::getSession()
thyseus opened this issue · 3 comments
What steps will reproduce the problem?
1: Push a Job that uses yii2-httpclient on to a Queue:
Yii::$app->queue->push(new LicenseJob([
'strategy_id' => $strategy->id,
'user_id' => $download->user_id,
'download_id' => $download->id,
'domain' => $download->domain,
]));
2: Execute the Worker:
php yii queue/run --verbose --color
What's expected?
Job should run without problems
What do you get instead?
2018-05-22 18:53:35 [pid: 30575] - Worker is started
2018-05-22 18:53:35 [45] app\jobs\LicenseJob (attempt: 1, pid: 30575) - Started
2018-05-22 18:53:35 [45] app\jobs\LicenseJob (attempt: 1, pid: 30575) - Error (0.294 s)
yii\base\UnknownMethodException: Calling unknown method: yii\console\Application::getSession()
2018-05-22 18:53:35 [pid: 30575] - Worker is stopped (0:00:00)
Additional info
I also tried to set 'session' to config/console.php but without success.
Is it possible to use yii2-httpclient from a console application or do i need to fall back to plain curl?
Thanks a lot !
Do you have a stacktrace for the error? I see no reason why httpclient would try access session by itself...
Thanks for posting in our issue tracker.
In order to properly assist you, we need additional information:
- When does the issue occur?
- What do you see?
- What was the expected result?
- Can you supply us with a stacktrace? (optional)
- Do you have exact code to reproduce it? Maybe a PHPUnit tests that fails? (optional)
Thanks!
This is an automated comment, triggered by adding the label status:need more info
.
It has been 2 or more weeks with no response on our request for more information.
In order for our issue tracker to be effective, we are closing this issue.
If you want it to be reopened again, feel free to supply us with the requested information.
Thanks!
This is an automated comment, triggered by adding the label expired
.