pxt-microbit icon indicating copy to clipboard operation
pxt-microbit copied to clipboard

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

Open martinwork opened this issue 2 years ago • 5 comments

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):

  • OS: [e.g. iOS] Windows
  • Browser [e.g. chrome, safari] Chrome
  • Version [e.g. 22]

martinwork avatar Nov 04 '23 14:11 martinwork

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)

novomestan avatar Nov 04 '23 19:11 novomestan

@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.

martinwork avatar Nov 05 '23 19:11 martinwork

@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.

novomestan avatar Nov 06 '23 07:11 novomestan

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

martinwork avatar Nov 06 '23 13:11 martinwork

This repros with microsoft/arcade-tile-util

abchatra avatar Feb 06 '24 18:02 abchatra

Thanks @srietkerk !

martinwork avatar Jul 09 '24 19:07 martinwork

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

srietkerk avatar Jul 09 '24 21:07 srietkerk