tetratech / baytrendsmap

Shiny app to create maps on-the-fly from output of the baytrends package.
https://tetratech.github.io/baytrendsmap/
MIT License
4 stars 2 forks source link

Web based version throws 'network error' when downloading map #9

Closed jharcum closed 4 years ago

jharcum commented 4 years ago

Web based version throws 'network error' when downloading map (but works in RStudio Viewer)

Recreate: create any range map using web based verion. Click 'Save Range Map' ... error thrown,

jharcum commented 4 years ago

per Breck Sullivan (5/22 email): There is an option for you to save the maps in different formats. The only format that directly worked for me was pdf. If I wanted a png, it would never save as a png just an “all file.” I had to open it up in paint to then save it as a png. I might have been doing something wrong or it could just be my computer, but that took me a while to figure it out for a png.

leppott commented 4 years ago

Finally able to reproduce.

  1. Create map
  2. do NOT select "update map".
  3. Will not be able to save map except using the setttings when last time clicked "update map".

There is already text on each page that must click "update map" prior to clicking "save map".

image

image

leppott commented 4 years ago

The map is saved in the background when click "Update Map".

The "Save Map" button merely copies the file to the user defined location.

If the user changes the file extension between clicking these 2 buttons the operation does not complete correctly.

Possibly add some code to check the extension currently selected and the saved file. If no match pop up a box to inform the user.

leppott commented 4 years ago

Error code already exists.

image

Based on user comments he was probably getting the "Error_UpdateMapBeforeSave.pdf" since he mentioned only ever getting a PDF.

leppott commented 4 years ago

Tested both maps and all file types. All work as intended with and without clicking update map button before save map button. That is, when clicked update first got the intended file format and when did not got the "Error_UpdateMapBeforeSave.pdf".

jharcum commented 4 years ago

Test Fail. Using the app available through AWS: I created map, changed extension, clicked "update range map", waited for map to refresh, immediately clicked "save range map". I received "but_map_range_save" error (However, agree that desktop version behaves as you describe)

image

leppott commented 4 years ago

Tested AWS (CBP hosted) version and was able to save all 4 files types for both maps.

Using Chrome. Need to test with other browsers.

leppott commented 4 years ago

Works fine in Firefox as well.

Both Chrome and FF asked about security at the start.

Internet Explorer 11 displays another certificate warning when click "download map". Have to click through to get to the save file dialog. (Image below).

If security settings too high may not be able to access the site and get an error.

image

leppott commented 4 years ago

v1.1.0.9003 is on CBT server.

https://baytrends.chesapeakebay.net/baytrendsmap/

All 4 file formats for both map types download ok with "final" file number 1.

image

image

Tested with a "user" file and all file formats worked for both map types.

image

jharcum commented 4 years ago

done