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

traffic plugin initialization not working consistantly #274

Closed
cammace opened this issue Feb 10, 2018 · 5 comments
Closed

traffic plugin initialization not working consistantly #274

cammace opened this issue Feb 10, 2018 · 5 comments
Labels
bug A bug is found inside the code base and should be immediately brought to attention ASAP traffic-plugin Issues that deal with the traffic module

Comments

@cammace
Copy link

cammace commented Feb 10, 2018

receiving this crash when I try initializing the traffic plugin.

java.lang.NoSuchMethodError: No static method lineWidth(Lcom/mapbox/mapboxsdk/style/functions/CameraFunction;)Lcom/mapbox/mapboxsdk/style/layers/PropertyValue; in class Lcom/mapbox/mapboxsdk/style/layers/PropertyFactory; or its super classes (declaration of 'com.mapbox.mapboxsdk.style.layers.PropertyFactory' appears in /data/app/com.mapbox.voyage-1/base.apk)
                                                                     at com.mapbox.mapboxsdk.plugins.traffic.TrafficPlugin$TrafficLayer.getLineLayer(TrafficPlugin.java:352)
                                                                     at com.mapbox.mapboxsdk.plugins.traffic.TrafficPlugin$TrafficLayer.getLineLayer(TrafficPlugin.java:340)
                                                                     at com.mapbox.mapboxsdk.plugins.traffic.TrafficPlugin$TrafficLayer.access$000(TrafficPlugin.java:336)
                                                                     at com.mapbox.mapboxsdk.plugins.traffic.TrafficPlugin.addLocalLayer(TrafficPlugin.java:172)
                                                                     at com.mapbox.mapboxsdk.plugins.traffic.TrafficPlugin.addTrafficLayers(TrafficPlugin.java:161)
                                                                     at com.mapbox.mapboxsdk.plugins.traffic.TrafficPlugin.initialise(TrafficPlugin.java:141)
                                                                     at com.mapbox.mapboxsdk.plugins.traffic.TrafficPlugin.updateState(TrafficPlugin.java:127)
                                                                     at com.mapbox.mapboxsdk.plugins.traffic.TrafficPlugin.<init>(TrafficPlugin.java:79)
                                                                     at com.mapbox.voyage.ui.mapstyle.EditMapStyleFragment.onActivityCreated(EditMapStyleFragment.java:96)
                                                                     at android.support.v4.app.Fragment.performActivityCreated(Fragment.java:2270)
                                                                     at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1442)
                                                                     at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1750)
                                                                     at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1819)
                                                                     at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:797)
                                                                     at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2590)
                                                                     at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2377)
                                                                     at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2332)
                                                                     at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2239)
                                                                     at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:700)
                                                                     at android.os.Handler.handleCallback(Handler.java:751)
                                                                     at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                     at android.os.Looper.loop(Looper.java:154)
                                                                     at android.app.ActivityThread.main(ActivityThread.java:6823)
                                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1563)
                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1451)
02-10 14:58:45.707 3475-3828/com.mapbox.voyage E/mbgl: {Map Snapshotter}[Style]: Failed to load source mapbox://mapbox.mapbox-traffic-v1: bounds latitude values must be between -90 and 90 with bottom less than top

cc: @tobrun

@cammace cammace added bug A bug is found inside the code base and should be immediately brought to attention ASAP traffic-plugin Issues that deal with the traffic module labels Feb 10, 2018
@langsmith
Copy link
Contributor

Same type of issue reported in demo app when I try to toggle traffic in the traffic plugin example

02-11 09:05:07.189 17079-17079/com.mapbox.mapboxandroiddemo.debug E/mbgl: {droiddemo.debug}[Style]: Failed to load source traffic: bounds latitude values must be between -90 and 90 with bottom less than top

@tobrun
Copy link
Member

tobrun commented Feb 12, 2018

Re @cammace: this issue is related to using an older SDK version with the plugin vs using a newer version of the Maps SDK. At some point we added dds support for lineWidth, this changed underlying method signature and thus results in a no such method error

Re @langsmith: this is a different issue, can you ticket this out separately?

@langsmith
Copy link
Contributor

@cammace has mentioned my error in his pr

@cammace
Copy link
Author

cammace commented Feb 16, 2018

This is blocked by a new release of the Map SDK which includes this PR: mapbox/mapbox-gl-native#11178.

@cammace
Copy link
Author

cammace commented Apr 19, 2018

Issue has been resolved, closing.

@cammace cammace closed this as completed Apr 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug is found inside the code base and should be immediately brought to attention ASAP traffic-plugin Issues that deal with the traffic module
Projects
None yet
Development

No branches or pull requests

3 participants