Native Builder prepare command fails at creating the github repo

0
  Hi Gurus,   i’m trying to build a native mobile package for the first time, but the creation of the github repo fails. i’ve tried many combination for the mendix version argument : 8.13 / 8.13.1 etc… i’ve removed the names in the code below, but it’s just one word, lower case, no space, no special char…   Any ideay about this error ?  422 Unprocessable Entity Updating ref heads/master for repository NicolasBRUNAUD/<removed>... [github] Unable to update ref heads/master for repository NicolasBRUNAUD/<removed>       _ _ _ _ ____ _ _ _ | \ | | __ _| |_(_)_ _____ | __ ) _ _(_) | __| | ___ _ __ | \| |/ _` | __| \ \ / / _ \ | _ \| | | | | |/ _` |/ _ \ '__| | |\ | (_| | |_| |\ V / __/ | |_) | |_| | | | (_| | __/ | |_| \_|\__,_|\__|_| \_/ \___| |____/ \__,_|_|_|\__,_|\___|_| [github] Verifying access token... [github] Access token valid for NicolasBRUNAUD [github] Retrieving repository NicolasBRUNAUD/<removed>... [github] Repository NicolasBRUNAUD/<removed> could not be found... [github] Retrieving Native Template version for 8.13 [github] Retrieving contents of file mendix_version.json... [github] Creating new repository <removed> from template mendix/native-template... [github] Downloading archived repository ref tags/v5.0.2 from mendix/native-template... [github] Creating new repository, <removed> for NicolasBRUNAUD... [github] Creating git tree items for new repository... [github] Creating new tree... [github] Creating new commit on NicolasBRUNAUD/<removed> with sha ee619cfc9896bb3ea8fd7918b7625b74d913a2d7... [github] Updating ref heads/master for repository NicolasBRUNAUD/<removed>... [github] Unable to update ref heads/master for repository NicolasBRUNAUD/<removed> [github] Unable to create new repository from template repository [github] Please delete your repo manually and try again [github] Repo url: https://github.com/NicolasBRUNAUD/<removed>/settings { HttpError: Reference does not exist at fetch.then.response.text.then.message (X:\snapshot\native-oven\node_modules\@octokit\request\dist-node\index.js:66:23) at process._tickCallback (internal/process/next_tick.js:68:7) name: 'HttpError', status: 422, headers: { 'access-control-allow-origin': '*', 'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset', connection: 'close', 'content-length': '122', 'content-security-policy': 'default-src \'none\'', 'content-type': 'application/json; charset=utf-8', date: 'Fri, 02 Oct 2020 07:47:50 GMT', 'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin', server: 'GitHub.com', status: '422 Unprocessable Entity', 'strict-transport-security': 'max-age=31536000; includeSubdomains; preload', vary: 'Accept-Encoding, Accept, X-Requested-With', 'x-accepted-oauth-scopes': 'repo', 'x-content-type-options': 'nosniff', 'x-frame-options': 'deny', 'x-github-media-type': 'github.v3; format=json', 'x-github-request-id': 'C79E:E401:1FA63FA1:25BEE874:5F76DB26', 'x-oauth-scopes': 'repo', 'x-ratelimit-limit': '5000', 'x-ratelimit-remaining': '3815', 'x-ratelimit-reset': '1601625255', 'x-ratelimit-used': '1185', 'x-xss-protection': '1; mode=block' }, request: { method: 'PATCH', url: 'https://api.github.com/repos/NicolasBRUNAUD/<removed>/git/refs/heads/master', headers: { accept: 'application/vnd.github.v3+json', 'user-agent': 'octokit.js/16.28.7 Node.js/10.15.3 (Windows 10; x64)', authorization: 'token [REDACTED]', 'content-type': 'application/json; charset=utf-8' }, body: '{"sha":"3375282247e25158c6bd26b4720a7552cb5b2dec","force":true}', request: { hook: [Function: bound bound register], validate: [Object] } }, documentation_url: 'https://docs.github.com/rest/reference/git#update-a-reference' } set native_builder_path=%~dp0.\Native Builder\native-builder-v3.2.0 set JAVA_HOME=C:\Program Files\AdoptOpenJDK\jdk-11.0.3.7-hotspot set mxbuildpath=C:\Program Files\Mendix\8.13.1.5182\modeler\mxbuild.exe set githubaccesstoken=<removed> set appcenterapitoken=<removed> set appcenterorganization=NicolasBrunaudDemo set mendixversion=8.13 set projectname=<removed> set projectpath=D:\_MendixProjects\<removed>-main\<removed>.mpr set runtimeurl=https://<removed>-sandbox.mxapps.io set appname=<removed> set appidentifier=com.mendix.<removed> cd /d "%native_builder_path%" set prepare_full_command=native-builder.exe prepare --verbose --project-name "%projectname%" --java-home "%JAVA_HOME%" --project-path "%projectpath%" --mxbuild-path "%mxbuildpath%" --github-access-token %githubaccesstoken% --appcenter-api-token %appcenterapitoken% --appcenter-organization "%appcenterorganization%" --runtime-url "%runtimeurl%" --app-name "%appname%" --app-identifier "%appidentifier%" --mendix-version %mendixversion% echo %prepare_full_command% echo. %prepare_full_command%  
asked
2 answers
1

We are aware of the issue and it comes from GitHub renaming the master branch to main from October 1st onwards.
We are working on releasing a new CLI.

Meanwhile, when creating a project, please manually rename your main branch to master and re-run `prepare`.

Regards.

answered
0

I am using Mendix 8.15.2 and downloaded Native Builder v3.2.2.

In GIT a repo is created with default branch: main

Tried over and over, but keep getting the same error. 

[github] Verifying access token...
[github] Access token valid for <removed>
[github] Retrieving repository <removed>...
[github] Skipped creation of repository <removed> as it already exists
[github] Retrieving Native Template version for latest
[github] Retrieving Native Template version for 8.15.2
[github] Retrieving contents of file mendix_version.json...
[github] Creating new repository <removed> from template mendix/native-template...
[github] Downloading archived repository ref tags/v5.1.1 from mendix/native-template...
[github] Retrieving repository <removed>...
[github] Creating git tree items for new repository...
[github] Creating new tree...
[github] Failed to create tree
[github] Unable to create new repository from template repository
[github] Please delete your repo manually and try again
[github] Repo url: https://github.com/<removed>/<removed>/settings

 

answered