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

Map does not work with custom SQL query #9346

Open
Tobi28 opened this issue Jan 30, 2019 · 9 comments

Comments

Projects
None yet
8 participants
@Tobi28
Copy link

commented Jan 30, 2019

Hi,

as soon as I try to use an own SQL query to be shown in a map, a javascript error occurs and nothing can be done anymore. I tried it with different browsers: Chrome (71), Firefox (, Edge.
Operating System: Windows 10
Official docker image used as installation (version: 0.31.2)

It is easy to reproduce:

  • Take table People from the Sample Dataset
  • Select map
  • Map is opened and that works
  • Now modify it to an SQL query
  • After that, the map is not shown any more and the settings cannot be adjusted. Javascript error is thrown:
    `app-main.bundle.js?78262faa1c529a733077:5 Uncaught TypeError: Cannot read property 'map' of undefined
    at t.value (app-main.bundle.js?78262faa1c529a733077:5)
    at u._renderValidatedComponentWithoutOwnerOrContext (vendor.bundle.js?78262faa1c529a733077:145)
    at u._renderValidatedComponent (vendor.bundle.js?78262faa1c529a733077:145)
    at u.performInitialMount (vendor.bundle.js?78262faa1c529a733077:145)
    at u.mountComponent (vendor.bundle.js?78262faa1c529a733077:145)
    at Object.mountComponent (vendor.bundle.js?78262faa1c529a733077:83)
    at J.mountChildren (vendor.bundle.js?78262faa1c529a733077:145)
    at J._createInitialChildren (vendor.bundle.js?78262faa1c529a733077:145)
    at J.mountComponent (vendor.bundle.js?78262faa1c529a733077:145)
    at Object.mountComponent (vendor.bundle.js?78262faa1c529a733077:83)'

Thank you,
Tobias

@flamber

This comment has been minimized.

Copy link
Contributor

commented Jan 30, 2019

@Tobi28
Reproduce steps: Create a question using QB with Sample Dataset:

  • Using People, group by Name+Longitude(no-bin)+Latitude(no-bin) and Limit 100
  • Get Answer, then choose Visualization Map
  • "Convert this question to SQL", still displaying the map until click "Get Answer"
  • Then it just displays: "Please select a region map."
    • Click "Edit Settings", errors with: TypeError: Cannot read property 'map' of undefined
    • Try instead clicking Visualization ⚙️ , then settings modal opens fine
Uncaught TypeError: Cannot read property 'map' of undefined
    at ChartSettings.render (ChartSettings.jsx:191)
    at ChartSettings.<anonymous> (makeAssimilatePrototype.js:15)
    at ReactCompositeComponent.js:793
    at measureLifeCyclePerf (ReactCompositeComponent.js:73)
    at ReactCompositeComponentWrapper._renderValidatedComponentWithoutOwnerOrContext (ReactCompositeComponent.js:792)
    at ReactCompositeComponentWrapper._renderValidatedComponent (ReactCompositeComponent.js:819)
    at ReactCompositeComponentWrapper.performInitialMount (ReactCompositeComponent.js:359)
    at ReactCompositeComponentWrapper.mountComponent (ReactCompositeComponent.js:255)
    at Object.mountComponent (ReactReconciler.js:43)
    at ReactCompositeComponentWrapper.performInitialMount (ReactCompositeComponent.js:368)
@Tobi28

This comment has been minimized.

Copy link
Author

commented Jan 31, 2019

Hi,
thank you, that works! Strange, I tried exactly this a few days ago and had also some problems with that approach... But I cannot reproduce it any more.

@Tobi28

This comment has been minimized.

Copy link
Author

commented Jan 31, 2019

I have a similar problem now with the grid map. I autopin latitude and longitude from People in the sample data set. The grid map is shown perfectly.
But when I convert it to sql, the grid map cannot be configured properly (it says that it needs classified longitudes/latitudes). Although this is the automatically created query, that I used before. Thanks!

@flamber

This comment has been minimized.

Copy link
Contributor

commented Jan 31, 2019

Great. The "Grid map requires binned longitude/latitude." problem in SQL is existing issue #8362

@salsakran salsakran closed this Apr 10, 2019

@flamber

This comment has been minimized.

Copy link
Contributor

commented Apr 10, 2019

@salsakran This issue is still valid in 0.32.4 - updated my previous comment to make it more clear

@camsaul camsaul reopened this Apr 10, 2019

@benoror

This comment has been minimized.

Copy link

commented Apr 15, 2019

Getting the same bug with any kind of question, custom and native query

@flamber

This comment has been minimized.

Copy link
Contributor

commented Apr 15, 2019

@benoror If you're getting the same error, how do you reproduce it with Custom Question?

@calfzhou

This comment has been minimized.

Copy link

commented Apr 29, 2019

Just upgraded to Metabase 0.32.5.0, the same issue, for any question.

@flamber's method works, "click the gear icon near 'Visulation'". +1

@ribeirojose

This comment has been minimized.

Copy link

commented May 2, 2019

Also getting the same bug. Tried replacing country names with ISO 3166-1 alpha-2 codes, but this is ineffective. The Edit Settings button changes on hover, but is disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.