jimmykane / The-Three-Little-Pigs-Siri-Proxy

A intelligent Siri Proxy with multiple key storage and key throttling.
137 stars 49 forks source link

Assistants not being created on Private server even with Client name in DB! #219

Closed SemoTech closed 11 years ago

SemoTech commented 12 years ago

=== Solved! You need to delete your plist file every 14 days to get a new Assistant from the server ====

All has worked fine for quite some time on my private server until today.

I used to have an assistant entry in the DB for my iPhone 4 and iPad, but Assistants expire every 14 days (almost like keys), and even though I have my name/nickname in the DB, I get this when connecting with the same iPhone 4 that always worked:

[Authentication - SiriProxy] Assistant [a90ab7a9-c035-21a0-a757-11c3dc7588a2] is not registered. Banning Connection [Info - SiriProxy] no validationData available :(

There is a fresh key, so if I set the server to Private ="OFF" in config.yml it works fine, but this is a private server so I do not want to do that so i put it back to "ON"

I also deleted the plist and did a re-spring, yet I am still blocked.

How can I get the server to create a NEW Assistant for my Client (already in DB) and approve my iphone 4 while keeping the server private???

jimmykane commented 12 years ago

This assistant is not registered in the db. Tell the client to delete the plist

13 2012 12:00 .., SemoTech < reply@reply.github.com

:

All has worked fine for quite some time on my private server until today.

I used to have an assistant entry in the DB for my iPhone 4 and iPad, but I guess they expire like keys at some point and even though I have my name/nickname in the DB, I get this when connecting with the same iPhone 4 that always worked:

[Authentication - SiriProxy] Assistant [a90ab7a9-c035-21a0-a757-11c3dc7588a2] is not registered. Banning Connection [Info - SiriProxy] no validationData available :(

There is a fresh key, so if I set the server to Private ="OFF" in config.yml it works fine, but this is a private server so I do not want to do that so i put it back to "ON"

I also deleted the plist and did a re-spring, yet I am still blocked.

How can I get the server to create the assistant and approve my iphone 4 while keeping the server private???


Reply to this email directly or view it on GitHub: https://github.com/jimmykane/The-Three-Little-Pigs-Siri-Proxy/issues/219

jimmykane commented 12 years ago

wait not read right the post .... ill be back

SemoTech commented 12 years ago

GOT IT TO WORK!

When it did not work last time it's because I deleted the plist but before that I set the server to PUBLIC, so the new plist was the one from the PUBLIC server, and not clean!

I re-set the server to PRIVATE, deleted the plist again, connected, and a new Assistant was created!!! YEY!

OK, so it seems that every 14 days after the old Assistants expires we all have to delete our iPhone 4 plist files so new Assistants get created??? Jimmy, is that right?

If so, maybe someone can write a cydia app or sbsettings plugin - that when launched deletes the plist and re-springs... would make this much easier...

SemoTech commented 12 years ago

Closed case 2 soon...

Waiting on Jimmy to confirm or comment on having to delete the plist every 14 days from our iPhone 4 to get a new assistant...

jimmykane commented 12 years ago

Usually you shouldnt have. Steps. New device connects - > Gets creates assistant After 7 days device creates new - > server cleans them up after 14 days (double that)

But now that i think, there might be a bug on this system. I will push an update soon disabling the deletion of those assistants. But this will mean that the database will keep a big record of them

jimmykane commented 12 years ago

And there is a cydia tweak for that!

Ask @freemanrepo at twitter

jimmykane commented 12 years ago

Look at latest commit

SemoTech commented 12 years ago

Thanks a lot Jimmy, I will tweet for the cydia tweak, and I see the latest code change you made here: https://github.com/jimmykane/The-Three-Little-Pigs-Siri-Proxy/commit/5d6e3b6e174730916c0c8f4c3b836f0c3f55c9e3 However it looks the same as the existing code to me... maybe I am blind :-)

I think the remaining main issue is that if the plist already has an "old" assistant in it on the iPhone 4, a new one is NOT being assigned and replaced in the plist automatically, unless you delete the file completely so it is re-created as new and clean...

I will continue to test and see what happens after 7-14 days....

hackersbox commented 12 years ago

@SemoTech Jim removed the Expirer by commenting out the expirer code.

SemoTech commented 12 years ago

LOL, thanks, I can see it now, missed all those nice "#" in front of the lines :-) LOL

I think the remaining main issue is that if the plist already has an "old" assistant in it on the iPhone 4, a new one is NOT being assigned and replaced in the plist automatically, unless you delete the file completely so it is re-created as new and clean...

SemoTech commented 12 years ago

I can CONFIRM that once the "old" assistants are deleted from the DB a device (my iPad) no longer gets a new assistant created while using an "old" plist file with the old assistant in it!!!

I just tried with with my iPad and had the same issue I had with the iPhone 4. Once the plist was deleted and re-created it worked as the iPad client name was already in the DB of my private server.

This is proof that right now you MUST delete your local plist file to get a new assistant. I am hoping there is a fix soon...

jimmykane commented 12 years ago

So.

I disabled the deletion of the assistants. That way the device with an old assistant can make all requests to apple. But the device doesn't send the destroy assistant or apple ignores that? The proxy server does not interfere with commands etc. if a device has an expired assistant, it is the devices part to send a destroy assistant.

But I will try to implement that on code for assistants that are old. But the only collision I see is that we cannot specify fr sure is the assistant is expired.

On 13 Μαρ 2012, at 23:52, SemoTechreply@reply.github.com wrote:

I can CONFIRM that once the "old" assistants are deleted from the DB a device (my iPad) no longer gets a new assistant created while using an "old" plist file with the old assistant in it!!!

I just tried with with my iPad and had the same issue I had with the iPhone 4. Once the plist was deleted and re-created it worked as the iPad client name was already in the DB of my private server.

This is proof that right now you MUST delete your local plist file to get a new assistant. I am hoping there is a fix soon...


Reply to this email directly or view it on GitHub: https://github.com/jimmykane/The-Three-Little-Pigs-Siri-Proxy/issues/219#issuecomment-4487216

SemoTech commented 12 years ago

Yes, you commented out the 14 day assistant deletion code. Great!

Now what we must do is see how long we can use a particular assistant for...

Ideally if the "old" assistant is in the DB, and Apple wants to generate a new one, they should inform the iPhone and update the plist file automatically.

Once and IF that happens a new assistant should be created for that device and added to the DB. You can then implement a background check to delete all "old"/"unused" assistants but not touch the "active" ones...

jimmykane commented 12 years ago

I must explain more about the protocol here. To work this out I'll bees your help.

On 14 Μαρ 2012, at 0:46, SemoTechreply@reply.github.com wrote:

Yes, you commented out the 14 day assistant deletion code. Great!

Now what we must do is see how long we can use a particular assistant for...

Ideally if the "old" assistant is in the DB, and Apple wants to generate a new one, they should inform the iPhone and update the plist file automatically.

Once and IF that happens a new assistant will be created for that device and added to the DB. You can implement a background check to delete all "old"/"unused" assistants but not touch the "active" ones...


Reply to this email directly or view it on GitHub: https://github.com/jimmykane/The-Three-Little-Pigs-Siri-Proxy/issues/219#issuecomment-4488184

SemoTech commented 12 years ago

I am more than happy to help... Just let me know what you need....

hackersbox commented 12 years ago

@jimmykane now i just had the same issue. it seems there is really a bug on the expirer. It is not actually deleting the expired record even before you pushed the update.

The server is not assigning new Assistant on old clients. What i did is to empty the Assistant table and everything worked.

Users were able to get new assistant IDs.

We should look into it. The assistant table must be cleaned every 7 days.

jimmykane commented 12 years ago

Let me investigate.

On 14 Μαρ 2012, at 16:09, hackersboxreply@reply.github.com wrote:

@jimmykane now i just had the same issue. it seems their is really a bug on the expirer. It is not actually deleting the expired record even before you push the update.

The server is not assigning new Assistant on old clients. What i did is to empty the Assistant table and everything work.

Users were able to get new assistant IDs.

We should look into it. The assistant table must be cleaned every 7 days.


Reply to this email directly or view it on GitHub: https://github.com/jimmykane/The-Three-Little-Pigs-Siri-Proxy/issues/219#issuecomment-4498724

SemoTech commented 12 years ago

Any updates?