SiriProxy icon indicating copy to clipboard operation
SiriProxy copied to clipboard

CFPropertyList: Unknown class NilClass.

Open FineTralfazz opened this issue 14 years ago • 8 comments

I get this error after connecting my device:

Create server for iPhone connection
start conn #<SiriProxy::Connection::Iphone:0x9bf5654 @signature=3, @processed_headers=false, @output_buffer="", @input_buffer="", @unzipped_input="", @unzipped_output="", @unzip_stream=#<Zlib::Inflate:0x9bf558c>, @zip_stream=#<Zlib::Deflate:0x9bf5578>, @consumed_ace=false, @auth_data=nil, @faux=false, @name="iPhone", @ssled=false>
[Info - Plugin Manager] Plugins laoded: [#<SiriProxy::Plugin::Example:0x97e2a94 @manager=#<SiriProxy::PluginManager:0x9bf52bc @plugins=[...]>>]
{"speech_id"=>nil, "assistant_id"=>nil, "session_data"=>nil}
[Warning] Non-4S device connected.
{"speech_id"=>nil, "assistant_id"=>nil, "session_data"=>nil}
[Info - iPhone] Received Object: CreateSessionInfoRequest
[Info - Guzzoni] Received Object: CreateSessionInfoResponse
[Info] Found cached session data.
[Info] Found cached speech id.
[Info] Found cached assistant id.
[Info - iPhone] Received Object: LoadAssistant
/home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/CFPropertyList-2.0.17/lib/rbCFPropertyList.rb:151:in`guess': Unknown class NilClass. Try using :convert_unknown_to_string if you want to use unknown object types! (CFTypeError)
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/CFPropertyList-2.0.17/lib/rbCFPropertyList.rb:125:in `block in guess'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/CFPropertyList-2.0.17/lib/rbCFPropertyList.rb:123:in`each_pair'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/CFPropertyList-2.0.17/lib/rbCFPropertyList.rb:123:in `guess'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/CFPropertyList-2.0.17/lib/rbCFPropertyList.rb:125:in`block in guess'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/CFPropertyList-2.0.17/lib/rbCFPropertyList.rb:123:in `each_pair'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/CFPropertyList-2.0.17/lib/rbCFPropertyList.rb:123:in`guess'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/CFPropertyList-2.0.17/lib/rbCFPropertyList.rb:371:in `to_plist'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/siriproxy-0.3.0/lib/siriproxy/connection.rb:192:in`inject_object_to_output_stream'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/siriproxy-0.3.0/lib/siriproxy/connection.rb:134:in `process_compressed_data'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/siriproxy-0.3.0/lib/siriproxy/connection.rb:102:in`receive_binary_data'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/eventmachine-0.12.10/lib/em/protocols/linetext2.rb:94:in `receive_data'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in`run_machine'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/siriproxy-0.3.0/lib/siriproxy.rb:16:in`initialize'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/siriproxy-0.3.0/lib/siriproxy/command_line.rb:96:in `new'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/siriproxy-0.3.0/lib/siriproxy/command_line.rb:96:in`start_server'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/siriproxy-0.3.0/lib/siriproxy/command_line.rb:85:in `run_server'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/siriproxy-0.3.0/lib/siriproxy/command_line.rb:37:in`initialize'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/siriproxy-0.3.0/bin/siriproxy:6:in `new'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/siriproxy-0.3.0/bin/siriproxy:6:in`<top (required)>'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/bin/siriproxy:19:in `load'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/bin/siriproxy:19:in`<main>'
zlib(finalizer): the stream was freed prematurely.
zlib(finalizer): the stream was freed prematurely.

I've tried reinstalling the CFPropertyList gem as the wiki suggests, but that didn't change anything.

FineTralfazz avatar Jan 02 '12 00:01 FineTralfazz

CFPropertyList works perfectly. I believe the error is in this: {"speech_id"=>nil, "assistant_id"=>nil, "session_data"=>nil}

The three variables you see there can not be nil, but an empty string.

bowtakwah avatar Jan 02 '12 14:01 bowtakwah

Solution: touch ~/.siriproxy/session_data ~/.siriproxy/assistant_id ~/.siriproxy/session_data

bowtakwah avatar Jan 02 '12 15:01 bowtakwah

It gives me that same error even with the files created. I can only assume that it's not reading the files for some reason, though I don't know why that would be.

FineTralfazz avatar Jan 02 '12 20:01 FineTralfazz

Here's the output with log level 9:

Starting SiriProxy on port 443..
Create server for iPhone connection
start conn #<SiriProxy::Connection::Iphone:0x8be46e8 @signature=3, @processed_headers=false, @output_buffer="", @input_buffer="", @unzipped_input="", @unzipped_output="", @unzip_stream=#<Zlib::Inflate:0x8be4620>, @zip_stream=#<Zlib::Deflate:0x8be460c>, @consumed_ace=false, @auth_data=nil, @faux=false, @name="iPhone", @ssled=false>
[Info - Plugin Manager] Plugins laoded: [#<SiriProxy::Plugin::Example:0x87d1768 @manager=#<SiriProxy::PluginManager:0x8be438c @plugins=[...]>>]
{"speech_id"=>nil, "assistant_id"=>nil, "session_data"=>nil}
[Info - iPhone] SSL completed for iPhone
[Header - iPhone] ACE /ace HTTP/1.0
[Debug - iPhone] Buffering some data for later (19 bytes buffered)
[Header - iPhone] Host: guzzoni.apple.com
[Debug - iPhone] Buffering some data for later (44 bytes buffered)
[Header - iPhone] User-Agent: Assistant(iPod touch/iPod4,1; iPhone OS/5.0.1/9A405) Ace/1.0
[Warning] Non-4S device connected.
[Debug - iPhone] Buffering some data for later (118 bytes buffered)
[Header - iPhone] Content-Length: 2000000000
[Debug - iPhone] Buffering some data for later (146 bytes buffered)
[Header - iPhone] X-Ace-Host: 
[Debug - iPhone] Buffering some data for later (160 bytes buffered)
[Header - iPhone] 
[Debug - iPhone] Found end of headers
[Debug - iPhone] Buffering some data for later (162 bytes buffered)
========UNZIPPED DATA (from iPhone =========

==================================================
[Debug - iPhone] Buffering some data for later (166 bytes buffered)
========UNZIPPED DATA (from iPhone =========
{Lots of hex values]
==================================================
[Debug - iPhone] Buffering some data for later (166 bytes buffered)
{"speech_id"=>nil, "assistant_id"=>nil, "session_data"=>nil}
[Info - Guzzoni] SSL completed for Guzzoni
========UNZIPPED DATA (from iPhone =========
{Lots of hex codes}
==================================================
[Info] Found cached session data.
[Info] Found cached speech id.
[Info] Found cached assistant id.
[Info - iPhone] Received Object: LoadAssistant (group: com.apple.ace.system, ref_id: , ace_id: B55B064C-D60B-49B2-B580-4A7283CA6AB0)
{"class"=>"LoadAssistant",
 "aceId"=>"B55B064C-D60B-49B2-B580-4A7283CA6AB0",
 "group"=>"com.apple.ace.system",
 "properties"=>
  {"speechId"=>nil, "assistantId"=>nil, "sessionValidationData"=>""}}
[Info - Forwarding object to Guzzoni] LoadAssistant
/home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/CFPropertyList-2.0.17/lib/rbCFPropertyList.rb:151:in `guess': Unknown class NilClass. Try using :convert_unknown_to_string if you want to use unknown object types! (CFTypeError)
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/CFPropertyList-2.0.17/lib/rbCFPropertyList.rb:125:in `block in guess'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/CFPropertyList-2.0.17/lib/rbCFPropertyList.rb:123:in `each_pair'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/CFPropertyList-2.0.17/lib/rbCFPropertyList.rb:123:in `guess'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/CFPropertyList-2.0.17/lib/rbCFPropertyList.rb:125:in `block in guess'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/CFPropertyList-2.0.17/lib/rbCFPropertyList.rb:123:in `each_pair'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/CFPropertyList-2.0.17/lib/rbCFPropertyList.rb:123:in `guess'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/CFPropertyList-2.0.17/lib/rbCFPropertyList.rb:371:in `to_plist'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/siriproxy-0.3.0/lib/siriproxy/connection.rb:192:in `inject_object_to_output_stream'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/siriproxy-0.3.0/lib/siriproxy/connection.rb:134:in `process_compressed_data'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/siriproxy-0.3.0/lib/siriproxy/connection.rb:102:in `receive_binary_data'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/eventmachine-0.12.10/lib/em/protocols/linetext2.rb:94:in `receive_data'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/siriproxy-0.3.0/lib/siriproxy.rb:16:in `initialize'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/siriproxy-0.3.0/lib/siriproxy/command_line.rb:96:in `new'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/siriproxy-0.3.0/lib/siriproxy/command_line.rb:96:in `start_server'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/siriproxy-0.3.0/lib/siriproxy/command_line.rb:85:in `run_server'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/siriproxy-0.3.0/lib/siriproxy/command_line.rb:37:in `initialize'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/siriproxy-0.3.0/bin/siriproxy:6:in `new'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/siriproxy-0.3.0/bin/siriproxy:6:in `<top (required)>'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/bin/siriproxy:19:in `load'
    from /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/bin/siriproxy:19:in `<main>'

FineTralfazz avatar Jan 02 '12 20:01 FineTralfazz

Try using this: rvmsudo touch ~/.siriproxy/session_data ~/.siriproxy/assistant_id ~/.siriproxy/session_data

bowtakwah avatar Jan 02 '12 21:01 bowtakwah

Didn't change anything.

FineTralfazz avatar Jan 02 '12 22:01 FineTralfazz

Errm. If you want a quick fix, add this to /home/servs/.rvm/gems/ruby-1.9.3-p0@SiriProxy/gems/CFPropertyList-2.0.17/lib/rbCFPropertyList.rb

Line 128, below CFDictionary.new(hsh): when NilClass CFString.new("")

Remember to run rake install && siriproxy bundle

bowtakwah avatar Jan 03 '12 02:01 bowtakwah

THANK YOU. It's working perfectly now! Hopefully someone can get a real fix out eventually, but this is great for the time being.

FineTralfazz avatar Jan 03 '12 09:01 FineTralfazz