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

fix importing geojson files on firefox on linux/openbsd #9912

Open
1 task
landryb opened this issue Jan 25, 2024 · 1 comment · May be fixed by #9913
Open
1 task

fix importing geojson files on firefox on linux/openbsd #9912

landryb opened this issue Jan 25, 2024 · 1 comment · May be fixed by #9913
Assignees
Labels
BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch bug
Milestone

Comments

@landryb
Copy link
Collaborator

landryb commented Jan 25, 2024

Description

using the profiletool from #9241, on master in firefox 122 it fails to recognize a valid geojson file (attached)

after looking in the developer console, file.type is application/geo+json in https://github.com/geosolutions-it/MapStore2/blob/master/web/client/plugins/longitudinalProfile/enhancers/processFile.js#L38 which isnt included in the list of supported mimetypes (eg only application/json)

looking into it, importing geojson files is globally broken because of a similar mimetype check in https://github.com/geosolutions-it/MapStore2/blob/master/web/client/components/import/dragZone/enhancers/processFiles.jsx#L50

How to reproduce

try to import
test2154.json (rename to test2154.geojson)

in a mapstore instance with EPSG:2154 defined
Expected Result
a profile should be computed from it (if the coverage is on the json area)

Current Result
profiletool says File not supported

with a mimetype fix, importing the file as a vector file goes further but fails with
You provided 'null' where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.
but that should be another problem

  • Not browser related
Browser info (use this site: https://www.whatsmybrowser.org/ for non expert users)
Browser Affected Version
Firefox on linux 122

Other useful information

Simple PR coming

@landryb landryb added the bug label Jan 25, 2024
landryb added a commit to landryb/MapStore2 that referenced this issue Jan 25, 2024
for some reason mimetype is detected as application/geo+json
@landryb
Copy link
Collaborator Author

landryb commented Jan 25, 2024

fwiw, importing the same file converted as zipped-shape works.

@tdipisa tdipisa linked a pull request Jan 25, 2024 that will close this issue
5 tasks
@tdipisa tdipisa added this to the 2024.01.00 milestone Jan 25, 2024
@tdipisa tdipisa modified the milestones: 2024.01.00, 2024.01.01 Mar 4, 2024
@tdipisa tdipisa added the BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch label Apr 24, 2024
@tdipisa tdipisa modified the milestones: 2024.01.01, 2024.01.02, 2024.02.00 May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants