Closed vladcipariu91 closed 1 year ago
Same issue here. From this morning all my codelabs pages are suddenly not working and I'm getting the same error. I tried to import them again but nothing.
CSS and JavaScript are 403 errors.
GET https://storage.googleapis.com/codelab-elements/codelab-elements.css net::ERR_ABORTED 403
GET https://storage.googleapis.com/codelab-elements/prettify.js net::ERR_ABORTED 403
GET https://storage.googleapis.com/codelab-elements/custom-elements.min.js net::ERR_ABORTED 403
GET https://storage.googleapis.com/codelab-elements/native-shim.js net::ERR_ABORTED 403
GET https://storage.googleapis.com/codelab-elements/codelab-elements.js net::ERR_ABORTED 403
Same. We're seeing the same errors on our site as well. Any updates/pointers will be very much appreciated. Thanks!
Here a temporary work around:
To work around this problem, in your index.html file, change occurrences of:
https://storage.googleapis.com/codelab-elements
to
https://storage.googleapis.com/codelab-elements-tmp
Note the "-tmp" suffix is the only change.
Please read the conversation with Marc on Google groups : https://groups.google.com/g/codelab-authors/c/WwSdRF4bjBE/m/tA96pyWOEAAJ
Note, if you are able to host these assets yourselves, you can re-export your codelabs as claat export -prefix <url-to-your-assets> <codelab>
to get it working again.
Any update on this issue? I rather not apply the -tmp fix. Is there actually working someone on this solution?
if you've already uploaded the bundle you've got after building, you'll find those files under elements/codelab-elements
.
You just need need to point to them instead of using https://storage.googleapis.com/
Just replace any occurence of:
https://storage.googleapis.com/codelab-elements
by
[your-domain-name]/elements/codelab-elements
in all your codelabs using an editor
or you can use claat to re-export/update your codelabs using the option --prefix
$ claat export your_file.md --prefix [your-domain-name]/elements
I hope this may help :)
Thanks @khammami, I'll read into this.
@khammami replacing the references in the files directly works, but in best case I want to do that in the first place by your -prefix
-thingy . I have tried implementing it in this Github Actions, but it fails with a cryptic error. How would I update it? Any idea? Thanks a lot!
@khammami replacing the references in the files directly works, but in best case I want to do that in the first place by your
-prefix
-thingy . I have tried implementing it in this Github Actions, but it fails with a cryptic error. How would I update it? Any idea? Thanks a lot!
@beniroquai try to export your codelabs without -prefix
then iterate over codelabs folders and update them with claat
one by one
example claat update
for a codelab based on your github action:
$ cd uc2-tutorial-discoverykit
uc2-tutorial-discoverykit$ claat update -prefix "https://openuc2.github.io/elements/elements"
I tested both command locally they work for me, may be because I'm using an old version of claat that I compiled by myself.
In your github action I don't know why it ask for authorising claat app while exporting. usually it ask when you try to export a google doc.
Thanks @khammami for your help. I'll try that directly.
fixed in v2.2.5
Hi @mco-gh, thanks for taking the time to address this issue.
For me it's not working unfortunately. I see the patch to reference the static assets from claat-public
, however for me the latest claat
version still places the affected files inside elements/codelab-elements
.
I was building my codelabs with claat export -prefix "/elements" "$filename"
which worked fine in 2.2.4.
can you run claat version
for me?
@andybeeching Just rename this folder to claat-public
and replace any occurence of codelab-elements
here to claat-public
(line 131 & 211)
@khammami Thank you, this worked. Worth checking what this might break in the future regarding updates but it worked for now and is easily reversible.
@stefanhoth you're welcome. you may also change it in claat and build your own custom claat or it could be a feature request for @mco-gh to add an option like -prefix
for custom path
hello,
I'm generating codelabs using claat and everything worked well but as of today I've started getting
when trying to access: https://storage.googleapis.com/codelab-elements/native-shim.js
can you give me some pointers please? thanks