Dont try download the map if player already has it
See original GitHub issueSo I was doing some online testing of my coop missions. Let’s forgtet for a bit about the other issue with coop replays.
But then when I have a local copy of my coop replay, which has all the information needed. Example:
{"uid": 9654895, "recorder": "speed2", "featured_mod": "coop", "launched_at": 1557605524.579191, "complete": true, "state": "PLAYING", "num_players": 2, "max_players": 4, "title": "speednoob only", "host": "FunkOff", "mapname": "scca_coop_a06", "map_file_path": "maps/scca_coop_a06.zip", "teams": {"1": ["FunkOff", "speed2"]}, "featured_mod_versions": {"1": 55, "2": 55, "3": 49, "4": 49, "5": 49, "6": 49, "7": 51, "8": 49, "9": 50, "10": 50, "11": 50, "12": 50, "13": 50, "14": 50, "15": 49, "16": 49, "17": 50, "18": 51, "19": 50, "20": 50, "21": 51, "22": 49}, "sim_mods": {}, "password_protected": false, "visibility": "PUBLIC", "command": "game_info", "game_end": 1557610797.2083693}
the client can’t actually play it
java.util.concurrent.CompletionException: java.io.FileNotFoundException: http://content.faforever.com/faf/vault/maps/scca_coop_a06.zip
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(Unknown Source)
at com.faforever.client.task.CompletableTask.lambda$new$1(CompletableTask.java:17)
at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
at javafx.base/javafx.event.Event.fireEvent(Unknown Source)
at javafx.graphics/javafx.concurrent.EventHelper.fireEvent(Unknown Source)
at javafx.graphics/javafx.concurrent.Task.fireEvent(Unknown Source)
at javafx.graphics/javafx.concurrent.Task.setState(Unknown Source)
at javafx.graphics/javafx.concurrent.Task$TaskCallable.lambda$call$2(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$9(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: http://content.faforever.com/faf/vault/maps/scca_coop_a06.zip
at java.base/jdk.internal.reflect.GeneratedConstructorAccessor101.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(Unknown Source)
at java.base/sun.net.www.protocol.http.HttpURLConnection$10.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.faforever.client.map.DownloadMapTask.call(DownloadMapTask.java:55)
at com.faforever.client.map.DownloadMapTask.call(DownloadMapTask.java:22)
at javafx.graphics/javafx.concurrent.Task$TaskCallable.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
... 1 more
Caused by: java.io.FileNotFoundException: http://content.faforever.com/faf/vault/maps/scca_coop_a06.zip
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
at java.base/java.net.URLConnection.getHeaderFieldLong(Unknown Source)
at java.base/java.net.URLConnection.getContentLengthLong(Unknown Source)
at java.base/java.net.URLConnection.getContentLength(Unknown Source)
at com.faforever.client.map.DownloadMapTask.call(DownloadMapTask.java:51)
... 6 more
It complains that the map isn’t in the vault, correct? Well its not there (since its my testing version), but the map is in my folder, so it should look there first before even trying to download it.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Help, my map isn't downloading! What do I do? - Noxcrew
While it is a common issue, there are solutions you can try ... If you have enough space for the download, reboot your...
Read more >Downloading Map Variants - Halo: The Master Chief Collection
I was wondering if there was a way to either download maps from the browsing menu in game or if there is an...
Read more >Tutorials/Map downloads - Minecraft Wiki - Fandom
Minecraft Worlds generated by other players can be downloaded by the player and opened in their copy of the game. This guide will...
Read more >Aeternum Map - Overwolf
Don't get lost in New World and use aeternum-map.gg to display your position on second screen, overlay or as minimap in-game. As alternative,...
Read more >How to fix Maps when it crashes - Android - Google Maps Help
If the Google Maps app on your phone or tablet crashes or has other issues that affect your experience on Maps, try the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here’s what I think is going on: ReplayService calls GameService which asks MapService for a list of installed maps. MapService only returns maps with a type of ‘skirmish’. So when you run a coop or any other mod type, the client won’t see locally stored maps since they’re not ‘skirmish’ type. To modify this, MapService needs to return maps that correspond to the type of game you’re playing. But, replay files only contain a featured_mod attribute and the maps have a type attribute but the two values don’t match up. e.g. featured_mod = ‘coop’ but replay type=‘campaign_coop’. So we’d have to build some type of matching between the two values.
ok so just ask user whether to start anyway I guess…