#An interactive Lustre tutorial on gleamtours

1 messages · Page 1 of 1 (latest)

autumn osprey
#

I actually finished implementing my first tutorial quicker than I expected. You can try it here. https://gleamtours.com/lustre-tutorial/introduction/welcome-to-lustre/
It's a walk through creating a web app with Gleam and Lustre. The app is rendered in a separate window because future tours will allow you to implement a client and server and so the sandbox can't just be an element in the tours UI.

An interactive introduction and reference to the Gleam programming language. Learn Gleam in your browser!

night sparrow
#

incredible! 🤩

golden ether
#

Very cool!
Not sure if it's expected but on Firefox (macOS) I'm getting

proxy 

error: TypeError: ServiceWorker script at https://gleamtours.com/proxy.js for scope https://gleamtours.com/ threw an exception during script evaluation.

It works in Chrome, and as far as I can tell Safari although in Safari there is an overflow issue in the layout

autumn osprey
#

@golden ether thanks for the heads up. I should be able to test in firefox, do you get the actual error in the console anywhere?

#

unfortunetly I don't have safari, so testing that might be a little harder

golden ether
#

I think the Safari layout issue can be fixed by setting an explicit height on the #right panel like so.
But also there I'm getting an error with the popup:

SecurityError: Blocked a frame with origin "https://gleamtours.com" from accessing a cross-origin frame. Protocols, domains, and ports must match.

No idea why, looks to me like the popup is on the same origin

misty spire
#

Wow amazing! I was just reading the Lustre quickstart guide!

autumn osprey
#

@golden ether is it firefox or safari giving you that error?

#

I have a new exciting error

night sparrow
#

i saw a similar error on safari, seems like your worker is doing something "naughty"?

autumn osprey
golden ether
#

On Firefox there is no error in the DevTools for me at all, only on the page itself, in the output area, that one:

error: TypeError: ServiceWorker script at https://gleamtours.com/proxy.js for scope https://gleamtours.com/ threw an exception during script evaluation.

I suspect you are catching it somewhere, pretty printing it to your output box, and not logging it back to the console so there is no trace or anything in the console.

#

In Safari, there is no error in the console or in the output for me on first load, and I see the compiler warnings in the output.
But when clicking 'Run' this error appears in the console and the popup does not work as can be seen in my video:

SecurityError: Blocked a frame with origin "https://gleamtours.com" from accessing a cross-origin frame. Protocols, domains, and ports must match.
autumn osprey
# golden ether On Firefox there is no error in the DevTools for me at all, only on the page its...

actually firefox doesn't make accessing service worker logs anywhere very easy https://discourse.mozilla.org/t/how-to-enable-console-log-from-service-worker/130394

autumn osprey
autumn osprey
#

Origin should not include the path.

autumn osprey
#

Fixed and deployed for firefox. thanks for some help @golden ether

golden ether
autumn osprey
#

Yep all in browser.

golden ether
autumn osprey
#

yeah I'll add that. I currently just pull everything from the main gleam tour so wonder how I have broken it 🤔

golden ether