Trouble with incremental initial sync with OAuth

33 views
Skip to first unread message

sziegler

unread,
Apr 14, 2013, 1:57:20 PM4/14/13
to spring...@googlegroups.com
Hi Springpad-Developers,

I'm currently switching my app OrganizeMe! from username/password authentication to OAuth and I encountered some issues during that modifications.

The first sync I do is with the following URL and this one is executed correctly:

http://springpad.com/api/users/me/blocks?&limit=25&format=sync&sd=true&createdAfter=0&oauth_timestamp=1365961130&oauth_nonce=STN03g&oauth_signature=wQcZXYiur2NW%2FGFIRJiniTlChqc%3D&oauth_consumer_key=08abfc557f854d60aecbb550b83a1ec6&oauth_token=ccec43b708a46bf20e2e01ed03ceb568&oauth_version=1.0&oauth_signature_method=HMAC-SHA1

Because my account has more than 25 blocks, I try to fetch the next page with the "X-Spring-Next-Page-Date" as timestamp for the "createdAfter" parameter:

http://springpad.com/api/users/me/blocks?&limit=25&format=sync&sd=true&createdAfter=1362153964430&oauth_timestamp=1365961132&oauth_nonce=yaLnRT&oauth_signature=P%2BvDSSCd3PEuchDvQ%2FaRLjhdbK8%3D&oauth_consumer_key=08abfc557f854d60aecbb550b83a1ec6&oauth_token=ccec43b708a46bf20e2e01ed03ceb568&oauth_version=1.0&oauth_signature_method=HMAC-SHA1

This whole process worked like a charme with the old authentication mechanism, but with OAuth I'm getting xhr error code 500 with this error meesage:

{
"status":"error",
"message":"java.lang.String cannot be cast to java.util.List"
}

I've got no clue what's going wrong here. I've just created a new XHR request, changed the createdAfter parameter and signed it with OAuth the same way as usual...

Any help would be greatly appreciated!

Best,
Sven

Chuck Garofalo

unread,
Apr 16, 2013, 8:41:15 AM4/16/13
to spring...@googlegroups.com
Hi Sven.  That looks like a bug on our side.  Can you tell me the username you used for this?

Thanks,
Chuck

Sven Ziegler

unread,
Apr 16, 2013, 9:29:45 AM4/16/13
to spring...@googlegroups.com
Sure: "svzi".

Best,
Sven
--
You received this message because you are subscribed to the Google Groups "Springpad Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to springpaddev...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

sziegler

unread,
Apr 17, 2013, 4:40:50 PM4/17/13
to spring...@googlegroups.com
Hi Chuck,

is there anything I can do? Did you find the cause for my user?

Best,
Sven

Chuck Garofalo

unread,
Apr 18, 2013, 8:09:49 AM4/18/13
to spring...@googlegroups.com
Hi Sven.  I'm sorry I didn't get back to you sooner.  I did find the root cause and I put in a fix but it hasn't been deployed yet.  We expect to do that today.  I will verify my fix and respond back later.

Regards,
Chuck

Sven Ziegler

unread,
Apr 18, 2013, 8:12:12 AM4/18/13
to spring...@googlegroups.com
Hi Chuck,

great news, I hope your fix will work. I really appreciate your support.

Best,
Sven
--

Chuck Garofalo

unread,
Apr 18, 2013, 5:15:04 PM4/18/13
to spring...@googlegroups.com
Hi Sven.  We just released the changes that I think should fix your problem here.  I checked the problematic block using the api and it no longer gives an error.  Please let me know if you still have trouble.

Regards,
Chuck
To unsubscribe from this group and stop receiving emails from it, send an email to springpaddev+unsubscribe@googlegroups.com.

Sven Ziegler

unread,
Apr 18, 2013, 5:26:47 PM4/18/13
to spring...@googlegroups.com
"status":"error",
"message":"java.lang.String cannot be cast to java.util.List"
}
Best,
Sven


2013/4/18 Chuck Garofalo <cgar...@springpartners.com>
To unsubscribe from this group and stop receiving emails from it, send an email to springpaddev...@googlegroups.com.

Chuck Garofalo

unread,
Apr 19, 2013, 9:10:20 AM4/19/13
to spring...@googlegroups.com
Hi Sven.  Yes, I'm sorry my fix didn't work for this issue.  I found another error and I'm pretty sure it is the root of your problem now.  I have a potential fix but it likely won't get out until next week.  If you are able to identify the offending block and can use the api to clear out the "contactInfo" property, that should also clear up the issue.

I'll follow up when my fix is out.

Regards,
Chuck

Sven Ziegler

unread,
Apr 19, 2013, 10:04:07 AM4/19/13
to spring...@googlegroups.com
Hi Chuck,

I don't think that clearing out the "contactInfo" property would be a good idea, because we would lose the testcase for the bugfix. How should we now if your next bugfix will correct the error or not? I'm thankful for this error. It's always better to find this with my own account, instead of when someone of my users does find this. :-)

Best,
Sven


2013/4/19 Chuck Garofalo <cgar...@springpartners.com>

sziegler

unread,
Apr 22, 2013, 1:54:58 PM4/22/13
to spring...@googlegroups.com
Hi Chuck,

do you have any timetable for when the fix will be released? I'm currently stuck in my efforts to switch the app to OAuth because I can't get enough test data... So it would be helpful to me if I could knew a possible date when this should be fixed.

Thanks again for your help and I don't want to hurry you.

Best,
Sven

Chuck Garofalo

unread,
Apr 23, 2013, 3:36:00 PM4/23/13
to spring...@googlegroups.com
Hi Sven.  Sorry it is taking so long.  We will be releasing later this week this and other fixes together.  It will be either Thursday afternoon or Friday morning.  

Regards,
Chuck

sziegler

unread,
Apr 23, 2013, 3:38:51 PM4/23/13
to spring...@googlegroups.com
Hi Chuck,

don't worry, but I'm a little bit confused. I tried to sync a few hours ago and the error is gone. So I thought you forget to notice me and you already submitted the fix. Strange, but good. Maybe you want to have a look at the logs again, something should have fixed my issue?!

Best,
Sven

sziegler

unread,
Apr 26, 2013, 10:28:28 AM4/26/13
to spring...@googlegroups.com
Hi,

I sadly discovered another issue, which is, in my opinion, not depended to OAuth. It's still an issue with the incremental initial sync.

When I sync my account with createdAfter parameter and limit = 25, then I sometimes got responses with less then 25 elements, but the sync is not finished. When I sync again it will fetch more objects. I don't know why this happens, but it's not related to my account, because one of my beta testers did discover the issue by himself, too.

For me it looks like it would be more secure to sync until the response is empty and not until the response got less then [limit] elements. Could you confirm that as a good approach?

Best,
Sven

Chuck Garofalo

unread,
Apr 26, 2013, 4:06:31 PM4/26/13
to spring...@googlegroups.com
Hi Sven.  Can you try again now?  We released my fix this afternoon.

sziegler

unread,
Apr 26, 2013, 5:26:20 PM4/26/13
to spring...@googlegroups.com
Hi Chuck,

please have a look at my post from 04/23/2013. I do not have the issue
since that date, as described in that posting, but I got a new issue. Have
a look at my post from today in this thread please. :-)

Best,
Sven

Chuck Garofalo

unread,
Apr 27, 2013, 7:30:48 AM4/27/13
to spring...@googlegroups.com
Hi Sven.  Sorry I missed that one.  It should continue to give you all of your items in at least (but potentially more) groups of 25 and if you get fewer that should be your stopping condition.  I'll take a look as soon as I can this week.  

Regards,
Chuck

sziegler

unread,
Apr 27, 2013, 9:17:03 AM4/27/13
to spring...@googlegroups.com
Hi Chuck,

don't worry. I knew that this had worked before, but as I stated before I sometimes got less then 25 and sync is not finished. And this did not only happen with my account... Would be great if you could have a look in the next time.

Best,
Sven
Reply all
Reply to author
Forward
0 new messages