- changed status to open
Unable to update library (project shared via project url)
Sharing MicroBlocks projects via url is very popular among users, and people can embed it in teaching content or blog posts.
There are two styles of URLs:
-
long url, obtained by clicking "Copy project url to clipboard"
-
short url(I often use it in my blog posts.), by putting the project in the cloud, then piecing together: https://microblocks.fun/run/microblocks.html#project=https://wwj718.github.io/post/img/test.ubp
They currently face a common problem: when the libraries is upgraded, it will corrupt the project. This is a serious problem, it will make many shared projects stop working.
for example, click the link,
A prompt will appear in the IDE:
Found a newer version of LED Display Do you want me to update the one in the project?
click "yes", project code will disappear
Download this file(https://wwj718.github.io/post/img/test.ubp) locally and manually drag it into the IDE(https://microblocks.fun/run-pilot/microblocks.html) , and everything will work fine.
Comments (10)
-
repo owner -
repo owner Is the test project this script:
For me, updating the project to use the new version of the LED Display library appears to work as expected -- although I did not actually run the script. What are the symptons that you are seeing?
-
repo owner Rather curiously, I'm seeing different behavior in the Chrome and Safari browsers. In Safari, the project loads and I see the script whether or now I choose to update the library. In Chrome, I do NOT see the script in either case. So this behavior may be somehow related to Chrome.
-
reporter
Hi John, is this the URL you opened?
I can't see the script in Safari or Chrome.
safira
chrome
-
reporter my safari version: 17.3.1
macos: 14.3.1 (M1)
-
repo owner My Safari is 17.1, somewhat older. I think Safari and Chrome are both based on Webkit so some recent change may have broken something. It seems to be recognizing that the project uses the LED Display library, so it must be getting some of the data, but for me the script is missing when I open the project in Chrome but not from Safari or Firefox.
-
repo owner Does it open for you in other browsers (e.g. Firefox)?
I'm on vacation through July 15 so I won't have time to dig into this in detail until I get back.
-
repo owner One possible explanation is that the downloaded project data is being corrupted or decoded incorrectly. To test that theory, one could might modify the IDE to write the downloaded file to the Javascript console line by line and look for anything strange.
-
reporter It seems to be recognizing that the project uses the LED Display library, so it must be getting some of the data
I agree with this inference.
but for me the script is missing when I open the project in Chrome but not from Safari or Firefox.
Does it open for you in other browsers (e.g. Firefox)?
My situation is different: the script is missing when I open the project in Chrome (126.0.6478.115) and Safari(17.3.1) but not from Firefox (127.0.2).
-
repo owner That's consistent with the theory that a change to the WebKit browser codebase is making the script fail to appear in Chrome and Safari 17.3.1. We are seeing correct behavior (script appears) in Firefox and in my older version of Safari.
Bottom line: This problem was introduced by a change in the WebKit browser code base, not by a change in the MicroBlocks code.
My guess is the downloaded project file is being changed in some way that causes the "script" entry to not parse correctly. I'm traveling this week but will investigate further when I return next week.
- Log in to comment