yannickglt / alfred-slack

The Slack workflow for Alfred app
GNU General Public License v2.0
330 stars 31 forks source link

Cannot add client #72

Open mtillman14 opened 2 years ago

mtillman14 commented 2 years ago

First, the workflow would crash when just typing "slack". I am running macOS Monterey which does not come with PHP installed, so I first installed PHP with homebrew. Then, when typing "slack --add-client" I get the below logs:

[17:29:45.717] Logging Started... [17:29:50.880] Slack[Script Filter] Queuing argument '-' [17:29:50.999] Slack[Script Filter] Queuing argument '--' [17:29:51.062] Slack[Script Filter] Script with argv '(null)' finished [17:29:51.065] ERROR: Slack[Script Filter] Code 255: PHP Deprecated: Return type of AlfredSlack\Libs\Route::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/tarantula/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C3A8C779-3402-4AC1-9604-88ECEEE590EC/scripts/libs/Route.php on line 29 Cache folder: /Users/tarantula/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.yannickglt.alfred2.slack Data folder: /Users/tarantula/Library/Application Support/Alfred/Workflow Data/com.yannickglt.alfred2.slack ACTION: AlfredSlack\Controllers\ConfigController::listConfigsAction() SIMULATE: php -r '$query="{\"controller\":\"config\",\"action\":\"listConfigs\",\"params\":{\"config\?\":\"\"}}";include "scripts/index.php";'; PHP Fatal error: Uncaught Error: Unknown named parameter $config\? in /Users/tarantula/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C3A8C779-3402-4AC1-9604-88ECEEE590EC/scripts/controllers/Controller.php:24 Stack trace:

0 /Users/tarantula/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C3A8C779-3402-4AC1-9604-88ECEEE590EC/scripts/controllers/Controller.php(24): call_user_func_array(Array, Array)

1 /Users/tarantula/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C3A8C779-3402-4AC1-9604-88ECEEE590EC/scripts/libs/Bootstrap.php(33): AlfredSlack\Controllers\Controller->dispatch('listConfigsActi...', Array)

2 /Users/tarantula/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C3A8C779-3402-4AC1-9604-88ECEEE590EC/scripts/libs/Bootstrap.php(15): AlfredSlack\Libs\Bootstrap->invoke(Object(AlfredSlack\Libs\Route))

3 /Users/tarantula/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C3A8C779-3402-4AC1-9604-88ECEEE590EC/scripts/index.php(13): AlfredSlack\Libs\Bootstrap->run(Object(AlfredSlack\Libs\Query))

4 Command line code(3): require_once('/Users/mitchell...')

5 {main}

thrown in /Users/tarantula/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C3A8C779-3402-4AC1-9604-88ECEEE590EC/scripts/controllers/Controller.php on line 24 [17:29:51.068] Slack[Script Filter] Deprecated: Return type of AlfredSlack\Libs\Route::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/tarantula/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C3A8C779-3402-4AC1-9604-88ECEEE590EC/scripts/libs/Route.php on line 29

Fatal error: Uncaught Error: Unknown named parameter $config\? in /Users/tarantula/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C3A8C779-3402-4AC1-9604-88ECEEE590EC/scripts/controllers/Controller.php:24 Stack trace:

0 /Users/tarantula/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C3A8C779-3402-4AC1-9604-88ECEEE590EC/scripts/controllers/Controller.php(24): call_user_func_array(Array, Array)

1 /Users/tarantula/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C3A8C779-3402-4AC1-9604-88ECEEE590EC/scripts/libs/Bootstrap.php(33): AlfredSlack\Controllers\Controller->dispatch('listConfigsActi...', Array)

2 /Users/tarantula/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C3A8C779-3402-4AC1-9604-88ECEEE590EC/scripts/libs/Bootstrap.php(15): AlfredSlack\Libs\Bootstrap->invoke(Object(AlfredSlack\Libs\Route))

3 /Users/tarantula/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C3A8C779-3402-4AC1-9604-88ECEEE590EC/scripts/index.php(13): AlfredSlack\Libs\Bootstrap->run(Object(AlfredSlack\Libs\Query))

4 Command line code(3): require_once('/Users/mitchell...')

5 {main}

thrown in /Users/tarantula/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C3A8C779-3402-4AC1-9604-88ECEEE590EC/scripts/controllers/Controller.php on line 24 [17:29:51.069] ERROR: Slack[Script Filter] JSON error: JSON text did not start with array or object and option to allow fragments not set. around line 1, column 0. in JSON: Deprecated: Return type of AlfredSlack\Libs\Route::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/tarantula/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C3A8C779-3402-4AC1-9604-88ECEEE590EC/scripts/libs/Route.php on line 29

Fatal error: Uncaught Error: Unknown named parameter $config\? in /Users/tarantula/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C3A8C779-3402-4AC1-9604-88ECEEE590EC/scripts/controllers/Controller.php:24 Stack trace:

0 /Users/tarantula/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C3A8C779-3402-4AC1-9604-88ECEEE590EC/scripts/controllers/Controller.php(24): call_user_func_array(Array, Array)

1 /Users/tarantula/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C3A8C779-3402-4AC1-9604-88ECEEE590EC/scripts/libs/Bootstrap.php(33): AlfredSlack\Controllers\Controller->dispatch('listConfigsActi...', Array)

2 /Users/tarantula/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C3A8C779-3402-4AC1-9604-88ECEEE590EC/scripts/libs/Bootstrap.php(15): AlfredSlack\Libs\Bootstrap->invoke(Object(AlfredSlack\Libs\Route))

3 /Users/tarantula/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C3A8C779-3402-4AC1-9604-88ECEEE590EC/scripts/index.php(13): AlfredSlack\Libs\Bootstrap->run(Object(AlfredSlack\Libs\Query))

4 Command line code(3): require_once('/Users/mitchell...')

5 {main}

thrown in /Users/tarantula/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C3A8C779-3402-4AC1-9604-88ECEEE590EC/scripts/controllers/Controller.php on line 24

sundarv85 commented 2 years ago

Im facing the same problem. Not able to add the client in new M1 Mac..

justin-m-schmidt commented 2 years ago

Same with me. Again on an M1

edygar commented 2 years ago

It's actually related to Monteray as far as I could see, I have it not throwing these exceptions in the version:

PHP 7.3.29-to-be-removed-in-future-macOS (cli) (built: Sep 6 2021 05:14:39) ( NTS )

My macOS version is 11.6.5

anders-christiansen commented 2 years ago

I have the same issue i cant add client. I'm on M1 with monterey

Blackvz commented 2 years ago

Same issue

Nicolas-nwb commented 2 years ago

+1 Same issue

fryjabe commented 2 years ago

+1

nkmrh commented 2 years ago

+1

gerardoezequiel commented 2 years ago

+1

jmsquare commented 2 years ago

+1 with M1 Mac

devinschumacher commented 2 years ago

+1

Fkaule commented 2 years ago

+1

stanhodges commented 1 year ago

+1

renatomoor commented 1 year ago

I've created my own workflow. Maybe it can help you: Slack Alfred workflow

AdeTheux commented 1 year ago

Thanks @renatomoor ! Installed with success but it looks like it's loading data from the wrong workspace (yours). I'll create an issue in your repo.