Could not write error to log file
- Dominant language
- PHP
- Stars
- 73
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
While debugging for this issue https://github.com/Codeception/Codeception/issues/4871, I keep getting message `Could not write error to log file`.
When I traced the cause, it's from here.
https://github.com/Codeception/c3/blob/c7348bbc82da82834fe237c5fb754003ac0fe782/c3.php#L36-L43
Apparently the `c3tmp` directory is always emptied by `__c3_clear()` when the test is executed.
https://github.com/Codeception/c3/blob/c7348bbc82da82834fe237c5fb754003ac0fe782/c3.php#L288-L291
This cause problem because `is_writable` returns true if the file exists and is writable.
http://php.net/manual/en/function.is-writable.php
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in c3.php around lines 36-43, then read __c3_clear() around lines 288-291 and trace how the c3tmp directory is handled during test execution. Reproduce the logging failure described in the issue and verify that the error log remains writable after cleanup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100