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

Error "Cannot read property 'hasTransition' of undefined" with version 0.42.1 #5714

Closed
mikkom opened this issue Nov 20, 2017 · 5 comments · Fixed by #5724
Closed

Error "Cannot read property 'hasTransition' of undefined" with version 0.42.1 #5714

mikkom opened this issue Nov 20, 2017 · 5 comments · Fixed by #5724
Assignees

Comments

@mikkom
Copy link

mikkom commented Nov 20, 2017

mapbox-gl-js version: 0.42.1

Steps to Trigger Behavior

  1. Update from version 0.41.0 to 0.42.1
  2. Open page with map component

Expected Behavior

Map renders correctly.

Actual Behavior

Map does not show up (only the map controls do) and console shows the following error:

mapbox-gl.js:374 Uncaught TypeError: Cannot read property 'hasTransition' of undefined
    at t.hasTransitions (mapbox-gl.js:374)
    at e._render (mapbox-gl.js:484)

I also tried switching our custom style to mapbox://styles/mapbox/streets-v9 but the issue still remained.

@jfirebaugh
Copy link
Contributor

Thanks for using Mapbox, and sorry to hear you're running into an issue. In order for us to diagnose this issue, we'll need to be able to reproduce it ourselves. Could you please create a minimal self-contained JSFiddle that demonstrates the issue?

@jfirebaugh
Copy link
Contributor

We were able to figure out how to replicate this locally. Thanks for reporting.

@mikkom
Copy link
Author

mikkom commented Nov 21, 2017

Awesome, thanks! I'll try to run my app with the master revision ASAP.

@mikkom
Copy link
Author

mikkom commented Nov 22, 2017

Yep, seems to work fine again 👍

@adamal
Copy link

adamal commented Nov 28, 2017

I'm having an issue that looks similar enough that I'll post here:

With a style that loads fine using styleUrl: at initialization, i get the following error with 0.42.2 when using setStyle. I did not have these in 0.41.
A few other styles load correctly.

core.es5.js:1020 ERROR TypeError: Cannot read property 'r' of undefined
    at color (interpolate.js:18)
    at DataDrivenProperty.interpolate$2 [as interpolate] (properties.js:566)
    at TransitioningPropertyValue.possiblyEvaluate (properties.js:287)
    at Transitioning.possiblyEvaluate (properties.js:320)
    at FillStyleLayer.recalculate (fill_style_layer.js:30)
    at Style._recalculate (style.js:313)
    at Map._render (map.js:1452)
    at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:425)
    at Object.onInvokeTask (core.es5.js:3881)
    at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:424)

core.es5.js:1020 ERROR TypeError: Cannot read property 'get' of undefined
    at Function.createDynamic (program_configuration.js:285)
    at Function.deserialize (program_configuration.js:392)
    at new ProgramConfigurationSet (program_configuration.js:421)
    at new LineBucket (line_bucket.js:127)
    at LineStyleLayer.createBucket (line_style_layer.js:46)
    at deserialize (bucket.js:95)
    at Tile.loadVectorData (tile.js:149)
    at VectorTileSource.done (vector_tile_source.js:125)
    at Actor.receive (actor.js:80)
    at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:425)

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

Successfully merging a pull request may close this issue.

4 participants