microsoft / pxt-microbit

A Blocks / JavaScript code editor for the micro:bit built on Microsoft MakeCode
https://makecode.microbit.org
Other
727 stars 638 forks source link

Can't use private GitHub repos with languages other than English #5389

Closed martinwork closed 4 months ago

martinwork commented 1 year ago

Describe the bug

Arising from support ticket https://support.microbit.org/helpdesk/tickets/68418 (private)

When using a language other than English (e.g. Slovak, German, French, Spanish), a project saved in a private GitHub repo cannot be imported, after the project has been deleted from the browser cache.

A project saved to a private repo in another language cannot be imported with English selected. A project saved to a private repo in English can be imported with another language selected. Changing a private repo to public allows it to be imported.

[Edit: Tests by @novomestan show that changing to public does not always allow import straight away, but seems to after a few minutes,]

There is no error message, but the browser console has this extra message. image

Related: https://github.com/microsoft/pxt-microbit/issues/4133 https://github.com/microsoft/pxt-microbit/issues/4873

To Reproduce Steps to reproduce the behavior:

  1. Change to a language other than English
  2. Create a new project
  3. Save to GitHub, selecting private repo
  4. Delete project
  5. Import from GitHub

Expected behavior Private repos can be used in any language.

micro:bit version (please complete the following information): not hardware related

Desktop (please complete the following information):

novomestan commented 1 year ago

A project saved to a private repo in another language cannot be imported with English selected. A project saved to a private repo in English can be imported with another language selected. Changing a private repo to public allows it to be imported.

Regarding sentences "Changing a private repo to public allows it to be imported". It's done differently for me - if I set the repository to "private" now or later, it's never possible to import from Github even after changing it to "public". Because of this, I now have several projects stuck on Github and no way to get them back to makecode.microbit.org. (probable way - identify the project source code from the repository and rebuild it at makecode.microbit.org)

martinwork commented 1 year ago

@novomestan Can you share an example that fails to import even when changed to public? I can import https://github.com/novomestan/experiment-slovak with language set to Slovak. I tried both Import/Import URL, and my fork https://github.com/martinwork/experiment-slovak using Import/Your GitHub repo.

Could it be related to the blocks in the project, and/or the translation errors?

image

Your code can probably be copied from main.ts. Create a new project, add extensions, and copy and paste main.ts code.

novomestan commented 1 year ago

@martinwork The project cannot be imported even after changing it to public. That still applies. But I started experimenting again and found that after changing from private to public, the import doesn't work for a few minutes, but after a few minutes it does. It's strange behavior. So yes, you can import a public project, but only after a few minutes after changing from private to public. The change to public is reflected immediately, only the import is functional only after a few minutes. So this is how I can import my projects again. Thanks for the direction. The private project still cannot be imported.

martinwork commented 1 year ago

Thanks for figuring that out @novomestan ! I've edited above.

abchatra commented 9 months ago

This repros with microsoft/arcade-tile-util

martinwork commented 4 months ago

Thanks @srietkerk !

srietkerk commented 4 months ago

Yeah, I will make sure to bump this in beta. Let me know if there are still issues with this.