Native Builder failing for Android

0
I’m trying to create a native android app for an application my company has developed.  I’m attempting to create the Git Repo and then follow it with a Local Compilation of the package, i.e. there’s no AppCentre involved in my workflow at the moment. The script I’m using to prepare the package (hands up, it’s based on a script I saw on a similar forum post I read today from about a month ago) is shown below; @echo off set mxbuildpath=C:\Program Files\Mendix\8.18.4.17934\modeler\mxbuild.exe set githubaccesstoken=<removed> set mendixversion=8.14 set projectname=<removed> set projectpath=D:\mendix\<removed>\<removed>_v8.18.4\<removed>.mpr set runtimeurl=<removed> set appname=<removed> set appidentifier=com.auraq.<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% --runtime-url "%runtimeurl%" --app-name "%appname%" --app-identifier "%appidentifier%" --mendix-version %mendixversion% echo %prepare_full_command% echo. %prepare_full_command%   The output I’m getting from this is shown below; _ _ _ _ ____ _ _ _ | \ | | __ _| |_(_)_ _____ | __ ) _ _(_) | __| | ___ _ __ | \| |/ _` | __| \ \ / / _ \ | _ \| | | | | |/ _` |/ _ \ '__| | |\ | (_| | |_| |\ V / __/ | |_) | |_| | | | (_| | __/ | |_| \_|\__,_|\__|_| \_/ \___| |____/ \__,_|_|_|\__,_|\___|_| [github] Verifying access token... [github] Access token valid for jbroomfi [github] Retrieving repository jbroomfi/<removed>... [github] Repository jbroomfi/<removed> could not be found... [github] Retrieving Native Template version for 8.18.4 [github] Retrieving contents of file mendix_version.json... [github] Chose v5.1.10 of Native Template [github] Creating new repository <removed> from template mendix/native-template... [github] Downloading archived repository ref tags/v5.1.10 from mendix/native-template... [github] Retrieving repository jbroomfi/<removed>... [github] Repository jbroomfi/<removed> could not be found... [github] Creating new repository, <removed> for jbroomfi... [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/jbroomfi/<removed>/settings { HttpError: Not Found at fetch.then.response.text.then.message (Z:\snapshot\native-oven2\node_modules\@octokit\request\dist-node\index.js:66:23) at process._tickCallback (internal/process/next_tick.js:68:7) name: 'HttpError', status: 404, 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-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset', connection: 'close', 'content-encoding': 'gzip', 'content-security-policy': 'default-src \'none\'', 'content-type': 'application/json; charset=utf-8', date: 'Thu, 13 May 2021 17:18:34 GMT', 'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin', server: 'GitHub.com', 'strict-transport-security': 'max-age=31536000; includeSubdomains; preload', 'transfer-encoding': 'chunked', vary: 'Accept-Encoding, Accept, X-Requested-With', 'x-accepted-oauth-scopes': '', 'x-content-type-options': 'nosniff', 'x-frame-options': 'deny', 'x-github-media-type': 'github.v3; format=json', 'x-github-request-id': '5088:E100:2D1F4F:2E0FE6:609D5F6A', 'x-oauth-scopes': 'repo', 'x-ratelimit-limit': '5000', 'x-ratelimit-remaining': '4663', 'x-ratelimit-reset': '1620928914', 'x-ratelimit-resource': 'core', 'x-ratelimit-used': '337', 'x-xss-protection': '0' }, request: { method: 'POST', url: 'https://api.github.com/repos/jbroomfi/<removed>/git/trees', 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: '{"tree":[{"path":".github/workflows/android-build-custom-dev-app.yml","mode":"100644","type":"blob","sha":"4fcffdacb307189eb8307814071bc192fe027d03","url":"https://api.github.com/repos/jbroomfi/<removed>/git/blobs/4fcffdacb307189eb8307814071bc192fe027d03"},{"path":".github/workflows/ios-build-custom-dev-app.yml","mode":"100644","type":"blob","sha":"5717a36cceb5582487ef0160bba0b60f12fe044c","url":"https://api.github.com/repos/jbroomfi/<removed>/git/blobs/5717a36cceb5582487ef0160bba0b60f12fe044c"},{"path":".github/workflows/windows-test-npm-installation.yml","mode":"100644","type":"blob","sha":"a3760cdbd023eafb750959a3a2b49ed6f28770a9","url":"https://api.github.com/repos/jbroomfi/<removed>/git/blobs/a3760cdbd023eafb750959a3a2b49ed6f28770a9"},{"path":".gitignore","mode":"100644","type":"blob",   I have had this work earlier in the week where I successfully created an APK file and was able to push it into my emulator, but it’s been failing consistently for the past 48 hours.  I’m just starting out with native functionality on Mendix and initially thought that I was doing something wrong, but I’ve checked and re-run this a number of times and I can’t get past this at the moment. Things I’ve tried so far include; Removing the GitHub repo and re-creating it Retrying with a minimal set of parameters (made no difference) Using the Build Native Mobile App option in Studio Pro (also fails, likely the same issue) Rebooted the laptop (didn’t resolve this issue, but it cleared an immediate failure issue I was having with Node.js)   Any suggestions gratefully received!
asked
3 answers
1

have you check github token permission, does it able to create repo ? may try to make a new github access token with full permission and try again.

 

answered
0

I’ve tried updating the GitHub token, tried with different permissions and so far there’s no change in outcome.

I also tried creating the native app using the menu option in Studio Pro (using the build App for Distribution option) and I get an error as soon as I click the Build button there.  The native-builder log file in this second case isn’t that helpful in providing any additional context for the error.

As a test to exclude anything related to the solution, I created a very simple Native App using the starter template and walked through the same set of steps to create an Android APK file and was successful in this regard.  I was table to push the APK file into the emulator and test the app, which at least confirms that the build process I’m using is good.  The issue appears to be related to the solution I’m trying to generate the APK file for.

As I wasn’t getting very far with progressing this, in the end I logged a ticket with Mendix Support and will work it through with them.

I’ll come back and update this ticket when I know more.

answered
0

github scoped tokens are nt working, classic tokens are working 

answered