Modify

Opened 12 years ago

Closed 12 years ago

#8909 closed defect (fixed)

Cannot create a note with old OAuth token

Reported by: Zverikk Owned by: ToeBee
Priority: major Milestone:
Component: Core notes Version: latest
Keywords: github Cc:

Description

In announcement it was said that with old token notes will be created, but anonymously. That's not what I got.

  1. Install josm-tested, configure OAuth, instal josm-latest, install notes plugin.
  2. Download an area, open notes panel, click "New note" button.
  3. Write something ("test") and click "OK".
  4. Nothing happens.

Log fragment:

GET http://api.openstreetmap.org/api/0.6/notes?bbox=32.3369235,59.9112368,32.3583871,59.9199225... OK
POST http://api.openstreetmap.org/api/0.6/notes?lat=59.91482764909105&lon=32.35122417310318&text=test... Forbidden
Error header: OAuth token doesn't have that capability.
org.openstreetmap.josm.io.OsmApiException: ResponseCode=403, Error Header=<OAuth token doesnt have that capability.>
        at org.openstreetmap.josm.plugins.notes.api.util.NotesApi.sendRequest(NotesApi.java:273)
        at org.openstreetmap.josm.plugins.notes.api.util.NotesApi.createNote(NotesApi.java:103)
        at org.openstreetmap.josm.plugins.notes.api.NewAction.execute(NewAction.java:42)

This error should be presented to user with an instruction on how to fix that. There should be a fall-back mechanism to store the note as anonymous.

Attachments (1)

8909_error_msg.png (9.1 KB ) - added by skyper 12 years ago.
screenshot of message

Download all attachments as: .zip

Change History (13)

comment:1 by Don-vip, 12 years ago

Component: CorePlugin notes
Owner: changed from team to ToeBee

The fallback has to be implemented in plugin.

comment:2 by stoecker, 12 years ago

I suggest to simply open a dialog and tell the user to recreate a new OAuth token when that error happens.

comment:3 by iandees, 12 years ago

Resolution: fixed
Status: newclosed

Just released a new version that shows the user a dialog when this happens.

in reply to:  3 ; comment:4 by skyper, 12 years ago

Resolution: fixed
Status: closedreopened

Replying to iandees:

Just released a new version that shows the user a dialog when this happens.

The dialog is misleading as it says to use a newer version (r6076) but I was using r6090.

I did generate a new OAuth token and now I am able to add notes but still as anonymous and not under my username. I did not restart so far. Is this needed ?

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2013-07-27 01:34:04
Last Changed Author: akks
Revision: 6090
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2013-07-26 21:45:36 +0200 (Fri, 26 Jul 2013)
Last Changed Rev: 6090

Identification: JOSM/1.5 (6090 en) Linux Debian GNU/Linux 7.1 (wheezy)
Memory Usage: 310 MB / 592 MB (66 MB allocated, but free)
Java version: 1.6.0_27, Sun Microsystems Inc., OpenJDK 64-Bit Server VM
Dataset consistency test: No problems found

Plugin: OpeningHoursEditor (29778)
Plugin: conflation (0.1.6)
Plugin: jts (29613)
Plugin: mirrored_download (29643)
Plugin: notes (0.1-4-ge6be9c4)
Plugin: openstreetbugs (29435)
Plugin: reverter (29771)
Plugin: undelete (29555)
Plugin: utilsplugin2 (29771)
Plugin: wikipedia (29778)

in reply to:  4 ; comment:5 by skyper, 12 years ago

Replying to skyper:

I did not restart so far. Is this needed ?

Well, after a restart it does work.

The warning should say, that you need to get a new OAuth token and then you need to restart JOSM.

in reply to:  5 comment:6 by skyper, 12 years ago

Replying to skyper:

Replying to skyper:

I did not restart so far. Is this needed ?

Well, after a restart it does work.

The warning should say, that you need to get a new OAuth token and then you need to restart JOSM.

Still the wrong error message !

screenshot of message

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2013-08-24 01:35:22
Last Changed Author: Don-vip
Revision: 6182
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2013-08-24 02:45:16 +0200 (Sat, 24 Aug 2013)
Last Changed Rev: 6182

Identification: JOSM/1.5 (6182 en) Linux Debian GNU/Linux 7.1 (wheezy)
Memory Usage: 291 MB / 592 MB (83 MB allocated, but free)
Java version: 1.7.0_25, Oracle Corporation, OpenJDK 64-Bit Server VM
Java package: openjdk-7-jre:amd64-7u25-2.3.10-1~deb7u1
Dataset consistency test: No problems found

Plugin: OpeningHoursEditor (29854)
Plugin: conflation (0.1.6)
Plugin: jts (29854)
Plugin: mirrored_download (29854)
Plugin: notes (0.3-8-g03135df)
Plugin: openstreetbugs (29854)
Plugin: reverter (29854)
Plugin: undelete (29854)
Plugin: utilsplugin2 (29854)
Plugin: wikipedia (29854)
Last edited 12 years ago by skyper (previous) (diff)

by skyper, 12 years ago

Attachment: 8909_error_msg.png added

screenshot of message

comment:7 by Don-vip, 12 years ago

Keywords: github added

Maybe we need to report this on Github: https://github.com/iandees/josm-notes/issues/3

comment:8 by iandees, 12 years ago

No need for exclamation points! Using positive, constructive and courteous comments will surely lead to faster responses.

in reply to:  8 comment:9 by Don-vip, 12 years ago

Replying to iandees:

Using positive, constructive and courteous comments will surely lead to faster responses.

of course :) however, what's the best way to communicate problems with notes plugin ? there's already 5 open defects here, do you prefer we report them on github instead ?

comment:10 by iandees, 12 years ago

Yes, github is where issues should be reported. I don't get notifications for bugs here unless someone points them out to me.

in reply to:  10 comment:11 by skyper, 12 years ago

Replying to iandees:

Yes, github is where issues should be reported. I don't get notifications for bugs here unless someone points them out to me.

Problem is that "ToeBee" is the maintainer in trac settings. Is he still active ?

Either we change it in favour of your nickname or we need an extra group for the notes plugin maintainer

comment:12 by iandees, 12 years ago

Resolution: fixed
Status: reopenedclosed

Fixed the dialog text.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain ToeBee.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.