Skip to content
This repository has been archived by the owner on Aug 23, 2018. It is now read-only.

Blank Page and Error 500 when using elm-reactor #234

Open
peacememories opened this issue Sep 25, 2017 · 11 comments
Open

Blank Page and Error 500 when using elm-reactor #234

peacememories opened this issue Sep 25, 2017 · 11 comments

Comments

@peacememories
Copy link

Hello, and thanks for all your work on the elm platform :)

I have an issue that has apparently surfaced before and was fixed, in #59

I was advised to create a new issue instead of just commenting on the old one, so I've duplicated my comment here :)

On MacOS, with the latest elm-platform (0.18 if I am not mistaken), and a very simple Dice.elm:

module Dice exposing (..)

import Html exposing (Html, div, text)


main =
    div [] [ text "Hello World!" ]

About 90% of the time when I refresh the page localhost:8000/Dice.elm I am greeted with a blank page, and the console outputs the following:

[Error] Failed to load resource: the server responded with a status of 500 (Internal Server Error) (Dice.elm, line 0)
[Error] ReferenceError: Can't find variable: runElmProgram
	Global Code (Dice.elm:10)

The resource in question is /_compile/Dice.elm which returns an error code 500.

Apparently when I add an error to my code, the proper error description page always gets shown, so the problem seems to occur after the page has been built?

I have uninstalled and reinstalled elm-platform a few times, and originally I was using the elm binaries from Homebrew, with the same result.

There could be a problem with my setup, but if so I can't find it.

@process-bot
Copy link

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

@peacememories
Copy link
Author

Something I hadn't done was test with other browsers, and, to my surprise it seems to only happen with Safari? Which is kind of weird because the developer tools indicate an error code in the response.

@danpalmer
Copy link

I'm experiencing the same issue, also in Safari. Anything I can do to help debug this let me know!

Interestingly, the 500s only seem to happen when there isn't a compile error. I can reliably refresh an error page and always receive 200 (as far as I can tell).

@rl-king
Copy link

rl-king commented Oct 31, 2017

I'm also experiencing this issue, also only safari (11.0), re-installed Elm and still the same. It's weirdly inconsistent I've had moments it did work on 15 refreshes, restarted Safari, and got the error again.

@zwilias
Copy link
Member

zwilias commented Nov 1, 2017

So it appears that Safari, for reasons that are beyond me, will sometimes request everything twice in rapid succession on separate TCP streams, yet it only listens to the results of the second request. The first request actually succeeds!

The second request suffers from a race condition where the first /_compile/.. request removes "it-is-safe-to-delete-this-file.js" before the second request can read it.

The actual 500 response reads like so:

A web handler threw an exception. Details:\n
it-is-safe-to-delete-this-file.js: openBinaryFile: does not exist (No such file or directory)

@peacememories
Copy link
Author

Oh, wow. I mean I guess a race condition should be fixed anyway, but... why, Safari?^^'

@mlooney
Copy link

mlooney commented Nov 28, 2017

+1 for this, driving me nuts, Version 11.0.1 (13604.3.5) still has this issue :(

@bryce13950
Copy link

Same thing here

@trs123
Copy link

trs123 commented Jul 9, 2018

Same here with Safari Technology Preview (Release 60 (Safari 12.0, WebKit 13606.1.23.1)).
Chrome Version 67.0.3396.99 (Offizieller Build) (64-Bit) works fine.
OS: macOS High Sierra 10.13.5

@matthewess
Copy link

matthewess commented Jul 22, 2018

Also affecting me, I would really appreciate something to address this.
Safari: 11.1.2
macOS: 10.13.6

@josephsweeney
Copy link

josephsweeney commented Aug 3, 2018

Affecting me as well.
macOS: 10.13.6
Safari: 11.1.2

Getting a 500 consistently though, makes elm-reactor unusable.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants