BaijnathG / mytracks

Automatically exported from code.google.com/p/mytracks
0 stars 0 forks source link

force close always send to google fusion table #312

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Send to...
2.Google Fusion Tables selected (google docs selection doesn't matter)
3.Send now
this has been happening the several times over the past several days, every 
time i've tried since i upgraded.

What is the expected output? What do you see instead?
- i see "Creating new fusion table" and the progress bar at 5%, then a "Sorry!" 
force close dialog.
this happens every time.
in case it might help, i eventually created a "My Tracks" fusion table, 
importing the google spreadsheet i've used for a few years now for my tracks 
records.  this didn't help at all - sending to fusion table still tries to 
create a new one, and still fails in the same way.

What version of MyTracks are you using? On what version of Android? On what
phone?
- MyTracks: 1.1.0
- Android: CyanogenMod 6.1.0 Vision, android 2.2.1
- Phone: HTC Vision / T-Mobile G2

If possible please provide a log.  Either upload here or send to mytracks-
support@google.com.
Detailed instructions can be found here:
http://code.google.com/p/mytracks/wiki/HowToReportErrors
- will send to mytracks-support along with issue id

Please provide any additional information here:

Original issue reported on code.google.com by ken.manh...@gmail.com on 10 Feb 2011 at 6:09

GoogleCodeExporter commented 9 years ago

Original comment by sandordo...@google.com on 10 Feb 2011 at 7:00

GoogleCodeExporter commented 9 years ago
I don't think this is a dup of 303, since 303 was fixed before the 1.1.0 
release.  I think it's more likely that it's a dup of 286.  The logs will tell.

Original comment by simmonmt@google.com on 10 Feb 2011 at 7:08

GoogleCodeExporter commented 9 years ago
re duplicate of 303: i noticed that issue, but their description of the 
progress-bar behavior didn't fit what i saw, and my version is the full 1.1 
(market) release, not an RC.  specifically, i don't see an initial jump to 
100%, and then a quick flash of a new bar.  instead, i see a fairly quick 
single progression to 5%, a pause for a moment, and then a force close.

re duplicate of 286: my my tracks installation will sync to google docs 
successfully.  it only fails when trying to sync to google fusion tables.

Original comment by ken.manh...@gmail.com on 10 Feb 2011 at 7:28

GoogleCodeExporter commented 9 years ago
Then we'll need the logs.  Please attach them to the bug report.

Original comment by simmonmt@google.com on 10 Feb 2011 at 7:40

GoogleCodeExporter commented 9 years ago
Relevant bits:
V/locapi_rpc_glue( 1520): Callback received: 1 (cb_id=0x5F00000 handle=1)
V/lib_locapi( 1520): process_deferred_action: pthread_cond_wait returned
D/lib_locapi( 1520): loc_eng_report_position: valid mask = 0x6069, sess status 
= 1
V/lib_locapi( 1520): loc_eng_report_position: ignore position report when 
session status = 1
E/MyTracks( 2642): HttpException
E/MyTracks( 2642): 
com.google.android.apps.mytracks.io.gdata.GDataWrapper$HttpException
E/MyTracks( 2642):  at 
com.google.android.apps.mytracks.io.SendToFusionTables$2.query(SendToFusionTable
s.java:673)
E/MyTracks( 2642):  at 
com.google.android.apps.mytracks.io.SendToFusionTables$2.query(SendToFusionTable
s.java:1)
E/MyTracks( 2642):  at 
com.google.android.apps.mytracks.io.gdata.GDataWrapper.runOne(GDataWrapper.java:
198)
E/MyTracks( 2642):  at 
com.google.android.apps.mytracks.io.gdata.GDataWrapper.runCommon(GDataWrapper.ja
va:171)
E/MyTracks( 2642):  at 
com.google.android.apps.mytracks.io.gdata.GDataWrapper.runQuery(GDataWrapper.jav
a:162)
E/MyTracks( 2642):  at 
com.google.android.apps.mytracks.io.SendToFusionTables.runUpdate(SendToFusionTab
les.java:654)
E/MyTracks( 2642):  at 
com.google.android.apps.mytracks.io.SendToFusionTables.createNewTable(SendToFusi
onTables.java:228)
E/MyTracks( 2642):  at 
com.google.android.apps.mytracks.io.SendToFusionTables.doUpload(SendToFusionTabl
es.java:181)
E/MyTracks( 2642):  at 
com.google.android.apps.mytracks.io.SendToFusionTables.run(SendToFusionTables.ja
va:154)
E/MyTracks( 2642):  at android.os.Handler.handleCallback(Handler.java:587)
E/MyTracks( 2642):  at android.os.Handler.dispatchMessage(Handler.java:92)
E/MyTracks( 2642):  at android.os.Looper.loop(Looper.java:123)
E/MyTracks( 2642):  at android.os.HandlerThread.run(HandlerThread.java:60)
W/dalvikvm( 2642): threadid=14: thread exiting with uncaught exception 
(group=0x4001d7e8)
I/MyTracks( 2642): Build query: SELECT * FROM tracks WHERE (_id=2) ORDER BY _id
D/MyTracksLib( 2642): MyTracksProviderUtilsImpl.updateTrack
E/AndroidRuntime( 2642): FATAL EXCEPTION: SendToFusionTables
E/AndroidRuntime( 2642): java.lang.NullPointerException
E/AndroidRuntime( 2642):    at 
com.google.android.apps.mytracks.io.gdata.GDataWrapper.runOne(GDataWrapper.java:
215)
E/AndroidRuntime( 2642):    at 
com.google.android.apps.mytracks.io.gdata.GDataWrapper.runCommon(GDataWrapper.ja
va:171)
E/AndroidRuntime( 2642):    at 
com.google.android.apps.mytracks.io.gdata.GDataWrapper.runQuery(GDataWrapper.jav
a:162)
E/AndroidRuntime( 2642):    at 
com.google.android.apps.mytracks.io.SendToFusionTables.runUpdate(SendToFusionTab
les.java:654)
E/AndroidRuntime( 2642):    at 
com.google.android.apps.mytracks.io.SendToFusionTables.createNewTable(SendToFusi
onTables.java:228)
E/AndroidRuntime( 2642):    at 
com.google.android.apps.mytracks.io.SendToFusionTables.doUpload(SendToFusionTabl
es.java:181)
E/AndroidRuntime( 2642):    at 
com.google.android.apps.mytracks.io.SendToFusionTables.run(SendToFusionTables.ja
va:154)
E/AndroidRuntime( 2642):    at android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime( 2642):    at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 2642):    at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 2642):    at android.os.HandlerThread.run(HandlerThread.java:60)
W/ActivityManager( 1520):   Force finishing activity 
com.google.android.maps.mytracks/com.google.android.apps.mytracks.MyTracks
I/MyTracks( 2642): Creating a new authentication for service: writely
I/MyTracks( 2642): Creating modern auth manager: writely
D/MyTracks( 2642): Logging in to writely...
D/MyTracks( 2642): MyTracks.onPause

Original comment by sandordo...@google.com on 10 Feb 2011 at 7:46

GoogleCodeExporter commented 9 years ago
Sorry, by 286 I actually meant issue 307.  So many bug numbers, so little time.

If you're feeling adventurous, and are comfortable with loading APKs yourself, 
you can try the one I attached to issue 307.

Original comment by simmonmt@google.com on 10 Feb 2011 at 9:26

GoogleCodeExporter commented 9 years ago
tried the apk at the end of 307, and the process gets further but the fusion 
tables part still doesn't work.  there is no force close, but the 
send-to-google process concludes claiming that there was an error sending to 
fusion tables, and no in fact no table is created.

i tried it a few times with the table that i created by importing my old my 
tracks spreadsheet, and then again a few times with the table deleted, just in 
case the table i created was getting in the way.  the fusion tables failure 
happens either way.

Original comment by ken.manh...@gmail.com on 10 Feb 2011 at 9:41

GoogleCodeExporter commented 9 years ago
i sent another logcat via email.  (maybe i should have added it as an 
attachment - i don't know whether or not logcats are supposed to be free of 
security-sensitive info...

Original comment by ken.manh...@gmail.com on 10 Feb 2011 at 9:49

GoogleCodeExporter commented 9 years ago
Ideally they should be but apps are free to log what they want and some do 
leak.  If possible please extract the mytracks crash and append that.  Not 
everyone has access to the mytracks-support alias.

Original comment by sandordo...@google.com on 10 Feb 2011 at 9:52

GoogleCodeExporter commented 9 years ago
here's my best guess - by doing an ongoing logcat and taking the section 
produced during the time i'm doing the send.  i'm using adb logcat, and haven't 
tried reading an android system log before, so i may be completely off base.

Original comment by ken.manh...@gmail.com on 10 Feb 2011 at 10:13

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I think this was fixed in 1.1.1

Original comment by sandordo...@google.com on 21 Feb 2011 at 4:24

GoogleCodeExporter commented 9 years ago
Still same error on my system.

Original comment by larrywil...@gmail.com on 22 Feb 2011 at 3:51

Attachments:

GoogleCodeExporter commented 9 years ago
i'm still completely unable to upload to fusion tables from mytracks 1.1.1, 
though i no longer get a force close.

mytracks also is often failing to actually record a track now a days.  very 
frustrating.  sometimes forcing a close (from the application manager) gets it 
going, but not often.  i've tried uninstalling and reinstalling several times, 
and clearing the data.  i think that helps - but it's not much use when i'm out 
on a run and the track is not recording.

i don't have time at the moment to get a log excerpt.  plus, i'm not sure it 
still fits this issue, since i no longer get the force-close dialog when the 
fusion tables upload fails.  suggestions about how to best approach this are 
welcome.

Original comment by ken.manh...@gmail.com on 22 Feb 2011 at 4:07

GoogleCodeExporter commented 9 years ago
OK...I have a similar problem with users of my Android app.  I've been watching 
this thread hoping to find some diagnostic that will help me.

Symptoms from my users are that it works OK for a few days with Fusion Tables, 
then stops completely.

From my own investigations I am having the following suspicions:
- From a number of reports I believe that the problem most often occurs with 
users who have Rooted phones or Custom ROMs.  This may help to explain why you 
cannot duplicate the issue 

- I Have only experienced the issue once personally on my Rooted Nook 
Color....exactly the same logcat as comment 5 above.  Re-rooting the Nook cured 
the problem - permanently (so far)

- I suspect the problem somehow to be with OAuth...in my case I when I stepped 
through my app under debug I ran thru Authorization completely fine, had a good 
token, but when I built the token into the http request and fired it off to 
Fusion Tables I got the Nullpointerexception response as above.  Unfortunately 
I didn't capture the token when I had the issue and after I re-rooted and it 
worked again fine.  Sorry

I have this issue starred, so please comment back if you need more info.

FOR PEOPLE EXPERIENCING THIS PROBLEM...
With my users the following workarounds seem to fix the issue:

1. Create a new Google Account and use that instead of the Primary on your 
phone to load/save to Fusion Tables.  This seems to work for all users of my 
app.

2. Re-Root or re-install your device ROM.  This worked for me with my Nook and 
one user with his phone. 

If anyone who is experiencing this problem tries one of the workarounds above, 
could you please comment back with Success or Failure reports?  Thanks!!!!

Original comment by cumis...@gmail.com on 22 Feb 2011 at 4:27

GoogleCodeExporter commented 9 years ago
well.  I've finally managed to duplicate the problem - at least on my own app.  
I've now captured the auth token as well.

Not a rooted phone - and not the primary account either.

I'm doing the auth in a similar way to MyTracks and building an 
HttpURLConnection using the URL 
"https://www.google.com/fusiontables/api/query?sql=SHOW%20TABLES" to get an 
initial list of the tables for the account.

java.lang.NullPointerException exception is generated when I call: 
con.getResponseCode();

02-24 11:44:13.734: WARN/System.err(7003): java.lang.NullPointerException
02-24 11:44:13.734: WARN/System.err(7003):     at 
java.io.Reader.<init>(Reader.java:65)
02-24 11:44:13.734: WARN/System.err(7003):     at 
java.io.InputStreamReader.<init>(InputStreamReader.java:65)
02-24 11:44:13.734: WARN/System.err(7003):     at 
com.spiralsoftware.fusiontables.HttpConHandler.doConnect(HttpConHandler.java:160
)
02-24 11:44:13.734: WARN/System.err(7003):     at 
com.spiralsoftware.fusiontables.FusionTableFactory.getFusionTableList(FusionTabl
eFactory.java:235)
02-24 11:44:13.734: WARN/System.err(7003):     at 
com.spiralsoftware.fusiontables.FusionTableFactory.getAllFusionTables(FusionTabl
eFactory.java:159)

I'm guessing that the error is somewhere in the Fusion Tables API, I would at 
least expect a response code and message from the API rather than throwing an 
exception.

My GoogleLogin auth token starts: DQAAAKwAAABcMIE....  anyone interested in the 
rest?

Nick

Original comment by cumis...@gmail.com on 24 Feb 2011 at 5:07

GoogleCodeExporter commented 9 years ago
yet another update.

deleting the account from the phone and then adding it back in forced the auth 
token to regenerate and all is well with FT in my app.

Original comment by cumis...@gmail.com on 24 Feb 2011 at 6:04

GoogleCodeExporter commented 9 years ago
Upgrade from android 1.6 to 2.2.1 problem fixed now

Original comment by larrywil...@gmail.com on 24 Feb 2011 at 8:02

GoogleCodeExporter commented 9 years ago
1.1.2 seems to have solved my problem: my phone is now able to upload tracks to 
fusion tables, google docs, and google maps.  yay!

(i worked around the problem i mentioned with tracks not being recorded by 
deactivating and reactivating GPS.  i'm hoping that something was just wedged, 
it won't happen frequently, and be as easy to resolve when it does...)

Original comment by ken.manh...@gmail.com on 25 Feb 2011 at 11:30

GoogleCodeExporter commented 9 years ago
ok...I think I'm getting closer to the reason for my app failing Fusion Tables.

I believe there is a bug in the FT API where sometimes the API will return a 
Response Code of Null rather than 200, 400 etc.  

I suspect your Oauth code is similar to mine in that you use AccountManager to 
persist tokens for phone accounts and services which are built into the https 
calls.  When a Google API returns a 401 or 403 for an Account/Service then the 
app normally goes and gets a fresh token and all is well.  Because FT under 
specific situations returns a null my app (and I guess yours) never realizes 
that it needs to refresh the token and the FT calls then fail.

I have a suspicion that AccountManager may use some part of the Phone ROM to 
encrypt the tokens that it keeps in its cache.  When a user with a rooted phone 
does a specific action then the token is altered the next time it is pulled out 
of cache and presented to the service.  Rather than returning an 'Invalid 
Token' response which would normally cause the app to generate a new one, as FT 
returns a null everything falls over.

Experience with my users convinces me that the problem happens far more often 
with users who root their phones rather than 'stock' users.  This could also 
help explain why you guys cannot duplicate the issue.

Clearly the long term answer is to get the FT team to fix their bug.  In the 
meantime I'm going to try to implement some sort of workaround in my app to see 
if I can stop the constant stream of complaints I get about Fusion Tables not 
working.

Hope this info is helpful to you.

Nick

Original comment by cumis...@gmail.com on 26 Feb 2011 at 3:25

GoogleCodeExporter commented 9 years ago
Issue raised for Fusion Tables: 
http://code.google.com/p/fusion-tables/issues/detail?id=333

I believe this will continue to be a problem for MyTracks until FT resolve the 
problem at their end or you move off Fusion Tables.

Original comment by cumis...@gmail.com on 26 Feb 2011 at 3:51

GoogleCodeExporter commented 9 years ago
Issue 370 has been merged into this issue.

Original comment by rdama...@google.com on 1 Mar 2011 at 2:26

GoogleCodeExporter commented 9 years ago
I cant upload my activity to google maps(including docs,and table).
Everytime,"my tracks"promts me to allow or deny the agreedment using my already 
signed in email,then force stop...
What is the problem?

Original comment by weiky77...@gmail.com on 15 Apr 2011 at 11:05

GoogleCodeExporter commented 9 years ago
I've never been able to export to Fusion Table even with the latest 1.1.4 
release. I'm using an HTC Tattoo. I always get the message "force close". I'm 
then uploading to maps and documents which is really fine for me anyway.

Original comment by tg7...@gmail.com on 29 Apr 2011 at 3:56

GoogleCodeExporter commented 9 years ago
I believe Rodrigo has a fix for this issue.

Original comment by sandordo...@google.com on 10 Jun 2011 at 3:40

GoogleCodeExporter commented 9 years ago
I don't think I do - the errors I see here are different from the one I fixed.

Original comment by rdama...@google.com on 10 Jun 2011 at 10:23

GoogleCodeExporter commented 9 years ago
well...if it helps, further to my comment 22 I can tell you that I implemented 
a workaround that basically refreshes the token every time a user attempts to 
save or load to fusion tables.

Since implementing this workaround, complaints about loading and saving from/to 
fusion tables have gone from 5-10 per week to 0.

As I said before, I believe the problem is on the FT side where some API calls 
cause a Null Pointer Exception rather than failing with with a 400+ error codes.

Either they need to fix their API or you need to implement a similar workaround 
to fix this issue is my guess.

Original comment by cumis...@gmail.com on 11 Jun 2011 at 1:25

GoogleCodeExporter commented 9 years ago
Do you still see this with the latest version?

Original comment by rdama...@google.com on 20 Nov 2011 at 6:57

GoogleCodeExporter commented 9 years ago
@rdama...@google.com

Not sure if your comment was targeted at me...but as it happens I am currently 
working on v2 of my Android App.  I'm still going to use the Android 
AccountManager authorization approach for Fusion Tables 
(http://code.google.com/p/google-api-java-client/wiki/AndroidAccountManager) 
which is the same as used by MyTracks.

As I am going to be rewriting this part of my code, I'll be taking out the 
aggressive approach I currently use of requesting a new token by default with 
every API interaction (the only workaround I found to the intermittent null 
response from FT bug).

I'll let you know if I still see the error.

Original comment by cumis...@gmail.com on 20 Nov 2011 at 7:13

GoogleCodeExporter commented 9 years ago
(I'm not seeing the problem, as I mentioned in comment 21 -  
http://code.google.com/p/mytracks/issues/detail?id=312#c21 .  You probably 
weren't addressing your question to me, but since your question was kind of 
ambiguous, I figure it doesn't hurt to say.)

Original comment by ken.manh...@gmail.com on 21 Nov 2011 at 2:09

GoogleCodeExporter commented 9 years ago
I haven't been able to reproduce this, but Jimmy saw it recently, so I'm 
assigning to him.

Original comment by rdama...@google.com on 2 Jan 2012 at 7:25

GoogleCodeExporter commented 9 years ago
Issue 646 has been merged into this issue.

Original comment by rdama...@google.com on 2 Jan 2012 at 7:28

GoogleCodeExporter commented 9 years ago

Original comment by jshih@google.com on 31 Jan 2012 at 5:52