terminus-plugin-project / terminus-pancakes-plugin

Terminus Plugin to open Pantheon Site Databases in your Favorite SQL Client
MIT License
26 stars 20 forks source link

OSX - Plugin stopped working after updating to Terminus 1.7.0 #22

Open cleverington opened 6 years ago

cleverington commented 6 years ago

System:

screen shot 2018-01-30 at 2 54 52 pm

uberhacker commented 6 years ago

FWIW, I tested MySQL Workbench 6.3.6 to see if it is a general problem with the plugin or something else. The app launched fine but I did get a few php warnings. Could be just my version of php but it might be worth investigating. See below:

$ terminus pancakes basic-testing.dev
 [notice] Opening dev-basic-testing.pantheon.io database in MySQL Workbench.
PHP Warning:  file_get_contents(/home/ed/.mysql/workbench/connections.xml): failed to open stream: No such file or directory in /home/ed/.terminus/plugins/terminus-pancakes-plugin/src/Apps/MySQLWorkbenchApp.php on line 141
PHP Warning:  file(/home/ed/.mysql/workbench/connections.xml): failed to open stream: No such file or directory in /home/ed/.terminus/plugins/terminus-pancakes-plugin/src/Apps/MySQLWorkbenchApp.php on line 143
PHP Warning:  implode(): Invalid arguments passed in /home/ed/.terminus/plugins/terminus-pancakes-plugin/src/Apps/MySQLWorkbenchApp.php on line 154
PHP Warning:  fopen(/home/ed/.mysql/workbench/connections.xml): failed to open stream: No such file or directory in /home/ed/.terminus/plugins/terminus-pancakes-plugin/src/Apps/MySQLWorkbenchApp.php on line 155
PHP Warning:  fwrite() expects parameter 1 to be resource, boolean given in /home/ed/.terminus/plugins/terminus-pancakes-plugin/src/Apps/MySQLWorkbenchApp.php on line 156
PHP Warning:  fclose() expects parameter 1 to be resource, boolean given in /home/ed/.terminus/plugins/terminus-pancakes-plugin/src/Apps/MySQLWorkbenchApp.php on line 157
PHP Warning:  file_get_contents(/home/ed/.mysql/workbench/server_instances.xml): failed to open stream: No such file or directory in /home/ed/.terminus/plugins/terminus-pancakes-plugin/src/Apps/MySQLWorkbenchApp.php on line 141
PHP Warning:  file(/home/ed/.mysql/workbench/server_instances.xml): failed to open stream: No such file or directory in /home/ed/.terminus/plugins/terminus-pancakes-plugin/src/Apps/MySQLWorkbenchApp.php on line 143
PHP Warning:  implode(): Invalid arguments passed in /home/ed/.terminus/plugins/terminus-pancakes-plugin/src/Apps/MySQLWorkbenchApp.php on line 154
PHP Warning:  fopen(/home/ed/.mysql/workbench/server_instances.xml): failed to open stream: No such file or directory in /home/ed/.terminus/plugins/terminus-pancakes-plugin/src/Apps/MySQLWorkbenchApp.php on line 155
PHP Warning:  fwrite() expects parameter 1 to be resource, boolean given in /home/ed/.terminus/plugins/terminus-pancakes-plugin/src/Apps/MySQLWorkbenchApp.php on line 156
PHP Warning:  fclose() expects parameter 1 to be resource, boolean given in /home/ed/.terminus/plugins/terminus-pancakes-plugin/src/Apps/MySQLWorkbenchApp.php on line 157

System specs:

$ lsb_release -a
No LSB modules are available.
Distributor ID: LinuxMint
Description:    Linux Mint 18.2 Sonya
Release:    18.2
Codename:   sonya
$ uname -a
Linux Lenovo-Y70-70-Touch 4.13.0-32-generic #35~16.04.1-Ubuntu SMP Thu Jan 25 10:13:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/debian_version 
stretch/sid
$ terminus -V
Terminus 1.7.0
$ composer -V
Composer version 1.6.2 2018-01-05 15:28:41
$ php -v
PHP 7.0.22-0ubuntu0.16.04.1 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.22-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies
cleverington commented 6 years ago

Second Try: Still non-functional.

Same set of PHP Warnings.

Third set included --app:mysql flag to ensure connection was still possible, and loaded correctly into CLI mysql. Sequel Pro is definitely where the issue is rooted

→ terminus pancakes site-name.test --app=mysql
PHP Warning:  include(/Users/-----/.terminus/plugins/terminus-pancakes-plugin/src/Commands/../../vendor/autoload.php): failed to open stream: No such file or directory in /Users/-----/.terminus/plugins/terminus-pancakes-plugin/src/Commands/PancakesCommand.php on line 13

Warning: include(/Users/-----/.terminus/plugins/terminus-pancakes-plugin/src/Commands/../../vendor/autoload.php): failed to open stream: No such file or directory in /Users/-----/.terminus/plugins/terminus-pancakes-plugin/src/Commands/PancakesCommand.php on line 13
PHP Warning:  include(): Failed opening '/Users/-----/.terminus/plugins/terminus-pancakes-plugin/src/Commands/../../vendor/autoload.php' for inclusion (include_path='.:') in /Users/-----/.terminus/plugins/terminus-pancakes-plugin/src/Commands/PancakesCommand.php on line 13

Warning: include(): Failed opening '/Users/-----/.terminus/plugins/terminus-pancakes-plugin/src/Commands/../../vendor/autoload.php' for inclusion (include_path='.:') in /Users/-----/.terminus/plugins/terminus-pancakes-plugin/src/Commands/PancakesCommand.php on line 13
cleverington commented 6 years ago

Update

Looks like the contents of ~/.terminus/plugins/terminus-pancakes-plugin/ got 'weird' when upgrading to High Sierra.

Simply deleting the pancakes folder and running composer install fixed the issues.

README.md could probably use a note or two.

derimagia commented 6 years ago

Thanks for the report and the PR - When you say weird did you see what exactly was in the older? Would just running composer install fix it?

I'm not seeing the same issue and @uberhacker 's seems to be related to not having data specificallly for SQL Workbench I think

cleverington commented 6 years ago

Even though the vendor/ directory was present, it was throwing an error that vendor/autoload.php was missing. Deleting the directory and re-installing fixed it though.