Mendix 8 app

2
I’ve followed the instructions for packaging native apps using native builder. Build process worked, created a .zip file with an apk in it inside the build folder. I’ve sideloaded the apk onto an Android phone. When I start the app I’m greeted with a black background and a blank white square in the foreground, not the “Welcome to your new app” message that’s part of the Native Mobile Quickstart template. Can anyone suggest what has gone wrong?  
asked
9 answers
1

Hey Mark, 

Stefanos here from the Native ALM team. We are looking into it.

But first, I just want to make sure the that you used the correct runtime-url. If you run in Mendix cloud please set this to be the full URL (https://*) provided by Sprintr. If you are running against your local machine you need to approach it differently. 

If you plan on testing on an emulator; the default Android emulator requires the URL to be 10.0.2.2:8080.
If you plan on testing your app on a physical device, consult your network settings for your machine’s local IP, the one where Mendix is running. 

Regards

answered
0

An update to the issue. 
We identified an issue with the Native Template splash screen on Android and has been fixed. 
If you would like to give it another go; given that you have a very basic app; delete your fork on Github and re-run Native Builder. That will re-create your fork and make sure you have the latest changes of Native Template. 

Regards

answered
0

Hey Stefanos,

Thanks for the update, I will do what you have suggested and give it another go.

My runtime-url value is set to: --runtime-url nativemobilequicks151-sandbox.mxapps.io

Does this need to have a https:// prefixed?

The native builder instructions online doesn’t have a https:// 

answered
0

Also: I deleted the fork on Github and re-ran Native Builder.

Received the following messages:

[github] verifying access token

[github] invalid access token

[github] forking mendix/native-template…

[github] Unable to create the fork: the access token needs access to the “repo” scope

 

Just checked and the access token does still have access to the repo scope, that hasn’t changed since Friday.

 

answered
0

Hey Mark,

Regarding your first question; indeed it needs the https:// prefixed. Otherwise it tries to connect to http which won’t work. I will discuss with our technical writer and update our documentation to stress that point. 

Regarding your Github API key issue. The Native Builder attempts to authenticate you with Github with the given API token. If for some reason that fails with anything else than a 200 response the tool assumes you have no access and fails. As it tries to do so gracefully it attempts to continue execution. At the moment I can only make an educated guess on what happened:

  1. Token is miss typed ( you validated it’s not).
  2. Github was having some issues; very generic but I can’t go into details given the logs are limited.

For that reason I would suggest to try again and if it fails attempt to create a new API token and use that. 

Your feedback and your dedication in working with our tool is appreciated; we are keeping notes.

Regards

answered
0

Hi Stefanos,

I generated a new Git API key and added it to the native-builder command line, unfortunately I’m receiving exactly the same error message as above. The access token is invalid.

Why is it that deleting the fork in Git has completely stopped the native-builder process from working? 

 

answered
0

Mystery solved; the firewall I work behind was preventing communication with Github.

As soon as I used a different connection the native-builder process worked fine and I’ve been able to produce a fresh Android apk.

I’ve installed the latest .apk onto an Android phone and I’m now seeing the landing page: “Welcome to your new native mobile app”.

A previous build just had a blank white screen but then I remembered that I hadn’t uploaded the latest version of the app from Studio Pro to the Mendix cloud; I did this and now the app is working. You may want to point this out in your documentation because while it seems obvious now it didn’t at the time.

Questions:

  1. Why is the .apk file consistently called app-debug.apk, rather than something that has been specified in the native-builder command line (such as --app-identifier or --app-name)?
  2. Going forwards, as I add functionality to the app in Studio Pro do I need to always make sure I upload the latest version to the Mendix cloud before running native-builder?
  3. Can I have a Mendix 8 Beta Tester badge on my Mendix profile please?
answered
0

Happy you got it working! Thanks for bearing with it.

Regarding your questions: 

  1. Why is the .apk file consistently called app-debug.apk, rather than something that has been specified in the native-builder command line (such as --app-identifier or --app-name)?

    The Android build uses by default the name of the module being build. In the case of the native template it is called app. 
    Good suggestion we will look into it. 

     
  2. Going forwards, as I add functionality to the app in Studio Pro do I need to always make sure I upload the latest version to the Mendix cloud before running native-builder?

    A general rule of thumb is that if you modify things that affect your runtime as as for example micro flows or entities you should always deploy. 
    For simple things like a button being added to a page or a style change you could mostly skip it. 
     
  3. Can I have a Mendix 8 Beta Tester badge on my Mendix profile please?

    I asked design to get on it.

 

Regards

 

answered
0

One more thing…

Why does it take so long for Mendix 8 to finish indicating that it has deployed to the Mendix cloud?

I’m testing on a free app so it deploys to the sandbox environment which I’m not expecting to be rocket powered but even so… I can check the log file and see that the app has deployed, tags created etc. but the indicator in Mendix Studio is still spinning 10 or 20 minutes later.

Is this a known bug?

answered