alfred-slack icon indicating copy to clipboard operation
alfred-slack copied to clipboard

Cannot add client

Open mtillman14 opened this issue 2 years ago • 15 comments

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

mtillman14 avatar Feb 23 '22 22:02 mtillman14

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

sundarv85 avatar Mar 04 '22 22:03 sundarv85

Same with me. Again on an M1

justin-m-schmidt avatar Mar 31 '22 09:03 justin-m-schmidt

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

edygar avatar Apr 08 '22 11:04 edygar

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

anders-christiansen avatar May 06 '22 21:05 anders-christiansen

Same issue

Blackvz avatar Jul 01 '22 09:07 Blackvz

+1 Same issue

Nicolas-nwb avatar Jul 08 '22 17:07 Nicolas-nwb

+1

fryjabe avatar Aug 12 '22 12:08 fryjabe

+1

nkmrh avatar Aug 18 '22 20:08 nkmrh

+1

gerardoezequiel avatar Sep 18 '22 19:09 gerardoezequiel

+1 with M1 Mac

jmsquare avatar Sep 29 '22 20:09 jmsquare

+1

devinschumacher avatar Oct 23 '22 11:10 devinschumacher

+1

Fkaule avatar Nov 23 '22 05:11 Fkaule

+1

stanhodges avatar Jan 22 '23 18:01 stanhodges

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

renatomoor avatar Mar 27 '23 18:03 renatomoor

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.

AdeTheux avatar Mar 28 '23 14:03 AdeTheux