Modify

Opened 15 years ago

Closed 15 years ago

#3072 closed defect (worksforme)

JOSM keeps trying to upload while the API throws "HTTP/1.1 401 Unauthorized" and internal errors

Reported by: avarab@… Owned by: team
Priority: major Milestone:
Component: Core Version:
Keywords: Cc:

Description

Here's log of JOSM talking to my broken test API. I configured the wrong password in JOSM preferences so that the API throws "HTTP/1.1 401 Unauthorized" errors when JOSM tries to create changesets. JOSM disregards this and keeps on trying to create changesets.

Even though the server always throws either 401 or 500 JOSM seems to get the idea that it already uploaded the changeset content (which it didn't) and tries to close the changeset. Then it throws a NullPointerException:

org.openstreetmap.josm.io.OsmTransferException: java.lang.NullPointerException
	at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:475)
	at org.openstreetmap.josm.io.OsmApi.stopChangeset(OsmApi.java:304)
	at org.openstreetmap.josm.io.OsmServerWriter.uploadOsm(OsmServerWriter.java:115)
	at org.openstreetmap.josm.actions.UploadAction$1UploadDiffTask.realRun(UploadAction.java:227)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:62)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:116)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
	at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:458)
	... 8 more
org.openstreetmap.josm.io.OsmTransferException: java.lang.NullPointerException
	at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:475)
	at org.openstreetmap.josm.io.OsmApi.createPrimitive(OsmApi.java:232)
	at org.openstreetmap.josm.io.OsmApi.createChangeset(OsmApi.java:289)
	at org.openstreetmap.josm.io.OsmServerWriter.uploadOsm(OsmServerWriter.java:108)
	at org.openstreetmap.josm.actions.UploadAction$1UploadDiffTask.realRun(UploadAction.java:227)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:62)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:116)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
	at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:458)
	... 9 more

Attachments (2)

josm-localhost-flow.txt (207.7 KB ) - added by avarab@… 15 years ago.
sudo tcpflow -i lo -c port 3000
josm-works.txt (3.1 KB ) - added by avarab@… 15 years ago.
This is JOSM talking to the same server with the correct password - it works

Download all attachments as: .zip

Change History (3)

by avarab@…, 15 years ago

Attachment: josm-localhost-flow.txt added

sudo tcpflow -i lo -c port 3000

by avarab@…, 15 years ago

Attachment: josm-works.txt added

This is JOSM talking to the same server with the correct password - it works

comment:1 by anonymous, 15 years ago

Resolution: worksforme
Status: newclosed

Can't reproduce any more. Seems to work in latest. Closing as "works for me".

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
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.