Modify

Opened 4 years ago

Closed 4 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: avar Owned by: team
Priority: major 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 avar 4 years ago.
sudo tcpflow -i lo -c port 3000
josm-works.txt (3.1 KB) - added by avar 4 years ago.
This is JOSM talking to the same server with the correct password - it works

Download all attachments as: .zip

Change History (3)

Changed 4 years ago by avar

sudo tcpflow -i lo -c port 3000

Changed 4 years ago by avar

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

comment:1 Changed 4 years ago by anonymous

  • Resolution set to worksforme
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.