fable-compiler / repl-legacy

http://fable.io/repl
MIT License
14 stars 10 forks source link

Repl silently fails behind certain proxies #41

Open gerardpaapu opened 6 years ago

gerardpaapu commented 6 years ago

Some proxies block the requests (this appears as a 403 to the browser) for .dll.txt files, which prevents the Repl from starting up correctly.

Eventually leading to this uncaught error:

bundle.min.js:1 Uncaught (in promise) Error: not a PE file - bad magic PE number 0x00000000, is = {"bytes":[60,33,45,45,32,73,69,32,102,114,1, ... }
    at printer (bundle.min.js:1)
    at openPEFileReader (bundle.min.js:1)
    at openPE (bundle.min.js:1)
    at OpenILModuleReaderFromBytes (bundle.min.js:1)
    at MemoizationTable.LoadMod [as compute] (bundle.min.js:1)
    at MemoizationTable.Apply (bundle.min.js:1)
    at GetCcu (bundle.min.js:1)
    at args3 (bundle.min.js:1)
    at curriedFn (bundle.min.js:1)

Most users will have no idea what's causing this and assume that the repl is just broken, it would help to show an informative error like "We're having trouble loading DLLs. We know that some proxies or firewalls block them and this prevents the Repl working normally".

alfonsogarciacaro commented 6 years ago

I guess we probably need to save the error we get here somewhere and then return the error to the F# code when it asks for the checker.

Anybody wants to tackle this? 😸