bommubharathkumar / mytracks

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

Force close when sending track to Google Docs #286

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. With track open, select "Send to Google..." 
2. Check Google Docs
3. Click "Send now"

What is the expected output? What do you see instead?

Expected output is success message or friendly error.

I see "Sorry! The application My Tracks ... has stopped unexpectedly. Please 
try again."

What version of MyTracks are you using? On what version of Android? On what
phone?

Version of My Tracks: 1.1.0 RC1
Version of Android: 2.3.2
Phone: Nexus S

I think this is the relevant exception and stacktrace from adb logcat. I'll 
attach with more surrounding lines. 

W/ResourceType( 1675): Failure getting entry for 0x7f06016e (t=5 e=366) in 
package 0 (error -75)
W/dalvikvm( 1675): threadid=12: thread exiting with uncaught exception 
(group=0x40015560)
E/AndroidRuntime( 1675): FATAL EXCEPTION: SendToGoogleDocs
E/AndroidRuntime( 1675): android.content.res.Resources$NotFoundException: 
String resource ID #0x7f06016e
E/AndroidRuntime( 1675):        at 
android.content.res.Resources.getText(Resources.java:208)
E/AndroidRuntime( 1675):        at 
android.content.res.Resources.getString(Resources.java:261)
E/AndroidRuntime( 1675):        at 
android.content.Context.getString(Context.java:183)
E/AndroidRuntime( 1675):        at 
com.google.android.apps.mytracks.io.SendToDocs.doUpload(SendToDocs.java:102)
E/AndroidRuntime( 1675):        at 
com.google.android.apps.mytracks.io.SendToDocs.access$0(SendToDocs.java:101)
E/AndroidRuntime( 1675):        at 
com.google.android.apps.mytracks.io.SendToDocs$1.run(SendToDocs.java:96)
E/AndroidRuntime( 1675):        at 
android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime( 1675):        at 
android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 1675):        at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 1675):        at 
android.os.HandlerThread.run(HandlerThread.java:60)
W/ActivityManager(  167):   Force finishing activity 
com.google.android.maps.mytracks/com.google.android.apps.mytracks.MyTrack

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

Please provide any additional information here:

Original issue reported on code.google.com by ehers...@gmail.com on 30 Jan 2011 at 9:28

Attachments:

GoogleCodeExporter commented 9 years ago
Also commented in issue 303 on the same behavior: 

Okay, with RC5, I can upload to fusion tables now but google docs fails, with 
or without checking the fusion tables box. This might be a different issue. I 
also saw this in rc2 and rc4. 

D/MyTracks( 2008): MyTracksMap: Using location provider gps
D/MyTracks( 2008): MyTracksMap: Now registering sensor listeners.
I/MyTracks( 2008): Build query: SELECT _id FROM tracks WHERE (_id=31) ORDER BY 
_id
I/MapActivity( 2008): Handling network change notification:CONNECTED
E/MapActivity( 2008): Couldn't get connection factory client
I/GPS     (  175): gps_engine_status_update: called acquire_wakelock_cb
D/MyTracks( 2008): MyTracksMap: Network location update received.
D/dalvikvm( 1775): GC_CONCURRENT freed 414K, 48% free 3558K/6791K, external 
0K/0K, paused 6ms+2ms
W/InputManagerService(  175): Window already focused, ignoring focus gain of: 
com.android.internal.view.IInputMethodClient$Stub$Proxy@40808090
D/MyTracks( 2008): MyTracksMap: Network location update received.
D/MyTracks( 2008): MyTracksMap.onSharedPreferenceChanged: sendToDocs
D/MyTracks( 2008): MyTracksMap.onSharedPreferenceChanged: sendToMyMaps
I/MyTracks( 2008): Creating a new authentication for service: writely
I/MyTracks( 2008): Creating modern auth manager: writely
D/MyTracks( 2008): Logging in to writely...
E/MyTracks( 2008): Got auth token.
D/MyTracks( 2008): Loggin success for writely!
I/MyTracks( 2008): Creating a new authentication for service: wise
I/MyTracks( 2008): Creating modern auth manager: wise
D/MyTracks( 2008): Logging in to wise...
E/MyTracks( 2008): Got auth token.
D/MyTracks( 2008): Loggin success for wise!
D/MyTracks( 2008): Sending to Docs....
D/MyTracks( 2008): Sending to Google Docs: trackId = 31
I/MyTracks( 2008): Build query: SELECT * FROM tracks WHERE (_id=31) ORDER BY _id
D/MyTracks( 2008): SendToDocs: Uploading to spreadsheet
D/MyTracks( 2008): GData connection prepared: 
com.google.android.apps.mytracks.io.ModernAuthManager@406b9d80
W/DefaultRequestDirector( 2008): Authentication error: Unable to respond to any 
of these challenges: {googlelogin=WWW-Authenticate: GoogleLogin }
E/MyTracks( 2008): HttpException
E/MyTracks( 2008): 
com.google.android.apps.mytracks.io.gdata.GDataWrapper$HttpException
E/MyTracks( 2008):      at 
com.google.android.apps.mytracks.io.docs.DocsHelper$2.query(DocsHelper.java:198)
E/MyTracks( 2008):      at 
com.google.android.apps.mytracks.io.docs.DocsHelper$2.query(DocsHelper.java:1)
E/MyTracks( 2008):      at 
com.google.android.apps.mytracks.io.gdata.GDataWrapper.runOne(GDataWrapper.java:
198)
E/MyTracks( 2008):      at 
com.google.android.apps.mytracks.io.gdata.GDataWrapper.runCommon(GDataWrapper.ja
va:171)
E/MyTracks( 2008):      at 
com.google.android.apps.mytracks.io.gdata.GDataWrapper.runQuery(GDataWrapper.jav
a:162)
E/MyTracks( 2008):      at 
com.google.android.apps.mytracks.io.docs.DocsHelper.requestSpreadsheetId(DocsHel
per.java:172)
E/MyTracks( 2008):      at 
com.google.android.apps.mytracks.io.SendToDocs.uploadToDocs(SendToDocs.java:193)
E/MyTracks( 2008):      at 
com.google.android.apps.mytracks.io.SendToDocs.doUpload(SendToDocs.java:123)
E/MyTracks( 2008):      at 
com.google.android.apps.mytracks.io.SendToDocs.access$0(SendToDocs.java:101)
E/MyTracks( 2008):      at 
com.google.android.apps.mytracks.io.SendToDocs$1.run(SendToDocs.java:96)
E/MyTracks( 2008):      at android.os.Handler.handleCallback(Handler.java:587)
E/MyTracks( 2008):      at android.os.Handler.dispatchMessage(Handler.java:92)
E/MyTracks( 2008):      at android.os.Looper.loop(Looper.java:123)
E/MyTracks( 2008):      at android.os.HandlerThread.run(HandlerThread.java:60)
W/dalvikvm( 2008): threadid=14: thread exiting with uncaught exception 
(group=0x40015560)
E/AndroidRuntime( 2008): FATAL EXCEPTION: SendToGoogleDocs
E/AndroidRuntime( 2008): java.lang.NullPointerException
E/AndroidRuntime( 2008):        at 
com.google.android.apps.mytracks.io.gdata.GDataWrapper.runOne(GDataWrapper.java:
215)
E/AndroidRuntime( 2008):        at 
com.google.android.apps.mytracks.io.gdata.GDataWrapper.runCommon(GDataWrapper.ja
va:171)
E/AndroidRuntime( 2008):        at 
com.google.android.apps.mytracks.io.gdata.GDataWrapper.runQuery(GDataWrapper.jav
a:162)
E/AndroidRuntime( 2008):        at 
com.google.android.apps.mytracks.io.docs.DocsHelper.requestSpreadsheetId(DocsHel
per.java:172)
E/AndroidRuntime( 2008):        at 
com.google.android.apps.mytracks.io.SendToDocs.uploadToDocs(SendToDocs.java:193)
E/AndroidRuntime( 2008):        at 
com.google.android.apps.mytracks.io.SendToDocs.doUpload(SendToDocs.java:123)
E/AndroidRuntime( 2008):        at 
com.google.android.apps.mytracks.io.SendToDocs.access$0(SendToDocs.java:101)
E/AndroidRuntime( 2008):        at 
com.google.android.apps.mytracks.io.SendToDocs$1.run(SendToDocs.java:96)
E/AndroidRuntime( 2008):        at 
android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime( 2008):        at 
android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 2008):        at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 2008):        at 
android.os.HandlerThread.run(HandlerThread.java:60)
W/ActivityManager(  175):   Force finishing activity 
com.google.android.maps.mytracks/com.google.android.apps.mytracks.MyTracks
D/MyTracks( 2008): MyTracks.onPause
D/MyTracks( 2008): MyTracks: Trying to unbind from track recording service...
D/MyTracks( 2008): MyTracks: ...unbind finished!
D/MyTracks( 2008): MyTracksMap.onPause
D/MyTracks( 2008): MyTracksMap: Now unregistering location listeners.
D/MyTracks( 2008): MyTracksMap: Now unregistering sensor listeners.
D/Launcher(  250): -- loadPreferences()
D/dalvikvm( 2008): GC_CONCURRENT freed 1070K, 51% free 3613K/7367K, external 
2041K/2179K, paused 2ms+4ms
D/MyTracks( 2008): MyTracks.onStop
D/MyTracks( 2008): MyTracksMap.onStop
D/MyTracks( 2008): MyTracks.onDestroy
D/MyTracks( 2008): MyTracksMap.onDestroy
I/ActivityManager(  175): No longer want com.android.voicedialer (pid 1669): 
hidden #16
D/dalvikvm( 1775): GC_CONCURRENT freed 368K, 48% free 3587K/6791K, external 
0K/0K, paused 3ms+3ms

Original comment by ehers...@gmail.com on 8 Feb 2011 at 11:37

GoogleCodeExporter commented 9 years ago
Are you still able to reproduce this one with the newest version?

Original comment by rdama...@google.com on 9 Feb 2011 at 6:26

GoogleCodeExporter commented 9 years ago
Just tested with the new 1.1.0 from the market and I still get force-close 
errors.

The fusion table is generated all right. See
http://www.google.com/fusiontables/DataSource?dsrcid=439610

No Spreadsheet is created though. And the app crashes during the process.

I attach a complete log. Here is some excerpt:

02-09 10:49:19.440 W/DefaultRequestDirector(12993): Authentication error: 
Unable to respond to any of these challenges: {googlelogin=WWW-Authenticate: 
GoogleLogin realm="http://www.google.com/accounts/ClientLogin", 
service="writely"}
02-09 10:49:19.470 E/MyTracks(12993): HttpException
02-09 10:49:19.470 E/MyTracks(12993): 
com.google.android.apps.mytracks.io.gdata.GDataWrapper$HttpException
02-09 10:49:19.470 E/MyTracks(12993): at 
com.google.android.apps.mytracks.io.docs.DocsHelper$2.query(DocsHelper.java:198)
02-09 10:49:19.470 E/MyTracks(12993): at 
com.google.android.apps.mytracks.io.docs.DocsHelper$2.query(DocsHelper.java:1)
02-09 10:49:19.470 E/MyTracks(12993): at 
com.google.android.apps.mytracks.io.gdata.GDataWrapper.runOne(GDataWrapper.java:
198)
02-09 10:49:19.470 E/MyTracks(12993): at 
com.google.android.apps.mytracks.io.gdata.GDataWrapper.runCommon(GDataWrapper.ja
va:171)
02-09 10:49:19.470 E/MyTracks(12993): at 
com.google.android.apps.mytracks.io.gdata.GDataWrapper.runQuery(GDataWrapper.jav
a:162)
02-09 10:49:19.470 E/MyTracks(12993): at 
com.google.android.apps.mytracks.io.docs.DocsHelper.requestSpreadsheetId(DocsHel
per.java:172)
02-09 10:49:19.470 E/MyTracks(12993): at 
com.google.android.apps.mytracks.io.SendToDocs.uploadToDocs(SendToDocs.java:193)
02-09 10:49:19.470 E/MyTracks(12993): at 
com.google.android.apps.mytracks.io.SendToDocs.doUpload(SendToDocs.java:123)
02-09 10:49:19.470 E/MyTracks(12993): at 
com.google.android.apps.mytracks.io.SendToDocs.access$0(SendToDocs.java:101)
02-09 10:49:19.470 E/MyTracks(12993): at 
com.google.android.apps.mytracks.io.SendToDocs$1.run(SendToDocs.java:96)
02-09 10:49:19.470 E/MyTracks(12993): at 
android.os.Handler.handleCallback(Handler.java:587)
02-09 10:49:19.470 E/MyTracks(12993): at 
android.os.Handler.dispatchMessage(Handler.java:92)
02-09 10:49:19.470 E/MyTracks(12993): at android.os.Looper.loop(Looper.java:144)
02-09 10:49:19.470 E/MyTracks(12993): at 
android.os.HandlerThread.run(HandlerThread.java:60)
02-09 10:49:19.470 W/dalvikvm(12993): threadid=14: thread exiting with uncaught 
exception (group=0x400259f8)
02-09 10:49:19.470 E/AndroidRuntime(12993): FATAL EXCEPTION: SendToGoogleDocs
02-09 10:49:19.470 E/AndroidRuntime(12993): java.lang.NullPointerException
02-09 10:49:19.470 E/AndroidRuntime(12993): at 
com.google.android.apps.mytracks.io.gdata.GDataWrapper.runOne(GDataWrapper.java:
215)
02-09 10:49:19.470 E/AndroidRuntime(12993): at 
com.google.android.apps.mytracks.io.gdata.GDataWrapper.runCommon(GDataWrapper.ja
va:171)
02-09 10:49:19.470 E/AndroidRuntime(12993): at 
com.google.android.apps.mytracks.io.gdata.GDataWrapper.runQuery(GDataWrapper.jav
a:162)
02-09 10:49:19.470 E/AndroidRuntime(12993): at 
com.google.android.apps.mytracks.io.docs.DocsHelper.requestSpreadsheetId(DocsHel
per.java:172)
02-09 10:49:19.470 E/AndroidRuntime(12993): at 
com.google.android.apps.mytracks.io.SendToDocs.uploadToDocs(SendToDocs.java:193)
02-09 10:49:19.470 E/AndroidRuntime(12993): at 
com.google.android.apps.mytracks.io.SendToDocs.doUpload(SendToDocs.java:123)
02-09 10:49:19.470 E/AndroidRuntime(12993): at 
com.google.android.apps.mytracks.io.SendToDocs.access$0(SendToDocs.java:101)
02-09 10:49:19.470 E/AndroidRuntime(12993): at 
com.google.android.apps.mytracks.io.SendToDocs$1.run(SendToDocs.java:96)
02-09 10:49:19.470 E/AndroidRuntime(12993): at 
android.os.Handler.handleCallback(Handler.java:587)
02-09 10:49:19.470 E/AndroidRuntime(12993): at 
android.os.Handler.dispatchMessage(Handler.java:92)
02-09 10:49:19.470 E/AndroidRuntime(12993): at 
android.os.Looper.loop(Looper.java:144)
02-09 10:49:19.470 E/AndroidRuntime(12993): at 
android.os.HandlerThread.run(HandlerThread.java:60)
02-09 10:49:19.490 W/ActivityManager(   92):   Force finishing activity 
com.google.android.maps.mytracks/com.google.android.apps.mytracks.MyTracks

Original comment by marian.s...@gmail.com on 9 Feb 2011 at 10:26

Attachments:

GoogleCodeExporter commented 9 years ago
Same here with latest market version 1.1.0. 

D/MyTracks( 1614): Loggin success for wise!
D/MyTracks( 1614): Sending to Docs....
D/MyTracks( 1614): Sending to Google Docs: trackId = 36
I/MyTracks( 1614): Build query: SELECT * FROM tracks WHERE (_id=36) ORDER BY _id
D/MyTracks( 1614): SendToDocs: Uploading to spreadsheet
D/MyTracks( 1614): GData connection prepared: 
com.google.android.apps.mytracks.io.ModernAuthManager@4052dfd0
W/DefaultRequestDirector( 1614): Authentication error: Unable to respond to any 
of these challenges: {googlelogin=WWW-Authenticate: GoogleLogin 
realm="http://www.google.com/accounts/ClientLogin", service="writely"}
E/MyTracks( 1614): HttpException
E/MyTracks( 1614): 
com.google.android.apps.mytracks.io.gdata.GDataWrapper$HttpException
E/MyTracks( 1614):      at 
com.google.android.apps.mytracks.io.docs.DocsHelper$2.query(DocsHelper.java:198)
E/MyTracks( 1614):      at 
com.google.android.apps.mytracks.io.docs.DocsHelper$2.query(DocsHelper.java:1)
E/MyTracks( 1614):      at 
com.google.android.apps.mytracks.io.gdata.GDataWrapper.runOne(GDataWrapper.java:
198)
E/MyTracks( 1614):      at 
com.google.android.apps.mytracks.io.gdata.GDataWrapper.runCommon(GDataWrapper.ja
va:171)
E/MyTracks( 1614):      at 
com.google.android.apps.mytracks.io.gdata.GDataWrapper.runQuery(GDataWrapper.jav
a:162)
E/MyTracks( 1614):      at 
com.google.android.apps.mytracks.io.docs.DocsHelper.requestSpreadsheetId(DocsHel
per.java:172)
E/MyTracks( 1614):      at 
com.google.android.apps.mytracks.io.SendToDocs.uploadToDocs(SendToDocs.java:193)
E/MyTracks( 1614):      at 
com.google.android.apps.mytracks.io.SendToDocs.doUpload(SendToDocs.java:123)
E/MyTracks( 1614):      at 
com.google.android.apps.mytracks.io.SendToDocs.access$0(SendToDocs.java:101)
E/MyTracks( 1614):      at 
com.google.android.apps.mytracks.io.SendToDocs$1.run(SendToDocs.java:96)
E/MyTracks( 1614):      at android.os.Handler.handleCallback(Handler.java:587)
E/MyTracks( 1614):      at android.os.Handler.dispatchMessage(Handler.java:92)
E/MyTracks( 1614):      at android.os.Looper.loop(Looper.java:123)
E/MyTracks( 1614):      at android.os.HandlerThread.run(HandlerThread.java:60)
W/dalvikvm( 1614): threadid=12: thread exiting with uncaught exception 
(group=0x40015560)
E/AndroidRuntime( 1614): FATAL EXCEPTION: SendToGoogleDocs
E/AndroidRuntime( 1614): java.lang.NullPointerException
E/AndroidRuntime( 1614):        at 
com.google.android.apps.mytracks.io.gdata.GDataWrapper.runOne(GDataWrapper.java:
215)
E/AndroidRuntime( 1614):        at 
com.google.android.apps.mytracks.io.gdata.GDataWrapper.runCommon(GDataWrapper.ja
va:171)
E/AndroidRuntime( 1614):        at 
com.google.android.apps.mytracks.io.gdata.GDataWrapper.runQuery(GDataWrapper.jav
a:162)
E/AndroidRuntime( 1614):        at 
com.google.android.apps.mytracks.io.docs.DocsHelper.requestSpreadsheetId(DocsHel
per.java:172)
E/AndroidRuntime( 1614):        at 
com.google.android.apps.mytracks.io.SendToDocs.uploadToDocs(SendToDocs.java:193)
E/AndroidRuntime( 1614):        at 
com.google.android.apps.mytracks.io.SendToDocs.doUpload(SendToDocs.java:123)
E/AndroidRuntime( 1614):        at 
com.google.android.apps.mytracks.io.SendToDocs.access$0(SendToDocs.java:101)
E/AndroidRuntime( 1614):        at 
com.google.android.apps.mytracks.io.SendToDocs$1.run(SendToDocs.java:96)
E/AndroidRuntime( 1614):        at 
android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime( 1614):        at 
android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 1614):        at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 1614):        at 
android.os.HandlerThread.run(HandlerThread.java:60)
W/ActivityManager(  175):   Force finishing activity 
com.google.android.maps.mytracks/com.google.android.apps.mytracks.MyTracks
D/dalvikvm( 1614): GC_CONCURRENT freed 331K, 46% free 3546K/6535K, external 
1783K/2179K, paused 2ms+14ms
D/MyTracks( 1614): MyTracks.onPause
D/MyTracks( 1614): MyTracks: Trying to unbind from track recording service...
D/MyTracks( 1614): MyTracks: ...unbind finished!
D/MyTracks( 1614): MyTracksMap.onPause
D/MyTracks( 1614): MyTracksMap: Now unregistering location listeners.
D/MyTracks( 1614): MyTracksMap: Now unregistering sensor listeners.
D/MyTracks( 1614): MyTracks.onStop
D/MyTracks( 1614): MyTracksMap.onStop
D/MyTracks( 1614): MyTracks.onDestroy
D/MyTracks( 1614): MyTracksMap.onDestroy
~                                   

Original comment by ehers...@gmail.com on 9 Feb 2011 at 11:26

Attachments:

GoogleCodeExporter commented 9 years ago
GDataWrapper#runOne catches a number of exceptions from the query, and tries to 
do figure out what to do for each one.  The relevant part is this one:

    } catch (HttpException e) {
      Log.e(MyTracksConstants.TAG, "HttpException", e);
      errorMessage = e.getMessage();
      if (errorMessage.contains("401")) {
        errorType = ERROR_AUTH;
      } else {
        errorType = ERROR_CONNECTION;
      }

What happens if e.getMessage is null?  That's what's happening here.  I'm going 
to fix a potential cause of the null getMessage, and I'm going to make the code 
here paranoid about null messages.

Original comment by simmonmt@google.com on 9 Feb 2011 at 4:30

GoogleCodeExporter commented 9 years ago
ehershey -- are you able to reliably reproduce this problem?  If so, I have an 
apk with what I think is the fix that I'd like you to test out.

The fix is in the simmonmt-staging5 clone, as rev 4bd91af4b3.

Original comment by simmonmt@google.com on 9 Feb 2011 at 4:41

GoogleCodeExporter commented 9 years ago
If you can reproduce it, please try the attached APK, which includes what I 
think is the fix for this bug.

I've duplicated it under artificial conditions, and have verified that it is 
fixed (under those conditions), but I'd prefer a real-life test.

Original comment by simmonmt@google.com on 9 Feb 2011 at 5:05

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I've already reviewed btw.

Original comment by rdama...@google.com on 9 Feb 2011 at 5:14

GoogleCodeExporter commented 9 years ago
Yes, I can reproduce reliably. I'll install this and give it a shot right now! 
Thanks!

Original comment by ehers...@gmail.com on 9 Feb 2011 at 5:20

GoogleCodeExporter commented 9 years ago
I tested the APK from Simon (comment 7).

This time, I don't get a force close error, but still an error message appears 
about unsuccessful Google Docs upload. Tried it several times.

The logfile is from the first attempt.

Original comment by marian.s...@gmail.com on 9 Feb 2011 at 5:21

Attachments:

GoogleCodeExporter commented 9 years ago
Same here, no crash but an error, and similar looking exceptions in my log. 

Original comment by ehers...@gmail.com on 9 Feb 2011 at 5:39

Attachments:

GoogleCodeExporter commented 9 years ago
Good to hear that the force close went away.  I'm going to track the 
authentication error under a separate issue, as the cause is likely to be 
unrelated to the root cause of this issue.

Original comment by simmonmt@google.com on 9 Feb 2011 at 5:41

GoogleCodeExporter commented 9 years ago
The docs auth problem is issue 307.

Original comment by simmonmt@google.com on 9 Feb 2011 at 5:44

GoogleCodeExporter commented 9 years ago

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