Open SternAndrew opened 8 years ago
I'm seeing a similar issue. Here's the stack trace:
NoMethodError: undefined method `each' for nil:NilClass
from /app/vendor/bundle/ruby/2.3.0/bundler/gems/Viewpoint-5475b290d558/lib/ews/soap/ews_response.rb:65:in `simplify!'
from /app/vendor/bundle/ruby/2.3.0/bundler/gems/Viewpoint-5475b290d558/lib/ews/soap/ews_response.rb:27:in `initialize'
from /app/vendor/bundle/ruby/2.3.0/bundler/gems/Viewpoint-5475b290d558/lib/ews/soap/parsers/ews_parser.rb:32:in `new'
from /app/vendor/bundle/ruby/2.3.0/bundler/gems/Viewpoint-5475b290d558/lib/ews/soap/parsers/ews_parser.rb:32:in `parse'
from /app/vendor/bundle/ruby/2.3.0/bundler/gems/Viewpoint-5475b290d558/lib/ews/soap/exchange_web_service.rb:221:in `parse_soap_response'
from /app/vendor/bundle/ruby/2.3.0/bundler/gems/Viewpoint-5475b290d558/lib/ews/connection.rb:78:in `dispatch'
from /app/vendor/bundle/ruby/2.3.0/bundler/gems/Viewpoint-5475b290d558/lib/ews/soap/exchange_web_service.rb:212:in `do_soap_request'
from /app/vendor/bundle/ruby/2.3.0/bundler/gems/Viewpoint-5475b290d558/lib/ews/soap/exchange_data_services.rb:52:in `find_item'
from /app/vendor/bundle/ruby/2.3.0/bundler/gems/Viewpoint-5475b290d558/lib/ews/types/generic_folder.rb:79:in `items'
from /app/vendor/bundle/ruby/2.3.0/bundler/gems/Viewpoint-5475b290d558/lib/ews/types/generic_folder.rb:107:in `items_between'
The server we're looking at is Exchange version 2010.
Here's the pretty-printed response from find_items
before the call to items_parser
(which is the line that crashes):
#<Viewpoint::EWS::SOAP::EwsResponse:0x007f94ece8da40
@resp=
{:envelope=>
{:elems=>
[{:header=>
{:elems=>
[{:server_version_info=>
{:attribs=>
{:major_version=>"14",
:minor_version=>"3",
:major_build_number=>"158",
:minor_build_number=>"11",
:version=>"Exchange2010_SP2"}}}]}},
{:body=>
{:elems=>
[{:find_item_response=>{:elems=>[{:response_messages=>{}}]}}]}}]}}>
+1 @jcarbo
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:
Here is the code path from the initialize. Its' clear that '@resp[:envelope][:elems]' is the [] on nil it is complaining about.