#21431 closed defect (fixed)
[PATCH] Failed to download data
| Reported by: | Owned by: | team | |
|---|---|---|---|
| Priority: | normal | Milestone: | 22.10 |
| Component: | Core | Version: | |
| Keywords: | template_report HOT connection timeout | Cc: | angoca |
Description
What steps will reproduce the problem?
- Select task to validate in TM (HOTOSM)
- Bounding box is there, but error occurs when downloading data.
What is the expected result?
What happens instead?
Please provide any additional information below. Attach a screenshot if possible.
URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2021-09-03 03:12:33 +0200 (Fri, 03 Sep 2021)
Build-Date:2021-09-03 01:31:19
Revision:18193
Relative:URL: ^/trunk
Identification: JOSM/1.5 (18193 en) Mac OS X 10.15.7
OS Build number: Mac OS X 10.15.7 (19H1419)
Memory Usage: 1654 MB / 3641 MB (474 MB allocated, but free)
Java version: 1.8.0_301-b09, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Look and Feel: com.apple.laf.AquaLookAndFeel
Screen: Display 69734272 1440×900 (scaling 1.00×1.00) Display 459083570 3440×1440 (scaling 1.00×1.00)
Maximum Screen Size: 3440×1440
Best cursor sizes: 16×16→16×16, 32×32→32×32
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djava.security.policy=file:<java.home>/lib/security/javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>/bin, -Djava.security.manager, -Djnlpx.origFilenameArg=${HOME}/Library/Application Support/Oracle/Java/Deployment/cache/6.0/56/1ee8cfb8-2ea82160, -Djnlpx.remove=false, -Dsun.awt.warmup=true, -Djava.util.Arrays.useLegacyMergeSort=true, -Dmacosx.jnlpx.dock.name=JOSM, -Dmacosx.jnlpx.dock.icon=${HOME}/Library/Application Support/Oracle/Java/Deployment/cache/6.0/25/4c122699-6c51c1a8.icns, -Djnlp.application.href=https://josm.openstreetmap.de/download/josm.jnlp , -Djnlpx.jvm="<java.home>/bin/java"]
Dataset consistency test: No problems found
Plugins:
+ buildings_tools (35823)
+ mapathoner (1.1.10)
+ scripting (30798)
+ todo (30306)
Map paint styles:
- ${HOME}/Downloads/josm_styles-master.zip
- https://josm.openstreetmap.de/josmfile?page=Styles/SimpleBuildingTags&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/SimpleRoofTags&zip=1
+ https://github.com/osmlab/appledata/archive/josm_paint_inline_validation.zip
+ https://github.com/MissingMaps/josm_styles/archive/master.zip
Last errors/warnings:
- 01624.062 W: java.net.SocketTimeoutException: connect timed out
- 01624.063 E: java.net.SocketTimeoutException: connect timed out
- 01624.076 E: org.openstreetmap.josm.io.OsmTransferException: Could not connect to the OSM server. Please check your internet connection.. Cause: java.net.SocketTimeoutException: connect timed out
- 01624.097 E: IO Exception - <html>Failed to upload data to or download data from<br>'https://api.openstreetmap.org/api/0.6/map?bbox=81.7025757,25.4457548,81.7053223,25.4482349'<br>due to a problem with transferring data.<br>Details (untranslated): connect timed out</html>
- 01624.126 E: org.openstreetmap.josm.io.OsmTransferException: Could not connect to the OSM server. Please check your internet connection.. Cause: java.net.SocketTimeoutException: connect timed out
- 01624.126 E: org.openstreetmap.josm.io.OsmTransferException: Could not connect to the OSM server. Please check your internet connection.. Cause: java.net.SocketTimeoutException: connect timed out
- 01624.127 E: org.openstreetmap.josm.io.OsmTransferException: Failed to upload data to or download data from<br>'https://api.openstreetmap.org/api/0.6/map?bbox=81.7025757,25.4457548,81.7053223,25.4482349'<br>due to a problem with transferring data.<br>Details (untranslated): connect timed out
- 01624.131 E: Handled by bug report queue: org.openstreetmap.josm.io.OsmTransferException: Failed to upload data to or download data from<br>'https://api.openstreetmap.org/api/0.6/map?bbox=81.7025757,25.4457548,81.7053223,25.4482349'<br>due to a problem with transferring data.<br>Details (untranslated): connect timed out
=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.
Warning issued by: BugReportExceptionHandler#handleException
=== STACK TRACE ===
Thread: AWT-EventQueue-2 (41) of javawsApplicationThreadGroup
org.openstreetmap.josm.io.OsmTransferException: Failed to upload data to or download data from<br>'https://api.openstreetmap.org/api/0.6/map?bbox=81.7025757,25.4457548,81.7053223,25.4482349'<br>due to a problem with transferring data.<br>Details (untranslated): connect timed out
at org.openstreetmap.josm.io.remotecontrol.handler.LoadAndZoomHandler.lambda$handleRequest$0(LoadAndZoomHandler.java:169)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233)
at java.awt.Dialog.show(Dialog.java:1084)
at java.awt.Component.show(Component.java:1671)
at java.awt.Component.setVisible(Component.java:1623)
at java.awt.Window.setVisible(Window.java:1014)
at java.awt.Dialog.setVisible(Dialog.java:1005)
at org.openstreetmap.josm.gui.HelpAwareOptionPane.doShowOptionDialog(HelpAwareOptionPane.java:353)
at org.openstreetmap.josm.gui.HelpAwareOptionPane.showOptionDialog(HelpAwareOptionPane.java:289)
at org.openstreetmap.josm.gui.HelpAwareOptionPane.showOptionDialog(HelpAwareOptionPane.java:368)
at org.openstreetmap.josm.gui.ExceptionDialogUtil.showErrorDialog(ExceptionDialogUtil.java:43)
at org.openstreetmap.josm.gui.ExceptionDialogUtil.explainNestedIOException(ExceptionDialogUtil.java:139)
at org.openstreetmap.josm.gui.ExceptionDialogUtil.explainOsmTransferException(ExceptionDialogUtil.java:397)
at org.openstreetmap.josm.gui.ExceptionDialogUtil.explainException(ExceptionDialogUtil.java:491)
at org.openstreetmap.josm.actions.downloadtasks.PostDownloadHandler.lambda$run$1(PostDownloadHandler.java:109)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Attachments (0)
Change History (25)
comment:1 by , 4 years ago
| Component: | Core → Core remotecontrol |
|---|---|
| Keywords: | HOT added |
comment:2 by , 4 years ago
comment:3 by , 4 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → needinfo |
comment:4 by , 4 years ago
JOSM is now functioning normally it seems. I would not file a bug report but it said "This is always a coding error". Probably you can close this.
comment:5 by , 4 years ago
| Component: | Core remotecontrol → Core |
|---|---|
| Keywords: | connection timeout added |
| Owner: | changed from to |
| Status: | needinfo → new |
Thanks. I am not sure if JOSM should ask for a bug report in case of connection timeouts but in general, please, keep reporting problems, thanks.
This looks similar to #20774 but without the GOAWAY.
comment:8 by , 4 years ago
Just for notice. While I find org.openstreetmap.josm.io.remotecontrol.handler.LoadAndZoomHandler.lambda$handleRequest in many of these (duplicate) tickets, I have faced this problem once without using remote control, the last days. I had not time to report it and it happened just once. I remember some conflicts on upload and I am not sure how often I restarted the upload to the same changeset but I think it was several times finding new conflicts before the error. Maybe the search for open changeset brings a delay.
comment:18 by , 3 years ago
| Cc: | added |
|---|
comment:19 by , 3 years ago
| Summary: | Failed to download data → [PATCH] Failed to download data |
|---|
I believe I might have a fix for this:
-
src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java
diff --git a/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java b/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java
a b 9 9 import java.util.Collection; 10 10 import java.util.Collections; 11 11 import java.util.LinkedHashSet; 12 import java.util.List; 12 13 import java.util.Map; 13 14 import java.util.Set; 14 15 import java.util.concurrent.ExecutionException; 15 16 import java.util.concurrent.Future; 16 17 import java.util.concurrent.TimeUnit; 17 18 import java.util.concurrent.TimeoutException; 19 import java.util.stream.Collectors; 18 20 19 21 import javax.swing.JOptionPane; 20 22 … … 164 166 future.get(OSM_DOWNLOAD_TIMEOUT.get(), TimeUnit.SECONDS); 165 167 if (osmTask.isFailed()) { 166 168 Object error = osmTask.getErrorObjects().get(0); 167 throw error instanceof OsmApiException 168 ? (OsmApiException) error 169 : new OsmTransferException(String.join(", ", osmTask.getErrorMessages())); 169 if (error instanceof OsmApiException) { 170 throw (OsmApiException) error; 171 } 172 List<Throwable> exceptions = osmTask.getErrorObjects().stream() 173 .filter(Throwable.class::isInstance).map(Throwable.class::cast) 174 .collect(Collectors.toList()); 175 OsmTransferException osmTransferException = 176 new OsmTransferException(String.join(", ", osmTask.getErrorMessages())); 177 if (!exceptions.isEmpty()) { 178 osmTransferException.initCause(exceptions.get(0)); 179 exceptions.remove(0); 180 exceptions.forEach(osmTransferException::addSuppressed); 181 } 182 throw osmTransferException; 170 183 } 171 184 } catch (InterruptedException | ExecutionException | TimeoutException | 172 185 OsmTransferException | RuntimeException ex) { // NOPMD
Explanation:
ExceptionDialogUtil.explainException has special handling for OsmTransferException. Unfortunately, it requires that the exception have a cause set, and not only are we not setting the cause, we weren't even adding any additional suppressed exceptions.
Steps to reproduce:
- Disable your internet connection
- Run
curl 'http://localhost:8111/load_and_zoom?left=92.846832&bottom=22.522706&right=92.852325&top=22.529048' - See exception along with dialog box telling us that there was an unknown host.
The patch fixes the exception dialog, but now we have two dialogs both saying (almost) the same thing. One is a bit more verbose and has the full URL.
comment:21 by , 3 years ago
| Milestone: | → 22.10 |
|---|



Seems you had some connection problems with the OSM Api. Does this problem persist?