← Back to team overview

tomdroid-dev team mailing list archive

Re: Web sync branch hurdles

 

Hi,

I've tried your latest code (as well as one of the posted apk's) but I
am running into "The connection to the server has failed..." when trying
to authenticate (server = htps://one.ubuntu.com). Probably this is
because I am not knowledgeable about Snowy or U1 and am using the wrong
parameters. Is there some kind of test server that needs to be running?
Do I eventually need to login as myself or is there some test account
that already has some notes?

Anyway, the background error is below:

11-16 19:29:35.286: WARN/InputManagerService(575): Window already
focused, ignoring focus gain of:
com.android.internal.view.IInputMethodClient$Stub$Proxy@43993800
11-16 19:29:39.916: DEBUG/dalvikvm(905): GC freed 3368 objects / 480992
bytes in 103ms
11-16 19:29:39.966: INFO/WebConnection(905): Response status : HTTP/1.1
404 Not Found
11-16 19:29:39.966: INFO/global(905): Default buffer size used in
BufferedReader constructor. It would be better to be explicit if an
8k-char buffer is required.
11-16 19:29:39.986: INFO/WebConnection(905): Received : <!DOCTYPE HTML>
11-16 19:29:39.986: INFO/WebConnection(905): <html lang="en"
id="ubuntuone">
11-16 19:29:39.986: INFO/WebConnection(905): <head>
11-16 19:29:39.986: INFO/WebConnection(905): <meta
http-equiv="Content-Type" content="text/html; charset=utf-8">
11-16 19:29:39.986: INFO/WebConnection(905): <meta name="viewport"
content="width=960, initial-scale=0.55, minimum-scale=0.65">
11-16 19:29:39.986: INFO/WebConnection(905): <title>Ubuntu One : Page
Not Found (404)</title>
11-16 19:29:39.986: INFO/WebConnection(905): <link rel="stylesheet"
href="https://media.one.ubuntu.com/media/2021/css/reset.css";
type="text/css" media="all">

... <cut a bit> ...

11-16 19:29:39.986: INFO/WebConnection(905):
pageTracker._trackPageview();
11-16 19:29:39.986: INFO/WebConnection(905): </script>
11-16 19:29:39.986: INFO/WebConnection(905): <script
type="text/javascript"
src="https://media.one.ubuntu.com/media/2021/js/base.js";></script>
11-16 19:29:39.986: INFO/WebConnection(905): </body>
11-16 19:29:39.986: INFO/WebConnection(905): </html>
11-16 19:29:39.996: WARN/System.err(905): org.json.JSONException: A
JSONObject text must begin with '{' at character 1 of <!DOCTYPE HTML>
11-16 19:29:39.996: WARN/System.err(905): <html lang="en"
id="ubuntuone">
11-16 19:29:39.996: WARN/System.err(905): <head>
11-16 19:29:39.996: WARN/System.err(905): <meta
http-equiv="Content-Type" content="text/html; charset=utf-8">
11-16 19:29:40.006: WARN/System.err(905): <meta name="viewport"
content="width=960, initial-scale=0.55, minimum-scale=0.65">
11-16 19:29:40.006: WARN/System.err(905): <title>Ubuntu One : Page Not
Found (404)</title>
11-16 19:29:40.006: WARN/System.err(905): <link rel="stylesheet"
href="https://media.one.ubuntu.com/media/2021/css/reset.css";
type="text/css" media="all">

... <cut a bit> ...

11-16 19:29:40.046: WARN/System.err(905): </script>
11-16 19:29:40.046: WARN/System.err(905): <script type="text/javascript"
src="https://media.one.ubuntu.com/media/2021/js/base.js";></script>
11-16 19:29:40.046: WARN/System.err(905): </body>
11-16 19:29:40.046: WARN/System.err(905): </html>
11-16 19:29:40.056: WARN/System.err(905):     at
org.json.JSONTokener.syntaxError(JSONTokener.java:448)
11-16 19:29:40.056: WARN/System.err(905):     at
org.json.JSONObject.<init>(JSONObject.java:178)
11-16 19:29:40.056: WARN/System.err(905):     at
org.json.JSONObject.<init>(JSONObject.java:246)
11-16 19:29:40.056: WARN/System.err(905):     at
org.tomdroid.sync.web.OAuthConnection.getAuthorizationUrl(OAuthConnection.java:107)
11-16 19:29:40.056: WARN/System.err(905):     at
org.tomdroid.sync.web.SnowySyncService.getAuthUri(SnowySyncService.java:53)
11-16 19:29:40.056: WARN/System.err(905):     at
org.tomdroid.ui.PreferencesActivity
$1.onPreferenceChange(PreferencesActivity.java:50)
11-16 19:29:40.056: WARN/System.err(905):     at
android.preference.Preference.callChangeListener(Preference.java:757)
11-16 19:29:40.056: WARN/System.err(905):     at
android.preference.EditTextPreference.onDialogClosed(EditTextPreference.java:142)
11-16 19:29:40.056: WARN/System.err(905):     at
android.preference.DialogPreference.onDismiss(DialogPreference.java:359)
11-16 19:29:40.056: WARN/System.err(905):     at android.app.Dialog
$ListenersHandler.handleMessage(Dialog.java:1007)
11-16 19:29:40.056: WARN/System.err(905):     at
android.os.Handler.dispatchMessage(Handler.java:99)
11-16 19:29:40.056: WARN/System.err(905):     at
android.os.Looper.loop(Looper.java:123)
11-16 19:29:40.056: WARN/System.err(905):     at
android.app.ActivityThread.main(ActivityThread.java:4203)
11-16 19:29:40.056: WARN/System.err(905):     at
java.lang.reflect.Method.invokeNative(Native Method)
11-16 19:29:40.056: WARN/System.err(905):     at
java.lang.reflect.Method.invoke(Method.java:521)
11-16 19:29:40.056: WARN/System.err(905):     at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:791)
11-16 19:29:40.056: WARN/System.err(905):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
11-16 19:29:40.056: WARN/System.err(905):     at
dalvik.system.NativeStart.main(Native Method)
11-16 19:29:40.226: WARN/IInputConnectionWrapper(905):
finishComposingText on inactive InputConnection



Op zondag 15-11-2009 om 15:19 uur [tijdzone +0100], schreef Benoit
Garret:
> Hey,
> 
> On Mon, Nov 9, 2009 at 11:01 PM, Sandy Armstrong
> <sanfordarmstrong@xxxxxxxxx> wrote:
> > On Mon, Nov 9, 2009 at 1:36 PM, Benoit Garret
> > <benoit.garret_launchpad@xxxxxxxx> wrote:
> >> I tested U1 with the patch you provided below (which should be the
> >> only changes required to support oauth 1.0a). You're absolutely
> >> correct in your assumption that Tomdroid is handling the tomdroid://
> >> url, that's why another instance seems to be started (we should only
> >> show the popup on the first run). I get the following exception when
> >> trying to do the last part of the auth process:
> >>
> >> OAuthExpectationFailedException: Request token or token secret not set
> >> in server reply. The service provider you use is probably buggy.
> >
> > That is the same exception I got, and tried ignoring, with
> > unsatisfactory results.  :-)  I'd really like to see the response sent
> > by U1 here...copying Signpost source directly in to Tomdroid bzr would
> > allow debugging deeper into Signpost, right?
> 
> I made a few commits today:
> * the expectation failed exception is a known problem in signpost:
> http://code.google.com/p/oauth-signpost/issues/detail?id=20#c8. I
> committed a hack which should fix the issue while we wait for a proper
> fix from upstream.
> * the notes api url was hardcoded, I'm now GETting the proper resource
> from the server.
> 
> Syncing with U1 now works (for me) but more feedback is welcome ;-) .
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~tomdroid-dev
> Post to     : tomdroid-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~tomdroid-dev
> More help   : https://help.launchpad.net/ListHelp
-- 
pjv




Follow ups

References