Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Useless error message after failing to load vector map data: Error: Error at Actor.receive (actor.js:81) #6646

Closed
poidl opened this issue May 9, 2018 · 2 comments

Comments

@poidl
Copy link

poidl commented May 9, 2018

mapbox-gl-js version:
v0.44.2
browser:
Chromium Version 66.0.3359.139

Steps to Trigger Behavior

  1. Load the following map (jsbin link below, but I can't verify whether the errors are the same I'm seeing when using a fileserver)
<head>
    <!-- <script src='/script.js'></script> -->
    <script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.2/mapbox-gl.js'></script>
    <link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.2/mapbox-gl.css' rel='stylesheet' />
</head>

<body>

    <!-- <div id='mapdiv' style='width: 400px; height: 300px;'></div> -->
    <div id='mapdiv' style='position: absolute; top: 0; bottom: 0; width: 100%' ;></div>

</body>

<script>
    var style = {
        "version": 8,
        "name": "Custom",
        "metadata": {
            "mapbox:autocomposite": true
        },
        "glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf",
        "sources": {
            "composite": {
                "type": "vector",
                "tiles": [
                    "https://mydebugbucket.s3-ap-southeast-1.amazonaws.com/{z}/{x}/{y}.pbf"
                ],
                "minzoom": 4,
                "maxzoom": 5
            }
        },
        "layers": [
            {
                "id": "boundary_low",
                "type": "line",
                "source": "composite",
                "source-layer": "boundary_low",
                "minzoom": 4,
                "maxzoom": 5,
                "paint": {
                    "line-color": "#929293"
                }
            }
        ]
    }
    var options = mapboxgl.Options = {
        container: 'mapdiv',
        style: style,
        center: [-81, 29], // starting position [lng, lat]
        zoom: 4, // starting zoom
        minZoom: 4,
        maxZoom: 15
    }

    var map = new mapboxgl.Map(options)
</script>

Link to Demonstration

http://jsbin.com/coforizelu/edit?html,console,output

Expected Behavior

I expect to see a 404 Not Found error message in the console (just like when raster data is missing)

Actual Behavior

I see

Error: Error
    at Actor.receive (actor.js:81)

in the console. At least when the area displayed on the map is large enough, so that actually some .pbf files are tried to be downloaded that don't exist.

@anandthakker
Copy link
Contributor

Hi @poidl , thanks for reporting this issue. I believe this was fixed in #6126, which is now available in the v0.45.0 release. Changing to 0.45 in the linked JSBin eliminates the console error.

@poidl
Copy link
Author

poidl commented May 9, 2018

Oops I missed the new release two days ago;-) Sorry and thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants