anongit / mytracks

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

My Tracks needs android.permission.USE_CREDENTIALS #100

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to record on some HTC phones running 2.1
2. App crash

The following log is from an end user.
6-30 07:49:09.456 W/dalvikvm( 1445): threadid=3: thread exiting with uncaught 
exception (group=0x4001e390)
06-30 07:49:09.466 E/AndroidRuntime( 1445): Uncaught handler: thread main 
exiting due to uncaught exception
06-30 07:49:09.636 E/AndroidRuntime( 1445): java.lang.SecurityException: caller 
uid 10045 lacks android.permission.USE_CREDENTIALS
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
android.os.Parcel.readException(Parcel.java:1218)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
android.os.Parcel.readException(Parcel.java:1206)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
android.accounts.IAccountManager$Stub$Proxy.getAuthToken(IAccountManager.java:69
2)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
android.accounts.AccountManager$3.doWork(AccountManager.java:564)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
android.accounts.AccountManager$AmsTask.start(AccountManager.java:858)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
android.accounts.AccountManager.getAuthToken(AccountManager.java:562)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
com.google.android.accounts.StandardAccountManager.getAuthToken(StandardAccountM
anager.java:219)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
com.google.android.apps.mytracks.io.ModernAuthManager.doLogin(ModernAuthManager.
java:97)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
com.google.android.apps.mytracks.MyTracks.doLogin(MyTracks.java:1285)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
com.google.android.apps.mytracks.MyTracks.access$1400(MyTracks.java:88)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
com.google.android.apps.mytracks.MyTracks$14$1.handleAccountSelected(MyTracks.ja
va:1273)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
com.google.android.apps.mytracks.AccountChooser.chooseAccount(AccountChooser.jav
a:68)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
com.google.android.apps.mytracks.MyTracks$14.run(MyTracks.java:1265)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
android.app.Activity.runOnUiThread(Activity.java:3689)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
com.google.android.apps.mytracks.MyTracks.authenticate(MyTracks.java:1262)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
com.google.android.apps.mytracks.MyTracks.sendToGoogle(MyTracks.java:1367)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
com.google.android.apps.mytracks.SendToGoogleDialog$2.onClick(SendToGoogleDialog
.java:72)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
android.view.View.performClick(View.java:2364)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
android.view.View.onTouchEvent(View.java:4179)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
android.widget.TextView.onTouchEvent(TextView.java:6650)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
android.view.View.dispatchTouchEvent(View.java:3709)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:924)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:924)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:924)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:924)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(P
honeWindow.java:1695)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow
.java:1116)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
android.app.Dialog.dispatchTouchEvent(Dialog.java:643)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneW
indow.java:1679)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
android.view.ViewRoot.handleMessage(ViewRoot.java:1708)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
android.os.Handler.dispatchMessage(Handler.java:99)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
android.os.Looper.loop(Looper.java:123)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
android.app.ActivityThread.main(ActivityThread.java:4595)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
java.lang.reflect.Method.invokeNative(Native Method)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
java.lang.reflect.Method.invoke(Method.java:521)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
06-30 07:49:09.636 E/AndroidRuntime( 1445): at 
dalvik.system.NativeStart.main(Native Method)

What is the expected output? What do you see instead?
Success.  Instead find crash

Please use labels and text to provide additional information.
I think we just need to request yet another permission in the manifest.  Should 
be a 1 line change.

Original issue reported on code.google.com by sandordo...@google.com on 30 Jun 2010 at 3:55

GoogleCodeExporter commented 9 years ago
Please fix the crashing problem quickly, we are many people who uses My Tracks 
(but useless if it's not possible to upload to Google Maps). Thanks in advance. 
/OP

Original comment by ole.pugg...@gmail.com on 7 Jul 2010 at 9:22

GoogleCodeExporter commented 9 years ago
For those who struggle after Hero 2.1 update (as myself). Save map to kml then 
use import link in the my maps -> create new map page, and select saved kml 
from phones SD card. It requires more work and computer around but it works. 

Original comment by adlo...@gmail.com on 7 Jul 2010 at 9:34

GoogleCodeExporter commented 9 years ago
Fine, but when you're on the go with no PC, it doesn't help much...

Original comment by ole.pugg...@gmail.com on 7 Jul 2010 at 9:54

GoogleCodeExporter commented 9 years ago
I have the problem too. There was no problem with 1.5

Original comment by c.nielse...@gmail.com on 16 Jul 2010 at 3:07

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

Original comment by sandordo...@google.com on 22 Jul 2010 at 2:38

GoogleCodeExporter commented 9 years ago
I am finally looking into this a bit more and I am not sure it is a bug in My 
Tracks.  I think it might actually be a bug in the way HTC implemented this 
permission. I'll look to see if I can tell anything else, but my tracks 
actually already requests the relevant permission in the manifest and has for 
some time.  Not sure why it does not seem to used.

Original comment by sandordo...@google.com on 27 Jul 2010 at 11:20

GoogleCodeExporter commented 9 years ago
Can people who are suffering from this issue let me know which version of my 
tracks you are running.  Also helpful would be to know what permissions your 
system thinks my tracks has. Please look at:
Menu -> Settings -> Applications -> Manage Applications -> My Tracks
Please report what it has under Permissions -> Your accounts

Original comment by sandordo...@google.com on 28 Jul 2010 at 4:57

GoogleCodeExporter commented 9 years ago
HTC Hero (Android 2.1)

My Tracks version: 16

Under "Permissions / Your accounts" it says:
"discover known accounts, view configured accounts"

Original comment by rene%oue...@gtempaccount.com on 28 Jul 2010 at 7:02

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Doh... wrong "your accounts" section...

Google Docs, Google maps, Google Spreadsheets, manage the accounts list, use 
the authentication credentials of an account

Original comment by rene%oue...@gtempaccount.com on 28 Jul 2010 at 7:07

GoogleCodeExporter commented 9 years ago
Note: Recording works fine but Send to Google fails (see 
http://code.google.com/p/mytracks/issues/detail?id=107)

HTC Hero running Android 2.1
My Tracks version 1.0.15 (16 according to Manage Applications)

Permissions: Google Docs, Google Maps, Google Spreadsheets, manage the accounts 
list, use the authentication credentials of an account

Show all: discover known accounts, view configured accounts

Original comment by mat...@gmail.com on 28 Jul 2010 at 7:08

GoogleCodeExporter commented 9 years ago
HTC Hero: firmware:2.1-update1, build:3.32.405.1
My Tracks 1.0.15, Version 16
Permissions (translated from german...):
* my location: GPS position
* network: unlimited
* accounts: authentication credentials, GMaps, GSpreadSh, GDocs, manage 
accounts list, search known accounts, show configured accounts
* storage: SD card change/delete
* calls: read/identify phone status
* system tools: deactivate stand by mode

Original comment by marcelhu...@gmail.com on 28 Jul 2010 at 7:14

GoogleCodeExporter commented 9 years ago
Ok one more request.
I have an HTC Legend running the sense UI with 2.1.  Upload to maps and docs 
works for me.  I have a suspicion that the issue might be upgrading the app. IE 
you might only see the issue if you had the app installed before you upgraded 
the phone.  So here is the request:
Are there any brave souls out there willing to uninstall then reinstall My 
Tracks and see if that fixes the issue?  Remember that back up is not perfect.  
If you want to keep your tracks be sure to export all before you try this.
Any help is much appreciated.

Original comment by sandordo...@google.com on 29 Jul 2010 at 5:49

GoogleCodeExporter commented 9 years ago
After reinstalling My Tracks, uploading seems to work on my telephone (HTC 
Hero).
But: I can only find the spreadsheet, not the map.

Original comment by rene%oue...@gtempaccount.com on 29 Jul 2010 at 9:35

GoogleCodeExporter commented 9 years ago
Well that is good and bad news.  Good because it means it is not really our 
bug.  Bad because the work around is rather bad.  Most people won't want to 
uninstall and reinstall.

Rene can I ask you to try to upload to maps twice? One oddity of my tracks is 
the first time you try to access maps it will always fail, but the second time 
should work.

Original comment by sandordo...@google.com on 29 Jul 2010 at 9:53

GoogleCodeExporter commented 9 years ago
Didn't work, unfortunately.

But my recorded track is rather short (only a few meters - is there a minimum 
length?). I will retry to upload a track that is a bit longer later this day 
and let you know the results.

Original comment by rene%oue...@gtempaccount.com on 30 Jul 2010 at 7:05

GoogleCodeExporter commented 9 years ago
Installing and reinstalling worked for me, both map and spreadsheet! The track 
was rather short (70 meters).

I had My Tracks installed prior to upgrading my Hero to 2.1.

Original comment by mat...@gmail.com on 30 Jul 2010 at 10:04

GoogleCodeExporter commented 9 years ago
I recorded a new track that successfully uploaded to both Google Maps and 
Google Docs.
I guess the previous track was too short to be uploaded to maps.

Original comment by rene%oue...@gtempaccount.com on 30 Jul 2010 at 11:24

GoogleCodeExporter commented 9 years ago
I've just used MyTracks for the first time since I got the Android 2.1 update 
on my HTC Hero and am having the issue described here:

08-01 18:10:14.607: ERROR/AndroidRuntime(630): java.lang.SecurityException: 
caller uid 10045 lacks android.permission.USE_CREDENTIALS

I see from the comments that uninstalling MyTracks and reinstalling it seems to 
fix the problem - only thing is, I would really quite like to get the track I 
recorded uploaded to my Maps and Docs. Is there any chance that a new version 
of MyTracks might fix this (maybe even just the act of the Android system 
installing a new version would fix it, even without changes to code, given that 
it seems to be a problem with the OS upgrade process?). Just that if there is 
that possibility I'll wait for a newer version rather than lose my track.

Original comment by dhpigg...@gmail.com on 1 Aug 2010 at 5:22

GoogleCodeExporter commented 9 years ago
I've considered doing an update just for that purpose. It is possible that a 
new version would fix this issue.  I am working on a few changes.  Once those 
are done I'll push a new version to the market but it might take me a week or 
so. (Remember this is a 20% project.)

Original comment by sandordo...@google.com on 2 Aug 2010 at 4:50

GoogleCodeExporter commented 9 years ago
I have the same issue on my Hero, I also had MyTracks installed when I did the 
upgrade to 2.1.

I'l wait for your new release and try to confirm that its working then :)

Original comment by gbarv...@gmail.com on 3 Aug 2010 at 7:28

GoogleCodeExporter commented 9 years ago
I've just revisited this issue - I had just been recording tracks and leaving 
them on the phone (I decided that delaying uploading until a fix was found was 
more desirable than losing the tracks I'd recorded before knowing of the issue).

Anyway, I figured out a workaround just now, for anyone who is still waiting 
for a solution;

1. Download the 1.0.14 .apk here: 
http://code.google.com/p/mytracks/downloads/detail?name=MyTracks.1.0.14.apk&can=
2&q=
2. From a machine with the Android Debug Bridge installed, run:
adb install -r MyTracks.1.0.14.apk
Option -r preserves your saved tracks
3. Wait a moment or two and when the notification appears, choose the option to 
upgrade to the current latest version, 1.0.15.

The process of reinstalling it triggers the correct permissions to be set for 
the application and you can once again upload tracks. I imagine just 
reinstalling to 1.0.15 from the .apk would work fine too but I couldn't easily 
find a copy.

Hope this helps!

Original comment by dhpigg...@gmail.com on 22 Aug 2010 at 1:03

GoogleCodeExporter commented 9 years ago
Can we consider this fixed?

Original comment by rdama...@google.com on 25 Aug 2010 at 2:32

GoogleCodeExporter commented 9 years ago
I would not until we push a new version to the market.

Original comment by sandordo...@google.com on 25 Aug 2010 at 4:02

GoogleCodeExporter commented 9 years ago
Fixed on my HTC Hero 2.1 since MyTracks v1.0.16 release.

Thanks :-D

Original comment by fredduva...@gmail.com on 31 Aug 2010 at 2:27

GoogleCodeExporter commented 9 years ago
I'll take that as fixed.

Original comment by sandordo...@google.com on 31 Aug 2010 at 2:32

GoogleCodeExporter commented 9 years ago
HTC desire: firmware:2.2
My Tracks 1.0.17

Now still can not upload tracks to google map.
It will freeze on the step of "Authenticating to Google Map".

Original comment by middle1...@gmail.com on 29 Sep 2010 at 6:59

GoogleCodeExporter commented 9 years ago
Do you have any reason to believe it is due to the issue with 
android.permission.USE_CREDENTIALS ?

Original comment by sandordo...@google.com on 29 Sep 2010 at 5:22