First, I added it after let app, but it wasn’t being read or was still throwing an error. So, I moved it to the top to make sure it’s being read correctly.
[OPTIMIZELY] Error:
optimizely object is not valid. Failing isFeatureEnabled.
index.930fab95.js:59
will try to open idb now: content
content.bundle.js:55109
7.366943359375 ms
Runtime lastError: Unchecked runtime.lastError: The message port closed before a response was received.
Failed to load resource: net::ERR_FILE_NOT_FOUND
chrome-extension://lopnbnfpjmgpbppclhclehhgafnifija/aiscripts/script-main.js:1
Blocked URL:
https://www.google.com/recaptcha/api2/anchor?ar=1&k=6LcqF6gZAAAAAHE-lzA_9GAux7eX9OHaQ5VdEo0C&co=aHR0cHM6Ly9nbGl0Y2guY29tOjQ0Mw..&hl=en&v=ItfkQiGBlJDHuTkOhlT3zHpB&size=invisible&cb=wv5xg4i7t5x8
Blocked iframe
Blocked URL:
https://api.glitch.com/console/8a53bc72-4b81-45f6-b428-5c7332cbffa8/
Blocked iframe
Blocked URL:
https://api.glitch.com/console/1f7d8fa4-376a-48b0-bc2d-d7a6be10f3e1/
Blocked iframe
WebSocket is already in CLOSING or CLOSED state.
index.930fab95.js:95
Refused to load the stylesheet because it violates the Content Security Policy directive: "style-src 'self' 'unsafe-inline' https://cloud.webtype.com https://d10lpsik1i8c69.cloudfront.net cdn.glitch.com cdn.glitch.me cdn.glitch.global cdn.staging.glitch.com cdn.staging.glitch.me cdn.staging.glitch.global cloud.typenetwork.com"
https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&display=swap
Refused to load the stylesheet because it violates the Content Security Policy directive: "style-src 'self' 'unsafe-inline' https://cloud.webtype.com https://d10lpsik1i8c69.cloudfront.net cdn.glitch.com cdn.glitch.me cdn.glitch.global cdn.staging.glitch.com cdn.staging.glitch.me cdn.staging.glitch.global cloud.typenetwork.com"
https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap
Refused to load the stylesheet because it violates the Content Security Policy directive: "style-src 'self' 'unsafe-inline' https://cloud.webtype.com https://d10lpsik1i8c69.cloudfront.net cdn.glitch.com cdn.glitch.me cdn.glitch.global cdn.staging.glitch.com cdn.staging.glitch.me cdn.staging.glitch.global cloud.typenetwork.com"
https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap
isCacheTxt: false
contentScript.bundle.js:54039
isCacheTxt: false
contentScript.bundle.js:54040
Open the terminal (Terminal button in the editor footer) and enter enable-npm. Wait for it to finish, then submit the link you get from the preview (use the three dots menu next to the preview).
I didn’t have to change any code to make it pass. Only making sure Glitch is not in an error state by doing what I said. I remixed your code, and it was passing for me (after the npm fix).
Also, make sure you are not submitting the editor link, but the actual live app link.
Well, it didn’t work either way, but strangely, I just repasted the URL and it worked. Not sure how or why — the URL didn’t even change. Still a mystery.
Well, if it works, it works. Who knows why code sometimes break.
Just as an aside, you could also complete these challenges locally. Just run the server locally and submit the localhost link http://localhost:3000 (or whatever port the server is started on). It works for all challenges, but certificate projects also needs a live link (or just a repo, not sure if we changed that).