Metabase Error when Adding a Map

I am testing the function to add a map in Metabase and I am running into an error. This is what I have done;

  1. Created a GeoJSON file from a shapefile using FME translator
  2. Uploaded the .json file to GitHub. The .json file previews in the Github map view correctly
  3. Copied the raw link location and used that in in " URL for the GeoJSON file you want to use " parameter in the map creation dialogue
  4. Click “Load” and then I receive an error " r.features is undefined "

So, I am not sure why I am getting the error. The file only contains around 10 records and is very small. It populates correctly in Git.

For the record, I am running a local install of Metabase using v0.35.4. I’m on Windows 10 and browsing with Firefox 77.0.1.

Hi @rossi45
Post the JSON file

This is it.

https://github.com/MTBMike/Metabase/raw/PlacerClaims/FME_Test4.json

As i mentioned, I just used FME to create it.

@rossi45 I have no idea what FME is. But the file should not use Windows linefeed style (return+newline), but Linux style (newline). And should be UTF-8 encoded.

That’s not a map. That’s a couple of shapes. Metabase does not overlay your map on a satellite background.
Here’s the US map used in Metabase: https://raw.githubusercontent.com/metabase/metabase/master/resources/frontend_client/app/assets/geojson/us-states.json
These are some excellent tools: https://mapshaper.org/ http://geojson.io/

1 Like

Thanks flamber! You are right, they are just some shapes I wanted to test with that I would like to use further on. Secondly, FME is a Universal translator between File Types. It’s excellent if you are in need of that type of function.

I’ve been testing and I think the translation needed some tweaks, but I do believe the tweaks I made changed the encoding and linefeed style because I finally got one to work. I just started with Metabase last week and I have a lot to learn, however it seems to provide a lot of function that I have been wanting for a while. I appreciate your help and quick response. Also, I used geojson.io but it was still giving me grief. Could be something to do with the files I am using, too.

Also, thanks for pointing at the US map. Is there a Canada map at all? Thanks.

@rossi45 No, Metabase currently only has a map of World and US - search the internet for “canada geojson” and I’m sure one of the first results will be something you can use.

Hi @flamber !

With the new version of metabase 0.38.0 with any of the (Brazil) maps:

https://raw.githubusercontent.com/luizpedone/municipal-brazilian-geodata/master/minified/Brasil.min.json

https://raw.githubusercontent.com/codeforamerica/click_that_hood/master/public/data/brazil-states.geojson

https://raw.githubusercontent.com/fititnt/gis-dataset-brasil/master/uf/geojson/uf.json

https://raw.githubusercontent.com/luizpedone/municipal-brazilian-geodata/master/data/Brasil.json

https://raw.githubusercontent.com/tbrugz/geodata-br/master/geojson/geojs-100-mun.json

I get the error:

undefined is not iterable (cannot read property Symbol(Symbol.iterator))

Can you help me?

@PauloHFM
I’m not getting any errors, when I try those maps on 0.38.0.
Which version were you using before?
Are you using outgoing proxy?

Post “Diagnostic Info” from Admin > Troubleshooting.
And check for more detailed errors in Admin > Troubleshooting > Logs.

Well I’ve been trying for days, and today it worked…
I was on 0.37.8 and 0.38 rc4.
Infra Team make it we can only use metabase with company’s VPN.
You think it could be a network error?
Metabase trying to access the map url and couldn’t?

Getting “Invalid custom GeoJSON key” in some urls, but this i think is from the json file itself.

@PauloHFM Sounds like network issues. But without the logs, it’s difficult to say for sure.
We have an issue open about providing better errors:
https://github.com/metabase/metabase/issues/14635 - upvote by clicking :+1: on the first post

Metabase version 0.37.9

Hello, I received that r.features is undefined before. But then somehow the issue was resolved suddenly and the custom maps worked fine. However, a few days ago the same GeoJson file doesn’t work anymore and I got a new error message.


And here is the map file https://raw.githubusercontent.com/weiting-1993/Germany-Maps-GeoJSON-files/d85ceffaa8b805b2c3cbc720ff0cd1db7b7e3d88/Deutschland_Bundesland.json

Can anyone help me with that?

@wtlin I’m not getting any errors, when I try that map on 0.38.0.
Post “Diagnostic Info” from Admin > Troubleshooting.
And check for more detailed errors in Admin > Troubleshooting > Logs.

Thank you for the response! We plan to update to 0.38.0 soon.

I checked the logs, but not really helpful. Thanks for the hint anyway :slight_smile:

Should I report this a bug?

@wtlin

  1. Post “Diagnostic Info” from Admin > Troubleshooting.
  2. Are you using any antivirus/firewall on the machine hosting Metabase, or an outgoing proxy? Then try disabling those if they might intercept/change the request, when Metabase is reading the GeoJSON.

Without a way to reproduce, and if you are not using the latest release, then don’t create issues.
I think we need to address this issue first:
https://github.com/metabase/metabase/issues/14635 - upvote by clicking :+1: on the first post

{
“browser-info”: {
“language”: “en-GB”,
“platform”: “MacIntel”,
“userAgent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.152 Safari/537.36”,
“vendor”: “Google Inc.”
},
“system-info”: {
“file.encoding”: “UTF-8”,
“java.runtime.name”: “OpenJDK Runtime Environment”,
“java.runtime.version”: “11.0.10+9-Ubuntu-0ubuntu1.20.04”,
“java.vendor”: “Ubuntu”,
“java.vendor.url”: “https://ubuntu.com/”,
“java.version”: “11.0.10”,
“java.vm.name”: “OpenJDK 64-Bit Server VM”,
“java.vm.version”: “11.0.10+9-Ubuntu-0ubuntu1.20.04”,
“os.name”: “Linux”,
“os.version”: “5.4.0-1039-azure”,
“user.language”: “en”,
“user.timezone”: “Etc/UTC”
},
“metabase-info”: {
“databases”: [
“mysql”
],
“hosting-env”: “unknown”,
“application-database”: “mysql”,
“application-database-details”: {
“database”: {
“name”: “MySQL”,
“version”: “5.6.47.0”
},
“jdbc-driver”: {
“name”: “MariaDB Connector/J”,
“version”: “2.6.2”
}
},
“run-mode”: “prod”,
“version”: {
“date”: “2021-02-11”,
“tag”: “v0.37.9”,
“branch”: “release-x.37.x”,
“hash”: “a9a7fc8”
},
“settings”: {
“report-timezone”: null
}
}
}

@wtlin You definitely need to upgrade your MySQL that you’re using for the application database. Metabase only supports 5.7.7 or newer.
https://www.metabase.com/docs/latest/operations-guide/configuring-application-database.html#mysql-or-mariadb

1 Like

Need to be in exactly that order