rdohms / meetup-api-client

Guzzle powered Meetup.com API Client
MIT License
76 stars 24 forks source link

"Unable to parse response body into JSON: 4" #48

Open interludic opened 7 years ago

interludic commented 7 years ago

I have in the past recieved this error randomly, however now it is happening everytime, what is going on here?

please help as the error message is a little unclear.


23. DMS\Service\Meetup\Command\MeetupResponseParser->parseResponseIntoArray() ==> Guzzle\Http\Message\Response->json(): {
      src: {
        /home/basketba/laravel/vendor/dms/meetup-api-client/src/DMS/Service/Meetup/Command/MeetupResponseParser.php:101: """
          \n
              return $response->json();\n
          }\n
          """
      }
      args: []
    }
    22. DMS\Service\Meetup\Command\MeetupResponseParser->parse() ==> DMS\Service\Meetup\Command\MeetupResponseParser->parseResponseIntoArray(): {
      src: {
        /home/basketba/laravel/vendor/dms/meetup-api-client/src/DMS/Service/Meetup/Command/MeetupResponseParser.php:43: """
          \n
          $responseArray = $this->parseResponseIntoArray($response);\n
          \n
          """
      }
      args: array:1 [
        0 => Guzzle\Http\Message\Response {#3585
          #body: Guzzle\Http\EntityBody {#3584
            #contentEncoding: false
            #rewindFunction: null
            #stream: stream resource {@428
              wrapper_type: "PHP"
              stream_type: "TEMP"
              mode: "w+b"
              unread_bytes: 0
              seekable: true
              uri: "php://temp"
              options: []
            }
            #size: null
            #cache: array:9 [
              "wrapper_type" => "PHP"
              "stream_type" => "TEMP"
              "mode" => "w+b"
              "unread_bytes" => 0
              "seekable" => true
              "uri" => "php://temp"
              "is_local" => true
              "is_readable" => true
              "is_writable" => true
            ]
            #customData: array:1 [
              "default" => true
            ]
          }
          #reasonPhrase: "OK"
          #statusCode: 200
          #info: array:26 [
            "url" => "http://api.meetup.com/2/events?event_id=**hidden**&key=**hidden**"
            "content_type" => "application/json;charset=utf-8"
            "http_code" => 200
            "header_size" => 609
            "request_size" => 205
            "filetime" => -1
            "ssl_verify_result" => 0
            "redirect_count" => 0
            "total_time" => 0.251761
            "namelookup_time" => 5.2E-5
            "connect_time" => 0.000986
            "pretransfer_time" => 0.001063
            "size_upload" => 0.0
            "size_download" => 0.0
            "speed_download" => 0.0
            "speed_upload" => 0.0
            "download_content_length" => 0.0
            "upload_content_length" => 0.0
            "starttransfer_time" => 0.251191
            "redirect_time" => 0.0
            "redirect_url" => ""
            "primary_ip" => "151.101.30.2"
            "certinfo" => []
            "primary_port" => 80
            "local_ip" => "**hidden**"
            "local_port" => **hidden**```
rdohms commented 6 years ago

Is this still happening? sorry for the ... very long... delay.

interludic commented 6 years ago

It's a problem when the connection to meetup drops out, when you retry it is generally ok. However the message could be caught imo

On Sat, 14 Oct. 2017, 21:12 Rafael Dohms, notifications@github.com wrote:

Is this still happening? sorry for the ... very long... delay.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rdohms/meetup-api-client/issues/48#issuecomment-336625262, or mute the thread https://github.com/notifications/unsubscribe-auth/AGCL3Q8FAmyYvw77RN7iyWIoTYFL4PFBks5ssIkdgaJpZM4N01Vi .

rdohms commented 6 years ago

@interludic humm interesting, let me see if i can take a look into it this weekend