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

TokenFileException: File '/var/lib/jenkins/workspace/xxx/build/phpdox/tokens/Namspace/Class.php.xml' not found #164

Closed
puffinofdoom opened this issue Oct 3, 2014 · 11 comments

Comments

@puffinofdoom
Copy link

Running phpdox 0.7.0 as part of a Jenkins build and got the following error:

[exec] Oups... phpDox encountered a problem and has terminated!
[exec] 
[exec] It most likely means you've found a bug, so please file a report for this
[exec] and paste the following details and the stacktrace (if given) along:
[exec] 
[exec] PHP Version: 5.4.4-14+deb7u8 (Linux)
[exec] PHPDox Version: 0.7.0
[exec] Exception: TheSeer\phpDox\Generator\TokenFileException (Code: 1)
[exec] Location: phar:///usr/bin/phpdox/phpdox/generator/project/TokenFile.php (Line 19)
[exec] 
[exec] File '/var/lib/jenkins/workspace/xxx/build/phpdox/tokens/Namspace/Class.php.xml' not found
[exec] 
[exec] #0 phar:///usr/bin/phpdox/phpdox/generator/Generator.php(153): TheSeer\phpDox\Generator\TokenFileIterator->current()
[exec] #1 phar:///usr/bin/phpdox/phpdox/generator/Generator.php(146): TheSeer\phpDox\Generator\Generator->processTokenFiles()
[exec] #2 phar:///usr/bin/phpdox/phpdox/Application.php(238): TheSeer\phpDox\Generator\Generator->run()
[exec] #3 phar:///usr/bin/phpdox/phpdox/CLI.php(152): TheSeer\phpDox\Application->runGenerator()
     [exec] #4 /usr/bin/phpdox(460): TheSeer\phpDox\CLI->run()

I can verify that the Namspace/Class.php.xml file is in the location indicated in the above stacktrace, and the permissions appear to be correct.

Can you help?

@theseer
Copy link
Owner

theseer commented Oct 5, 2014

I'm a bit lost as to why this can happen but since with #165 there's a second report with exactly the same problem I'm beyond assuming it's an isolated problem on your machine.

The exception is thrown after a failing file_exists() check. Since the file is (probably) created within the same run of phpDox, the only thing I can come up with right now is a statcache problem. I thus implemented a clear call with commit 409a0e6.

Would it be possible for you to verify if that fixes the problem?

@dstockto
Copy link
Contributor

dstockto commented Oct 6, 2014

I tried again with the latest and the problem still happens:

[exec] Oups... phpDox encountered a problem and has terminated!
     [exec] 
     [exec] It most likely means you've found a bug, so please file a report for this
     [exec] and paste the following details and the stacktrace (if given) along:
     [exec] 
     [exec] PHP Version: 5.6.0 (Darwin)
     [exec] PHPDox Version: 0.7.0-16-g39fdd5c-dirty
     [exec] Exception: TheSeer\phpDox\Generator\TokenFileException (Code: 1)
     [exec] Location: /Users/Shared/Jenkins/Home/workspace/XXXX branches/vendor/theseer/phpdox/src/generator/project/TokenFile.php (Line 19)
     [exec] 
     [exec] File '/Users/Shared/Jenkins/Home/workspace/XXXX%20branches/build/phpdox/tokens/AccountServices/autoload_classmap.php.xml' not found
     [exec] 
     [exec] #0 /Users/Shared/Jenkins/Home/workspace/XXXX branches/vendor/theseer/phpdox/src/generator/Generator.php(153): TheSeer\phpDox\Generator\TokenFileIterator->current()
     [exec] #1 /Users/Shared/Jenkins/Home/workspace/XXXX branches/vendor/theseer/phpdox/src/generator/Generator.php(146): TheSeer\phpDox\Generator\Generator->processTokenFiles()
     [exec] #2 /Users/Shared/Jenkins/Home/workspace/XXXX branches/vendor/theseer/phpdox/src/Application.php(238): TheSeer\phpDox\Generator\Generator->run()
     [exec] #3 /Users/Shared/Jenkins/Home/workspace/XXXX branches/vendor/theseer/phpdox/src/CLI.php(152): TheSeer\phpDox\Application->runGenerator()
     [exec] #4 /Users/Shared/Jenkins/Home/workspace/XXXX branches/vendor/theseer/phpdox/composer/bin/phpdox(30): TheSeer\phpDox\CLI->run()

The file that it is complaining about does exist.

@theseer
Copy link
Owner

theseer commented Oct 6, 2014

Note from #160: Same as here the path contains spaces. While i couldn't reproduce the issue on my system yet, this looks suspicious (%20 ./. actual space)...

I'll investigate some more.

@theseer
Copy link
Owner

theseer commented Oct 6, 2014

@puffinofdoom Can you confirm your (unmodified) path contains spaces as well?

theseer added a commit that referenced this issue Oct 6, 2014
@theseer
Copy link
Owner

theseer commented Oct 6, 2014

I pushed an update with commit a51e7db that (probably) fixes this issue.

@guckykv can you verify if that fixes it for you as well?

@puffinofdoom
Copy link
Author

I can confirm that the path does contain spaces.

On 6 October 2014 14:50, Arne Blankerts [email protected] wrote:

I pushed an update with commit a51e7db
a51e7db
that (probably) fixes this issue.

@guckykv https://github.com/guckykv can you verify if that fixes it for
you as well?


Reply to this email directly or view it on GitHub
#164 (comment).

@dstockto
Copy link
Contributor

dstockto commented Oct 6, 2014

@theseer The latest (phpDox 0.7.0-18-g20d0bf4-dirty - Copyright (C) 2010 - 2014 by Arne Blankerts) was successful in producing docs with no error with the rest of the setup being the same. As an odd side note, each time I've done a composer update to get the new version of phpdox, I receive an error indicating that vendor/bin/phpdox has changes that are not committed. I've worked around it be blowing away the vendor directory and doing composer install, or blowing away the workspace in jenkins. I have not modified the phpdox code (or anything in vendor) in any way though.

@guckykv
Copy link

guckykv commented Oct 6, 2014

@theseer: Yup - current version fixes my jenkins problem too. Everything fine now!

[06.10.2014 - 17:56:53] Processing project 'phpdox' completed.

One minor thing:

phpDox %development% - Copyright (C) 2010 - 2014 by Arne Blankerts

The version number is lost - I install phpdox via composer.json of a symfony2 project.

@theseer
Copy link
Owner

theseer commented Oct 6, 2014

@dstockto Can you open a new issue for the composer issue?

@theseer
Copy link
Owner

theseer commented Oct 6, 2014

@guckykv Thanks for reminding me - I already noticed that the version info gets garbled in composer installs and planned to fix that. I personally don't use composer for tools but their respective phar.

@theseer
Copy link
Owner

theseer commented Oct 6, 2014

I consider this issue fixed and thus close the ticket.

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

4 participants