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

Undefined method exitWithError #7

Closed
peterjaap opened this issue Jan 15, 2020 · 5 comments
Closed

Undefined method exitWithError #7

peterjaap opened this issue Jan 15, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@peterjaap
Copy link

peterjaap commented Jan 15, 2020

$ ./extdn_installer.phar install kiwicommerce/module-admin-activity
➜          
 ______      _   _____  _   _   _____           _        _ _           
|  ____|    | | |  __ \| \ | | |_   _|         | |      | | |          
| |__  __  _| |_| |  | |  \| |   | |  _ __  ___| |_ __ _| | | ___ _ __ 
|  __| \ \/ / __| |  | | . ` |   | | | '_ \/ __| __/ _` | | |/ _ \ '__|
| |____ >  <| |_| |__| | |\  |  _| |_| | | \__ \ || (_| | | |  __/ |   
|______/_/\_\__|_____/|_| \_| |_____|_| |_|___/\__\__,_|_|_|\___|_|   
➜  Running ExtDN Installer 
 [ExtDN\Task\CheckMagentoRoot] Checking that we are running in the correct folder.
 [ExtDN\Task\CheckMagentoRoot] [OK]
 [ExtDN\Task\CheckPermissions] Checking current user.
 [ExtDN\Task\CheckPermissions] [OK]
 [ExtDN\Task\CheckPermissions] Checking file ownership.
PHP Fatal error:  Uncaught Error: Call to undefined method ExtDN\Task\CheckPermissions::exitWithError() in phar:///data/clientname/magento2/extdn_installer.phar/src/Task/CheckPermissions.php:72
Stack trace:
#0 phar:///data/clientname/magento2/extdn_installer.phar/src/Task/CheckPermissions.php(17): ExtDN\Task\CheckPermissions->checkForSufficientPermissions()
#1 phar:///data/clientname/magento2/extdn_installer.phar/vendor/consolidation/robo/src/Collection/CollectionBuilder.php(590): ExtDN\Task\CheckPermissions->run()
#2 phar:///data/clientname/magento2/extdn_installer.phar/vendor/consolidation/robo/src/Collection/CollectionBuilder.php(574): Robo\Collection\CollectionBuilder->runTasks()
#3 phar:///data/clientname/magento2/extdn_installer.phar/src/Command/Installer.php(59): Robo\Collection\CollectionBuilder->run()
#4 [internal function]: ExtDN\Command\Installer->install('kiwicommerce/mo...', Array)
#5 phar:///data/clientname/magento2/extdn_installer.phar/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_us in phar:///data/clientname/magento2/extdn_installer.phar/src/Task/CheckPermissions.php on line 72

Fatal error: Uncaught Error: Call to undefined method ExtDN\Task\CheckPermissions::exitWithError() in phar:///data/clientname/magento2/extdn_installer.phar/src/Task/CheckPermissions.php on line 72

Error: Call to undefined method ExtDN\Task\CheckPermissions::exitWithError() in phar:///data/clientname/magento2/extdn_installer.phar/src/Task/CheckPermissions.php on line 72

Call Stack:
    0.0073     855808   1. {main}() /data/clientname/magento2/extdn_installer.phar:0
    0.0074     853528   2. require('phar:///data/clientname/magento2/extdn_installer.phar/bin/extdn_installer') /data/clientname/magento2/extdn_installer.phar:10
    0.0102    1254544   3. Robo\Runner->execute() phar:///data/clientname/magento2/extdn_installer.phar/bin/extdn_installer:32
    0.0153    2081576   4. Robo\Runner->run() phar:///data/clientname/magento2/extdn_installer.phar/vendor/consolidation/robo/src/Runner.php:155
    0.0345    4440856   5. Robo\Application->run() phar:///data/clientname/magento2/extdn_installer.phar/vendor/consolidation/robo/src/Runner.php:233

ERROR: Uncaught Error: Call to undefined method ExtDN\Task\CheckPermissions::exitWithError() in phar:///data/clientname/magento2/extdn_installer.phar/src/Task/CheckPermissions.php:72
Stack trace:
#0 phar:///data/clientname/magento2/extdn_installer.phar/src/Task/CheckPermissions.php(17): ExtDN\Task\CheckPermissions->checkForSufficientPermissions()
#1 phar:///data/clientname/magento2/extdn_installer.phar/vendor/consolidation/robo/src/Collection/CollectionBuilder.php(590): ExtDN\Task\CheckPermissions->run()
#2 phar:///data/clientname/magento2/extdn_installer.phar/vendor/consolidation/robo/src/Collection/CollectionBuilder.php(574): Robo\Collection\CollectionBuilder->runTasks()
#3 phar:///data/clientname/magento2/extdn_installer.phar/src/Command/Installer.php(59): Robo\Collection\CollectionBuilder->run()
#4 [internal function]: ExtDN\Command\Installer->install('kiwicommerce/mo...', Array)
#5 phar:///data/clientname/magento2/extdn_installer.phar/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_us 
in phar:///data/clientname/magento2/extdn_installer.phar/src/Task/CheckPermissions.php:72

@fooman
Copy link
Collaborator

fooman commented Jan 15, 2020

hey @peterjaap thanks for checking this out.

The latest commit fe6515e should take care of what I missed in a refactor.

If you could confirm that there is indeed a permission issue to start with that be great. We use find . ! -writable -not -path "*.git/objects/pack*" to find files not writable by the current user.

@fooman fooman closed this as completed Jan 15, 2020
@peterjaap
Copy link
Author

peterjaap commented Jan 16, 2020

That is indeed the case;

➜                                                                                                                                                                                                                                                                                           
 ______      _   _____  _   _   _____           _        _ _                                                                                                                                                                                                                                
|  ____|    | | |  __ \| \ | | |_   _|         | |      | | |                                                                                                                                                                                                                               
| |__  __  _| |_| |  | |  \| |   | |  _ __  ___| |_ __ _| | | ___ _ __                                                                                                                                                                                                                      
|  __| \ \/ / __| |  | | . ` |   | | | '_ \/ __| __/ _` | | |/ _ \ '__|                                                                                                                                                                                                                     
| |____ >  <| |_| |__| | |\  |  _| |_| | | \__ \ || (_| | | |  __/ |                                                                                                                                                                                                                        
|______/_/\_\__|_____/|_| \_| |_____|_| |_|___/\__\__,_|_|_|\___|_|                                                                                                                                                                                                                         
➜  Running ExtDN Installer                                                                                                                                                                                                                                                                  
 [ExtDN\Task\CheckMagentoRoot] Checking that we are running in the correct folder.                                                                                                                                                                                                          
 [ExtDN\Task\CheckMagentoRoot] [OK]                                                                                                                                                                                                                                                         
 [ExtDN\Task\CheckPermissions] Checking current user.                                                                                                                                                                                                                                       
 [ExtDN\Task\CheckPermissions] [OK]                                                                                                                                                                                                                                                         
 [ExtDN\Task\CheckPermissions] Checking file ownership.                                                                                                                                                                                                                                     
 [ExtDN\Task\CheckPermissions]  The following files are not writable for the current user                                                                                                                                                                                                   
./.git/objects/55/f966853b0a2d2d5d7eed19d29c0cfb76d6ff73                                                                                                                                                                                                                                    
./.git/objects/2e/8cdeca624d145925aa7c252033a247853ab0f5                                                                                                                                                                                                                                    
./.git/objects/6e/f1a687e1f46a73a80b4949b9aacdcaf55e267b                                                                                                                                                                                                                                    
./.git/objects/6e/22da6db28b33de1d3a44a939fc099b5789d340                                                                                                                                                                                                                                    
./.git/objects/cd/48ce00207933bf985c1cfa63bb85c95f4571be                                                                                                                                                                                                                                    
./.git/objects/e9/4ccb0fcc89a3e3ba047e88ecf94c71d886b6ca                                                                                                                                                                                                                                    
./.git/objects/e6/f7129f5f79380b75d99fca6f0a8714fa657340
etc

However, these are owned by the user I'm running the command with;

sh -ic "$(curl -sS https://raw.githubusercontent.com/extdn/installer-m2/v1.0.0-beta4/bin/oneliner.sh)" -- install kiwicommerce/module-admin-activity

We are using Docker as our development environment, so the command is run through PHP, which runs in a Docker container. I haven't really had any issues with that before, permissions-wise, so I'm not sure why that happens now?

@fooman
Copy link
Collaborator

fooman commented Jan 16, 2020

@peterjaap thanks for that. Do you mind running this command?
find . ! -writable -not -path "*.git/objects/pack*"
and this
find . ! -writable -not -path "*.git/objects/*"

I currently do not think this is a docker issue but git for some reason seems to produce files which are owned by the user but not writable. I so far had them excluded with the first query but it looks these type of files can be in different paths.

If the second query works (ie no files show up) - I will push out a new version with this amendment.

@fooman fooman reopened this Jan 16, 2020
@fooman fooman added the bug Something isn't working label Jan 16, 2020
@peterjaap
Copy link
Author

@fooman first command returns 63 items, second command zero.

@fooman
Copy link
Collaborator

fooman commented Jan 19, 2020

Thanks for confirming - changed in beta5

@fooman fooman closed this as completed Jan 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants