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

Elm bundle returned is corrupt #88

Closed
PanagiotisGeorgiadis opened this issue Mar 18, 2019 · 2 comments
Closed

Elm bundle returned is corrupt #88

PanagiotisGeorgiadis opened this issue Mar 18, 2019 · 2 comments

Comments

@PanagiotisGeorgiadis
Copy link

I am trying to write some online examples using the wonderful ellie-app but I've been experiencing an issue with one of the examples that I am trying to create. ( example url )

As you can see, ellie-app throws two runtime errors. On further investigation, if you open dev tools and navigate to the network tab and check on the /r/workspace?token=.... request, you'll see that the file that's being served is a partial file hence Javascript is blowing up.

Furthermore the file seems to stop on line 13090 which led me to believe that it could be a server side limitation on the file size that can be served ( or cached ).

@skatkov
Copy link

skatkov commented Mar 19, 2019

I'm experiencing similar issue -- stuck on loading window. According to the description that @PanagiotisGeorgiadis provided, I'm running into a similar issue.

The only thing that might seem like an error is this strange message about protocol change.

Screenshot 2019-03-19 at 13 10 16

@tbash
Copy link
Member

tbash commented Mar 19, 2019

Thanks for reporting! This is a deeper issue concerning the --debug flag with the Elm compiler, which has been addressed with the core team (see elm/compiler#1851). This will most likely be fixed with the next Elm release.

You can recreate locally with this as your elm.json:

{
    "type": "application",
    "source-directories": [
        "src"
    ],
    "elm-version": "0.19.0",
    "dependencies": {
        "direct": {
            "PanagiotisGeorgiadis/elm-datepicker": "1.0.0",
            "PanagiotisGeorgiadis/elm-datetime": "1.1.0",
            "elm/browser": "1.0.1",
            "elm/core": "1.0.2",
            "elm/html": "1.0.0",
            "elm/time": "1.0.0"
        },
        "indirect": {
            "elm/json": "1.1.3",
            "elm/svg": "1.0.1",
            "elm/url": "1.0.0",
            "elm/virtual-dom": "1.0.2"
        }
    },
    "test-dependencies": {
        "direct": {},
        "indirect": {}
    }
}

And the example found in your Ellie as Main.elm, then run elm make src/Main.elm --debug

You will have the output of:

Success! Compiled 1 module.
elm: Map.!: given key is not an element in the map
CallStack (from HasCallStack):
  error, called at libraries/containers/Data/Map/Internal.hs:603:17 in containers-0.5.10.2:Data.Map.Internal  

Checkout #71 and #67 as this is a duplicate issue of those two.

There is a current feature request open that could help with situations like these that will be the next addition to the Ellie App (see #66).

Regarding the protocol change, that is totally normal behavior when using WebSocket since wss is considered an upgrade from https (see https://developer.mozilla.org/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism#Common_uses_for_this_mechanism).

@tbash tbash closed this as completed Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants