Unable to Perform Local Mendix Native Mobile Testing

0
Good day, I’ve recently upgraded from Mendix 9.6.7 to Mendix 9.12.0. The upgrade went smoothly, however when attempting to test my ANDROID native app on my mobile device when scanning the QR code, I get the following screen:   The application and mobile device are on the same network. I’ve tried various networks, but none have worked to this point. I’ve reinstalled Mendix 9 Make It Native I’ve redownloaded the branch. I’ve tried to run the application and open it with OTA ticked and not ticked. I recently ran the app on the using Mendix 9.6.7 and could test the native app, so this eliminates a firewall issue.   I’m going to try on a fresh app to see if the app is the issue only links to Mendix 9.12.0. I’m also going to try run the app on 9.11.1.   However, if you have encountered this same issue, please let me know.
asked
3 answers
0

I’ve encountered this a few times with 9.10.1. It feels pretty unstable to me. Have you checked the deployment logs? Have a look at the deployment/logs/native_packager_log text file, there may be a clue there. Things I’ve tried (not all at once) which worked in the past:

  1. Got rid of firewall rules
  2. Cleaned the deployment directory (make sure you don’t lose your local database if you’re using the in-built one!) and re-ran the project
  3. Stopped the project, killed the watchman process in Task Manager and re-ran.
    • As far as I can tell, watchman is some sort of process that runs in the background to monitor any re-runs of the project and automatically refresh your Native app. This doesn’t seem to always shut down properly when you stop running a project – so when you want to run another one after, it messes up the deployment

  1. Restart PC

 

Hope this helps.

Cris

answered
0

Thanks for your response. Definitely helped me.

Watchman is definitely causing an issue, but I am not sure if it the main reason.

[Error] jest-haste-map: Watchman crawl failed. Retrying once with node crawler.
[Error]   Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project.

I did what it suggested above, but then I got the following error and the native application was even more inaccessible than before:

[Error]   Error: Watchman error: RootResolveError: unable to resolve root C:/Users/.../MxProject: failed to parse json from C:/Users/.../MxProject/.watchmanconfig: '[' or '{' expected near end of file. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.
[Error] C:\Program Files\Mendix\9.6.7.35942\modeler\tools\node\node_modules\metro-hermes-compiler\src\emhermesc.js:81
[Error]           throw ex;
[Error]           ^

[Error] Error: RootResolveError: unable to resolve root C:/Users/.../MxProject: failed to parse json from C:/Users/.../MxProject/.watchmanconfig: '[' or '{' expected near end of file

[Error]     at BunserBuf.<anonymous> (C:\Program Files\Mendix\9.6.7.35942\modeler\tools\node\node_modules\fb-watchman\index.js:95:23)
[Error]     at BunserBuf.emit (events.js:315:20)
[Error]     at BunserBuf.process (C:\Program Files\Mendix\9.6.7.35942\modeler\tools\node\node_modules\bser\index.js:292:10)
[Error]     at C:\Program Files\Mendix\9.6.7.35942\modeler\tools\node\node_modules\bser\index.js:247:12
[Error]     at processTicksAndRejections (internal/process/task_queues.js:75:11)
[Error] Emitted 'error' event on WatchmanWatcher instance at:
[Error]     at Client.<anonymous> (C:\Program Files\Mendix\9.6.7.35942\modeler\tools\node\node_modules\jest-haste-map\build\lib\WatchmanWatcher.js:172:10)
[Error]     at Client.emit (events.js:315:20)
[Error]     at BunserBuf.<anonymous> (C:\Program Files\Mendix\9.6.7.35942\modeler\tools\node\node_modules\fb-watchman\index.js:107:12)
[Error]     at BunserBuf.emit (events.js:315:20)
[Error]     at C:\Program Files\Mendix\9.6.7.35942\modeler\tools\node\node_modules\bser\index.js:249:12
[Error]     at processTicksAndRejections (internal/process/task_queues.js:75:11) {
[Error]   watchmanResponse: {
[Error]     version: '4.9.4',
[Error]     error: "RootResolveError: unable to resolve root C:/Users/.../MxProject: failed to parse json from C:/Users/.../MxProject/.watchmanconfig: '[' or '{' expected near end of file"
[Error]   }
[Error] }

After I removed the .watchmanconfig file the application ran successfully. 

 

But despite this, I can still not access the application. Watchman is also not running at all.

[Error] jest-haste-map: Watchman crawl failed. Retrying once with node crawler.
[Error]   Usually this happens when watchman isn't running. Create an empty `.watchmanconfig` file in your project's root folder or initialize a git or hg repository in your project.
[Error]   Error: Watchman error: query failed: synchronization failed: root dir was removed or is inaccessible. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting.

 

I also cleared the deployment directory, and I can’t count the number of times I’ve restarted.

I’m also in contact with our IT department to check if the firewall is causing an issue.

answered
0

Hi Brent,

I have also faced similar issue, and my issue was fixed by doing a small change in wifi properties. I just changed the network profile to private from public and this solved the issue.

Not sure whether this helps in your case, but please try

Thanks

answered