Modify

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#22624 closed defect (fixed)

MapWithAI: OsmApiException: ResponseCode=400

Reported by: leah.bournival@… Owned by: taylor.smock
Priority: normal Milestone:
Component: Plugin mapwithai Version:
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

What is the expected result?

What happens instead?

Please provide any additional information below. Attach a screenshot if possible.

Revision:18621
Build-Date:2023-01-02 02:28:12

Identification: JOSM/1.5 (18621 en) Mac OS X 12.6.1
OS Build number: macOS 12.6.1 (21G217)
Memory Usage: 1516 MB / 8192 MB (901 MB allocated, but free)
Java version: 17.0.5+8-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.apple.laf.AquaLookAndFeel
Screen: Display 188945231 1920×1080 (scaling 1.00×1.00) Display 69734662 1792×1120 (scaling 2.00×2.00)
Maximum Screen Size: 1920×1120
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: [-Djpackage.app-version=18621, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=/private/var/folders/83/1w12zw_n5pz_9qct0czqs6th0000gn/T/AppTranslocation/678117FE-A150-4CED-9261-F3389AE5A5E6/d/JOSM 12.app/Contents/MacOS/JOSM]
Dataset consistency test: No problems found

Plugins:
+ Mapillary (2.1.1)
+ apache-commons (36034)
+ apache-http (35924)
+ buildings_tools (36011)
+ flatlaf (36036)
+ graphview (36011)
+ jna (36005)
+ mapwithai (v1.10.0)
+ markseen (14)
+ measurement (35978)
+ osm-obj-info (66)
+ reverter (36043)
+ utilsplugin2 (36011)

Tagging presets:
+ ${HOME}/Downloads/FB_presets.max.xml

Map paint styles:
+ ${HOME}/Downloads/FB_style.mapcss
+ ${HOME}/Downloads/SneffelsGEM1_Leah (1).mapcss
+ ${HOME}/Downloads/rainbow_roads.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Streets&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/MapWithAI&zip=1

Validator rules:
+ ${HOME}/Downloads/FB_rules5.14.validator.mapcss

Last errors/warnings:
- 00448.549 W: Unable to convert property color to type class java.awt.Color: found Keyword{transparent} of type class org.openstreetmap.josm.gui.mappaint.Keyword!
- 00448.578 W: Unable to convert property color to type class java.awt.Color: found Keyword{transparent} of type class org.openstreetmap.josm.gui.mappaint.Keyword!
- 00461.368 W: Unable to convert property color to type class java.awt.Color: found Keyword{transparent} of type class org.openstreetmap.josm.gui.mappaint.Keyword!
- 00462.303 W: Unable to convert property color to type class java.awt.Color: found Keyword{transparent} of type class org.openstreetmap.josm.gui.mappaint.Keyword!
- 00467.772 W: Unable to convert property color to type class java.awt.Color: found Keyword{transparent} of type class org.openstreetmap.josm.gui.mappaint.Keyword!
- 00475.138 W: Unable to convert property color to type class java.awt.Color: found Keyword{transparent} of type class org.openstreetmap.josm.gui.mappaint.Keyword!
- 00475.236 W: Unable to convert property color to type class java.awt.Color: found Keyword{transparent} of type class org.openstreetmap.josm.gui.mappaint.Keyword!
- 00499.887 W: Unable to convert property color to type class java.awt.Color: found Keyword{transparent} of type class org.openstreetmap.josm.gui.mappaint.Keyword!
- 00559.925 W: Unable to convert property color to type class java.awt.Color: found Keyword{transparent} of type class org.openstreetmap.josm.gui.mappaint.Keyword!
- 00565.700 E: Handled by bug report queue: java.lang.RuntimeException: java.lang.RuntimeException: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Body=<<h1>400 Bad Request>. Cause: java.lang.RuntimeException: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Body=<<h1>400 Bad Request>. Cause: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Body=<<h1>400 Bad Request>



=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (31) of main
java.lang.RuntimeException: java.lang.RuntimeException: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Body=<<h1>400 Bad Request>
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.reportException(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.join(Unknown Source)
	at org.openstreetmap.josm.plugins.mapwithai.actions.AddMapWithAILayerAction.actionPerformed(AddMapWithAILayerAction.java:116)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton.doClick(Unknown Source)
	at java.desktop/com.apple.laf.ScreenMenuItem.actionPerformed(Unknown Source)
	at java.desktop/java.awt.MenuItem.processActionEvent(Unknown Source)
	at java.desktop/java.awt.MenuItem.processEvent(Unknown Source)
	at java.desktop/java.awt.MenuComponent.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.MenuComponent.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.RuntimeException: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Body=<<h1>400 Bad Request>
	at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Body=<<h1>400 Bad Request>
	at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:216)
	at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:138)
	at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:122)
	at org.openstreetmap.josm.io.OsmServerReader.getInputStream(OsmServerReader.java:86)
	at org.openstreetmap.josm.io.OsmServerReader.getInputStream(OsmServerReader.java:69)
	at org.openstreetmap.josm.io.BoundingBoxDownloader.parseOsm(BoundingBoxDownloader.java:211)
	at org.openstreetmap.josm.plugins.mapwithai.backend.BoundingBoxMapWithAIDownloader.parseOsm(BoundingBoxMapWithAIDownloader.java:120)
	at org.openstreetmap.josm.plugins.mapwithai.backend.MapWithAIDataUtils.lambda$download$6(MapWithAIDataUtils.java:171)
	... 6 more

Attachments (0)

Change History (4)

comment:2 by taylor.smock, 2 years ago

Component: CorePlugin mapwithai
Owner: changed from team to taylor.smock

OK. It looks like this was due to me trying to get Esri servers to paginate properly. If we remove &resultOffset=0 from the URL, it works properly. This was done in commit 9507670753f2feab02460803ae65582cf3958434 (in v1.10.0, December 14th).

I'll see about getting a fix out in the next few hours.

comment:3 by taylor.smock, 2 years ago

Resolution: fixed
Status: newclosed

Fixed in v1.10.1.

comment:4 by taylor.smock, 2 years ago

Summary: Tried to update map with AI plugin.MapWithAI: OsmApiException: ResponseCode=400

Modify Ticket

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