tmcw / geojson.net

https://www.placemark.io/
ISC License
150 stars 32 forks source link

WSOD since fix for Issue #45 — critical! #46

Closed Joel-MMCC closed 5 years ago

Joel-MMCC commented 5 years ago

Since the fix for Issue #45 (not responding to URL parameters) which I reported was applied. now the geojson.net just WSODs, with or without any URL parameters.

Here’s the complete returned HTML (note no tags in the <body> section that would display anything — just an empty <div> and some <script>:

<!DOCTYPE html>
<html>
<head>
  <meta charset='utf-8'>
  <meta http-equiv='X-UA-Compatible' content='IE=Edge'>
  <title>geojson.net</title>
  <link href='./node_modules/tachyons/src/tachyons.css' rel='stylesheet' />
  <link href='./css/leaflet.css' rel='stylesheet' />
  <link href='./node_modules/codemirror/lib/codemirror.css' rel='stylesheet' />
  <link href='./css/theme.css' rel='stylesheet' />
  <link href='./css/style.css' rel='stylesheet' />
  <link rel='icon' type='image/x-icon' href='./img/favicon.png' />
  <meta name='description' content='simply edit geojson map data' />
  <meta property='og:site_name' content='geojson.net'/>
  <meta name='viewport' content='initial-scale=1,maximum-scale=1'>
  <meta http-equiv="Content-Security-Policy" content="
    default-src
      'self'
      ;
    child-src
      'self'
      blob:
      ;
    connect-src
      'self'
      *
      ;
    font-src
      'self'
      ;
    frame-src
      'self'
      ;
    img-src
      'self'
      data:
      *
      ;
    script-src
      'self'
      'unsafe-eval'
      'unsafe-inline'
      ;
    style-src
      'self'
      'unsafe-inline'
      ;
  ">
  <style>
  /*
   * http://seclab.stanford.edu/websec/framebusting/framebust.pdf
   */
  body { display: none; }
  </style>
</head>
<body>

  <div id='geojsonnet'></div>

  <script>
    if (self == top) {
      document.getElementsByTagName ("body")[0].style.display = 'block';
    } else {
      top.location = self.location;
    }
  </script>
  <script src='./src/index.js'></script>
  </body>
</html>
tmcw commented 5 years ago

Interested in helping out? Contributions much appreciated, this is an open source project.

stevage commented 5 years ago

Latest master builds and runs just fine locally. But what is served up at geojson.net throws a console error SyntaxError: import declarations may only appear at top level of a module.

The index.html served up at geojson.net looks identical to the one in the repo's root on the master branch (ie, not the result of the npm run build process).

So my best guess is that the repo is currently configured to serve up the root of the master branch as Github Pages, whereas it should be using either a different branch, or a folder.

jgimbel commented 5 years ago

47 resolves this issue.