GithubHelp home page GithubHelp logo

Comments (11)

mwhdc avatar mwhdc commented on August 27, 2024 1

I don't understand why CURL is failing on your machine.

Very strange, I see what you mean. I'm running Little Snitch but all connections are allowed for /usr/bin/curl. The stock curl 8.4 is first in my path so the Homebrew curl 8.5 which seems to be a dependency for PHP 8.3.2 isn't being invoked.

Anyway, this must be a problem with my environment vs anything related to the workflow so we should probably close the issue. Thanks for checking it out.

from alfred-github-workflow.

philbirnie avatar philbirnie commented on August 27, 2024

Hey @mwhdc - #82 (comment) -- I had the same problem, and this resolved it. Not sure it will work for you, but worth a shot!

from alfred-github-workflow.

mwhdc avatar mwhdc commented on August 27, 2024

Hey @mwhdc - #82 (comment) -- I had the same problem, and this resolved it. Not sure it will work for you, but worth a shot!

Thanks, I think I saw your comment when I was initially troubleshooting and tried it, but just went through the steps again and the same errors were thrown in debug. This is in Alfred 5.0.6 [2110].

from alfred-github-workflow.

mochouaaaaa avatar mochouaaaaa commented on August 27, 2024

May I ask if your problem has been resolved? I also encountered it in 5.1.2, and I speculate it may be related to PHP, but I have not been exposed to PHP, I tried #82 but it didn't work

from alfred-github-workflow.

mwhdc avatar mwhdc commented on August 27, 2024

May I ask if your problem has been resolved? I also encountered it in 5.1.2, and I speculate it may be related to PHP, but I have not been exposed to PHP, I tried #82 but it didn't work

Yes, still getting the same error with MacOS 14.0, PHP 8.2.10, Alfred 5.1.3.

from alfred-github-workflow.

mwhdc avatar mwhdc commented on August 27, 2024

Apologies, user error, didn't mean to close.

from alfred-github-workflow.

gharlan avatar gharlan commented on August 27, 2024

@mwhdc Sorry for the late response. The workflow is working for me on PHP 8.2 and 8.3. Unfortunately I'm not sure why it is failing on your side.
Do you still get the error with newer php versions?

from alfred-github-workflow.

mwhdc avatar mwhdc commented on August 27, 2024

@mwhdc Sorry for the late response. The workflow is working for me on PHP 8.2 and 8.3. Unfortunately I'm not sure why it is failing on your side. Do you still get the error with newer php versions?

Just checked and unfortunately I do still get the error. I have PHP 8.3.2 linked to /opt/homebrew/bin/php which is selected in Alfred. As soon as I enter the workflow's keyword and hit the spacebar, debug blows up.

[17:40:17.964] Logging Started...
[17:40:20.433] GitHub[Script Filter] Queuing argument ''
[17:40:20.557] GitHub[Script Filter] Script with argv '' finished
[17:40:20.563] GitHub[Script Filter] <?xml version="1.0"?>
<items><item uid="19b19ffc30caef1c9376cd2982992a59" autocomplete=" " valid="no"><icon>icon.png</icon><title>gh&#x2026;</title><subtitle>Search or type a command</subtitle></item></items>
[17:40:25.343] GitHub[Script Filter] Queuing argument ' '
[17:40:25.419] GitHub[Script Filter] Script with argv ' ' finished
[17:40:25.426] ERROR: GitHub[Script Filter] Code 255: loading content for https://api.github.com/repos/gharlan/alfred-github-workflow/releases/latestPHP Warning:  Undefined array key "request_header" in /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/curl.php on line 43
PHP Deprecated:  preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/curl.php on line 117
PHP Warning:  Undefined array key "" in /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/curl.php on line 44
PHP Warning:  Undefined array key 1 in /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/curl.php on line 49
PHP Warning:  Attempt to read property "callback" on null in /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/curl.php on line 65
PHP Fatal error:  Uncaught Error: Value of type null is not callable in /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/curl.php:66
Stack trace:
#0 /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/workflow.php(293): Curl->execute()
#1 /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/workflow.php(356): Workflow::requestCache('https://api.git...', Object(Curl), Object(Closure), true, 1440)
#2 /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/search.php(33): Workflow::checkUpdate()
#3 /Users/mwh/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/0E9D09A3-E504-48E4-B77F-4825049B72D7(5): Search::run('github', '', '0')
#4 {main}
  thrown in /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/curl.php on line 66
[17:40:25.428] GitHub[Script Filter] Warning: Undefined array key "request_header" in /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/curl.php on line 43

Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/curl.php on line 117

Warning: Undefined array key "" in /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/curl.php on line 44

Warning: Undefined array key 1 in /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/curl.php on line 49

Warning: Attempt to read property "callback" on null in /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/curl.php on line 65

Fatal error: Uncaught Error: Value of type null is not callable in /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/curl.php:66
Stack trace:
#0 /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/workflow.php(293): Curl->execute()
#1 /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/workflow.php(356): Workflow::requestCache('https://api.git...', Object(Curl), Object(Closure), true, 1440)
#2 /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/search.php(33): Workflow::checkUpdate()
#3 /Users/mwh/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/0E9D09A3-E504-48E4-B77F-4825049B72D7(5): Search::run('github', '', '0')
#4 {main}
  thrown in /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/curl.php on line 66
[17:40:25.430] ERROR: GitHub[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:
Warning: Undefined array key "request_header" in /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/curl.php on line 43

Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/curl.php on line 117

Warning: Undefined array key "" in /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/curl.php on line 44

Warning: Undefined array key 1 in /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/curl.php on line 49

Warning: Attempt to read property "callback" on null in /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/curl.php on line 65

Fatal error: Uncaught Error: Value of type null is not callable in /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/curl.php:66
Stack trace:
#0 /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/workflow.php(293): Curl->execute()
#1 /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/workflow.php(356): Workflow::requestCache('https://api.git...', Object(Curl), Object(Closure), true, 1440)
#2 /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/search.php(33): Workflow::checkUpdate()
#3 /Users/mwh/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/0E9D09A3-E504-48E4-B77F-4825049B72D7(5): Search::run('github', '', '0')
#4 {main}
  thrown in /Users/mwh/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8C0FEF48-6551-4547-A28E-886CA68ABAAA/curl.php on line 66

from alfred-github-workflow.

gharlan avatar gharlan commented on August 27, 2024

I have PHP 8.3.2 linked to /opt/homebrew/bin/php which is selected in Alfred.

Same here. But I don't get these errors.

Maybe we can try to debug the issue:

https://github.com/gharlan/alfred-github-workflow/blob/main/curl.php#L42

Can you add print_r($info); exit; after this line and post the new output?

from alfred-github-workflow.

mwhdc avatar mwhdc commented on August 27, 2024

Sure! Here's the output.

[17:59:10.774] GitHub[Script Filter] Queuing argument ''
[17:59:10.889] GitHub[Script Filter] Script with argv '' finished
[17:59:10.894] GitHub[Script Filter] <?xml version="1.0"?>
<items><item uid="19b19ffc30caef1c9376cd2982992a59" autocomplete=" " valid="no"><icon>icon.png</icon><title>gh&#x2026;</title><subtitle>Search or type a command</subtitle></item></items>
[17:59:11.043] GitHub[Script Filter] Queuing argument ' '
[17:59:11.162] GitHub[Script Filter] Script with argv ' ' finished
[17:59:11.169] STDERR: GitHub[Script Filter] loading content for https://api.github.com/repos/gharlan/alfred-github-workflow/releases/latest
[17:59:11.171] GitHub[Script Filter] Array
(
    [url] => https://api.github.com/repos/gharlan/alfred-github-workflow/releases/latest
    [content_type] => 
    [http_code] => 0
    [header_size] => 0
    [request_size] => 0
    [filetime] => -1
    [ssl_verify_result] => 0
    [redirect_count] => 0
    [total_time] => 0.004512
    [namelookup_time] => 0.002766
    [connect_time] => 0
    [pretransfer_time] => 0
    [size_upload] => 0
    [size_download] => 0
    [speed_download] => 0
    [speed_upload] => 0
    [download_content_length] => -1
    [upload_content_length] => -1
    [starttransfer_time] => 0
    [redirect_time] => 0
    [redirect_url] => 
    [primary_ip] => 
    [certinfo] => Array
        (
        )

    [primary_port] => 0
    [local_ip] => 
    [local_port] => 0
    [http_version] => 0
    [protocol] => 0
    [ssl_verifyresult] => 0
    [scheme] => 
    [appconnect_time_us] => 0
    [connect_time_us] => 0
    [namelookup_time_us] => 2766
    [pretransfer_time_us] => 0
    [redirect_time_us] => 0
    [starttransfer_time_us] => 0
    [total_time_us] => 4512
    [effective_method] => GET
    [capath] => 
    [cainfo] => 
)
[17:59:11.173] ERROR: GitHub[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:
Array
(
    [url] => https://api.github.com/repos/gharlan/alfred-github-workflow/releases/latest
    [content_type] => 
    [http_code] => 0
    [header_size] => 0
    [request_size] => 0
    [filetime] => -1
    [ssl_verify_result] => 0
    [redirect_count] => 0
    [total_time] => 0.004512
    [namelookup_time] => 0.002766
    [connect_time] => 0
    [pretransfer_time] => 0
    [size_upload] => 0
    [size_download] => 0
    [speed_download] => 0
    [speed_upload] => 0
    [download_content_length] => -1
    [upload_content_length] => -1
    [starttransfer_time] => 0
    [redirect_time] => 0
    [redirect_url] => 
    [primary_ip] => 
    [certinfo] => Array
        (
        )

    [primary_port] => 0
    [local_ip] => 
    [local_port] => 0
    [http_version] => 0
    [protocol] => 0
    [ssl_verifyresult] => 0
    [scheme] => 
    [appconnect_time_us] => 0
    [connect_time_us] => 0
    [namelookup_time_us] => 2766
    [pretransfer_time_us] => 0
    [redirect_time_us] => 0
    [starttransfer_time_us] => 0
    [total_time_us] => 4512
    [effective_method] => GET
    [capath] => 
    [cainfo] => 
)

from alfred-github-workflow.

gharlan avatar gharlan commented on August 27, 2024

Hmm, it should look like this:

[23:52:11.510] STDERR: GitHub[Script Filter] loading content for https://api.github.com/repos/gharlan/alfred-github-workflow/releases/latest
[23:52:11.511] GitHub[Script Filter] Array
(
    [url] => https://api.github.com/repos/gharlan/alfred-github-workflow/releases/latest
    [content_type] => application/json; charset=utf-8
    [http_code] => 200
    [header_size] => 1409
    [request_size] => 328
    [filetime] => -1
    [ssl_verify_result] => 0
    [redirect_count] => 0
    [total_time] => 0.22168
    [namelookup_time] => 0.011888
    [connect_time] => 0.021318
    [pretransfer_time] => 0.03328
    [size_upload] => 0
    [size_download] => 779
    [speed_download] => 3514
    [speed_upload] => 0
    [download_content_length] => -1
    [upload_content_length] => 0
    [starttransfer_time] => 0.221519
    [redirect_time] => 0
    [redirect_url] => 
    [primary_ip] => 140.82.121.6
    [certinfo] => Array
        (
        )

    [primary_port] => 443
    [local_ip] => 10.0.0.14
    [local_port] => 57414
    [http_version] => 3
    [protocol] => 2
    [ssl_verifyresult] => 0
    [scheme] => HTTPS
    [appconnect_time_us] => 33176
    [connect_time_us] => 21318
    [namelookup_time_us] => 11888
    [pretransfer_time_us] => 33280
    [redirect_time_us] => 0
    [starttransfer_time_us] => 221519
    [total_time_us] => 221680
    [request_header] => GET /repos/gharlan/alfred-github-workflow/releases/latest HTTP/2
Host: api.github.com
User-Agent: alfred-github-workflow
Accept: */*
Accept-Encoding: deflate, gzip, br, zstd
X-Url: https://api.github.com/repos/gharlan/alfred-github-workflow/releases/latest
Authorization: token <token>


    [effective_method] => GET
    [capath] => 
    [cainfo] => 
)

I don't understand why CURL is failing on your machine.

from alfred-github-workflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.