{"action":"created","issue":{"url":"https://api.github.com/repos/WinRb/Viewpoint/issues/242","repository_url":"https://api.github.com/repos/WinRb/Viewpoint","labels_url":"https://api.github.com/repos/WinRb/Viewpoint/issues/242/labels{/name}","comments_url":"https://api.github.com/repos/WinRb/Viewpoint/issues/242/comments","events_url":"https://api.github.com/repos/WinRb/Viewpoint/issues/242/events","html_url":"https://github.com/WinRb/Viewpoint/issues/242","id":165545484,"number":242,"title":"Exception in code","user":{"login":"SternAndrew","id":865052,"avatar_url":"https://avatars.githubusercontent.com/u/865052?v=3","gravatar_id":"","url":"https://api.github.com/users/SternAndrew","html_url":"https://github.com/SternAndrew","followers_url":"https://api.github.com/users/SternAndrew/followers","following_url":"https://api.github.com/users/SternAndrew/following{/other_user}","gists_url":"https://api.github.com/users/SternAndrew/gists{/gist_id}","starred_url":"https://api.github.com/users/SternAndrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SternAndrew/subscriptions","organizations_url":"https://api.github.com/users/SternAndrew/orgs","repos_url":"https://api.github.com/users/SternAndrew/repos","events_url":"https://api.github.com/users/SternAndrew/events{/privacy}","received_events_url":"https://api.github.com/users/SternAndrew/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-14T12:02:22Z","updated_at":"2016-08-02T14:16:43Z","closed_at":null,"body":"I would fix this but not yet sure where the check should be to prevent this issue.  Here is the stack trace of the exception:\r\n\r\n```\r\n\r\n/home/astern/.gem/ruby/gems/viewpoint-1.0.0/lib/ews/soap/ews_response.rb:31:in `envelope': undefined method `[]' for nil:NilClass (NoMethodError)\r\n        from /home/astern/.gem/ruby/gems/viewpoint-1.0.0/lib/ews/soap/ews_response.rb:39:in `body'\r\n        from /home/astern/.gem/ruby/gems/viewpoint-1.0.0/lib/ews/soap/ews_response.rb:43:in `response'\r\n        from /home/astern/.gem/ruby/gems/viewpoint-1.0.0/lib/ews/soap/ews_response.rb:64:in `simplify!'\r\n        from /home/astern/.gem/ruby/gems/viewpoint-1.0.0/lib/ews/soap/ews_response.rb:27:in `initialize'\r\n        from /home/astern/.gem/ruby/gems/viewpoint-1.0.0/lib/ews/soap/parsers/ews_parser.rb:32:in `new'\r\n        from /home/astern/.gem/ruby/gems/viewpoint-1.0.0/lib/ews/soap/parsers/ews_parser.rb:32:in `parse'\r\n        from /home/astern/.gem/ruby/gems/viewpoint-1.0.0/lib/ews/soap/exchange_web_service.rb:221:in `parse_soap_response'\r\n        from /home/astern/.gem/ruby/gems/viewpoint-1.0.0/lib/ews/connection.rb:74:in `dispatch'\r\n        from /home/astern/.gem/ruby/gems/viewpoint-1.0.0/lib/ews/soap/exchange_web_service.rb:212:in `do_soap_request'\r\n        from /home/astern/.gem/ruby/gems/viewpoint-1.0.0/lib/ews/soap/exchange_data_services.rb:87:in `get_item'\r\n        from /home/astern/.gem/ruby/gems/viewpoint-1.0.0/lib/ews/item_accessors.rb:33:in `get_item'\r\n        from /cygdrive/c/Users/astern/Desktop/outlook.rb:60:in `block in <main>'\r\n        from /cygdrive/c/Users/astern/Desktop/outlook.rb:59:in `each'\r\n        from /cygdrive/c/Users/astern/Desktop/outlook.rb:59:in `<main>'\r\n\r\n```\r\n\r\nHere is the code path from the initialize.  Its' clear that '@resp[:envelope][:elems]' is the [] on nil it is complaining about. \r\n\r\n```\r\n    def initialize(sax_hash)\r\n      @resp = sax_hash\r\n>>      simplify!\r\n    end\r\n\r\n    def simplify!\r\n>>      response_type = response.keys.first\r\n      response[response_type][:elems][0][:response_messages][:elems].each do |rm|\r\n        key = rm.keys.first\r\n        rm[key][:elems] = rm[key][:elems].inject(&:merge)\r\n      end\r\n    end\r\n\r\n    def response\r\n>>      body[0]\r\n    end\r\n\r\n    def body\r\n>>      envelope[1][:body][:elems]\r\n    end\r\n\r\n    def envelope\r\n>>      @resp[:envelope][:elems]\r\n    end\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/WinRb/Viewpoint/issues/comments/236918011","html_url":"https://github.com/WinRb/Viewpoint/issues/242#issuecomment-236918011","issue_url":"https://api.github.com/repos/WinRb/Viewpoint/issues/242","id":236918011,"user":{"login":"jcarbo","id":847027,"avatar_url":"https://avatars.githubusercontent.com/u/847027?v=3","gravatar_id":"","url":"https://api.github.com/users/jcarbo","html_url":"https://github.com/jcarbo","followers_url":"https://api.github.com/users/jcarbo/followers","following_url":"https://api.github.com/users/jcarbo/following{/other_user}","gists_url":"https://api.github.com/users/jcarbo/gists{/gist_id}","starred_url":"https://api.github.com/users/jcarbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcarbo/subscriptions","organizations_url":"https://api.github.com/users/jcarbo/orgs","repos_url":"https://api.github.com/users/jcarbo/repos","events_url":"https://api.github.com/users/jcarbo/events{/privacy}","received_events_url":"https://api.github.com/users/jcarbo/received_events","type":"User","site_admin":false},"created_at":"2016-08-02T14:16:43Z","updated_at":"2016-08-02T14:16:43Z","body":"I'm seeing a similar issue. Here's the stack trace:\r\n\r\n```\r\nNoMethodError: undefined method `each' for nil:NilClass\r\n\tfrom /app/vendor/bundle/ruby/2.3.0/bundler/gems/Viewpoint-5475b290d558/lib/ews/soap/ews_response.rb:65:in `simplify!'\r\n\tfrom /app/vendor/bundle/ruby/2.3.0/bundler/gems/Viewpoint-5475b290d558/lib/ews/soap/ews_response.rb:27:in `initialize'\r\n\tfrom /app/vendor/bundle/ruby/2.3.0/bundler/gems/Viewpoint-5475b290d558/lib/ews/soap/parsers/ews_parser.rb:32:in `new'\r\n\tfrom /app/vendor/bundle/ruby/2.3.0/bundler/gems/Viewpoint-5475b290d558/lib/ews/soap/parsers/ews_parser.rb:32:in `parse'\r\n\tfrom /app/vendor/bundle/ruby/2.3.0/bundler/gems/Viewpoint-5475b290d558/lib/ews/soap/exchange_web_service.rb:221:in `parse_soap_response'\r\n\tfrom /app/vendor/bundle/ruby/2.3.0/bundler/gems/Viewpoint-5475b290d558/lib/ews/connection.rb:78:in `dispatch'\r\n\tfrom /app/vendor/bundle/ruby/2.3.0/bundler/gems/Viewpoint-5475b290d558/lib/ews/soap/exchange_web_service.rb:212:in `do_soap_request'\r\n\tfrom /app/vendor/bundle/ruby/2.3.0/bundler/gems/Viewpoint-5475b290d558/lib/ews/soap/exchange_data_services.rb:52:in `find_item'\r\n\tfrom /app/vendor/bundle/ruby/2.3.0/bundler/gems/Viewpoint-5475b290d558/lib/ews/types/generic_folder.rb:79:in `items'\r\n\tfrom /app/vendor/bundle/ruby/2.3.0/bundler/gems/Viewpoint-5475b290d558/lib/ews/types/generic_folder.rb:107:in `items_between'\r\n```\r\n\r\nThe server we're looking at is Exchange version 2010."}}
{"actor":{"display_login":"jcarbo"}}