Codeception: [UnexpectedValueException] phar error: "/tmp/C3nmxfFy.tar" is a corrupted tar file (checksum mismatch of file ... )

Created on 3 Jan 2015  路  13Comments  路  Source: Codeception/Codeception

I've now found another problem when generating the coverage reports: this is still on Yii2.

If I run the acceptance or functional tests _separately_ along with the option --coverage-html I _do_ get a report generated (the report is empty, but I'm assuming this is probably for another bug report)

If I instead run the following command:

$ ../vendor/bin/codecept run --coverage-html

After all tests have passed successfully I get the following error:

  [UnexpectedValueException]                                                                       
  phar error: "/tmp/C3nmxfFy.tar" is a corrupted tar file (checksum mismatch of file "<br />       
  <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cel")  

the file is reported to be and HTML file instead of a TAR archive:

$ file /tmp/C3nmxfFy.tar
/tmp/C3aymEP7.tar: HTML document, ASCII text, with very long lines

Most helpful comment

It worked after disabling remote
nvm

All 13 comments

well as from your information provided we can see <font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cel" can you check that everything was ok ?

looks like it's not, and I should have checked the content better I thought it was just a bunch of warnings... in fact, at the bottom of it there's the following:

 Fatal error: Uncaught exception 'Codeception\Exception\Configuration' with message 'Path for logs not specified. Please, set log path in global config' in /mnt/workspace/test/yii2composer/basic-dev/vendor/codeception/codeception/src/Codeception/Configuration.php on line 402

which I probably haven't seen noted anywhere in the docs...

do you happen to know what would be configuration line to use to specify the log?

this already was fixed long time ago in yii2-basic and yii2-advanced , see theirs configs

Looks like I've got the updated version.
My current codeception.yml content is the following:

actor: Tester
paths:
    tests: codeception
    log: codeception/_output
    data: codeception/_data
    helpers: codeception/_support
settings:
    bootstrap: _bootstrap.php
    suite_class: \PHPUnit_Framework_TestSuite
    memory_limit: 1024M
    log: true
    colors: true
config:
    test_entry_url: /index-test.php
coverage:
    enabled: true
    remote: true
    remote_config: ../tests/codeception.yml
    include:
        - ../models/*
        - ../modules/*
        - ../controllers/*
    c3_url: 'https://basic-dev.yii2.sandbox/index-test.php/'

not sure why then this exception occures , try to make this on clean new yii2-basic

I'm updating it now, I'll report shortly after.

Oddly enough, I've updated the basic app the best I could and still getting the error.
I do have a bit of changes on mine so I can't really rule out a problem with the content of the application.

If #1622 worked for you this one should be closed i think

by disabling the REST module and removing the tests that were using that module, I'm not getting the error any more.

The bug still stands when testing using the REST module of CodeCeption, so not sure this should be closed as well.

can you check that all urls correct ? If you say that it is because of unaccessible page it can be some configuration problem in your server ?

Closing this one down now: I can now generate all the coverage.
The only thing that changed is that after @DavertMik suggested in Codeception/Codeception#1652 to downgrade to PHPUnit 4.4.* which in turns made me downgrade to CodeCeption stable (my application is currently using "minimum-stability": "dev").

For the record I'm now on CodeCeption 2.0.9

@ThePeach I have

        "phpunit/phpunit": "4.4.0",
        "codeception/codeception": "2.0.9",

And I still have below error while running run --coverage-html

[UnexpectedValueException]                                                                              
  phar error: "/private/var/tmp/C3G8UwbK.tar" is a corrupted tar file (checksum mismatch of file "<br />  
  <font size='1'><table class='xdebug-error xe-warning' dir='ltr' border='1' cellspacing='0' ce"

any suggestions?

It worked after disabling remote
nvm

Was this page helpful?
0 / 5 - 0 ratings