Salesforce

Mobile Troubleshooting (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Mobile Troubleshooting (Magic xpa 3.x)

Q1

When building the Android client, the build fails. What can I check?

A1

There are several reasons that the Android build will fail.

Make sure that the platform you defined is as mentioned in the Compatibility Guide.

In the output folder that you chose (in the Deployment files folder property) there's a folder called Android\source and you can run the build process manually from this folder by opening a command prompt and running the build.cmd file. You can then see any errors that occurred when trying to build the Android client.

Possible errors that you might encounter:

  • 'powershell' is not recognized as an internal or external command

    In this case, find the path where the powershell is installed and copy it into the build.cmd file. For example, you would add the following to the file:

C:\Windows\System32\WindowsPowerShell\v1.0\powershell Set-ExecutionPolicy RemoteSigned

C:\Windows\System32\WindowsPowerShell\v1.0\powershell -File build.ps1

  • ERROR: JAVA_HOME is set to an invalid directory

    You can manually define the path for the JDK in the build.cmd file. You do this by removing the word rem from the line with the JAVA_HOME path and, if necessary, changing it to the correct path. For example: SET JAVA_HOME=C:\Program Files (x86)\MSE\Java\jdk1.7.0_80.

  • The SDK directory 'C:\Program Files\Android\android-sdk' does not exist

    You can manually define the path for the SDK in the settings.properties file, which is located in the RIAModules\Android\Source folder.

  • The 'C:\TEMP\android\test.keystore' specified for property 'signingConfig.storeFile' does not exist

    You can manually define the path for the keystore in the settings.properties file, which is located in the RIAModules\Android\Source folder.

If you use the RIA Deployment Builder to build the client, you should make these changes in the build.cmd file that is located in the RIAModules\Android\Source folder. This way, the changes will apply the next time you run the builder.

Q2

When I have a Tab control on an Android and iOS app, why isn't the app working properly?

A2

Make sure that the Item List property and the Display List property have an identical number of entries or that the Display List property is blank (if you don’t want to see captions on the tabs).

Q3

Why is it taking a long time to load my mobile application when there are files in the assets folder?

A3

Most likely the dates of the internal files in the servers’ RIA cache folder are different than the dates of the files in the assets folder. You can verify this by opening your mobile package (APK, IPA and APPX) using an archive extraction software, such as 7-zip.

Then, in the package, navigate to the assets folder and view the cachelist.txt file. This file is generated during the build process.

Each line in the file contains the resource file name and its timestamp. You should verify that the timestamp in the file is equal to the modification timestamp of the file in the servers’ RIA cache folder.

If the timestamps are different, re-copy the resource files from the servers’ RIA cache folder to the assets folder while making sure that the modification timestamp is not changed.

Q4

Why am i seeing the "NSInvalid argument exception" error when calling native code?

A4

This error means that the wrong attribute type was passed to a function on a mobile device.

Q5

Why am i seeing the "Unrecognized selector sent to class" error when calling native code?

A5

This error may appear when using the ClientNativeCodeExecute function to call a class that doesn't exist.

Q6

When working with Android and iOS devices, why does the client fail to connect to the Web server that is serving the RIA application?

A6

There are several scenarios where this problem can occur:

1. The mobile device fails to communicate with the Web server.

In this case, in the Broker or Space Monitor, you will not see any requests or any connection indication in the Web server log.

a. If the communication is done using WiFi, verify that the device is connected to the correct WiFi router.

b. Try connecting from the device browser to the Web server.

For example: http://192.168.137.1/MagicScripts

If you do not get any response, then your Web server is not configured properly or your firewall is blocking the communication. Try to enable inbound http/https communication in the firewall rules. If the problem remains, try to disable the firewall completely. If you can connect from a browser to the web server or if your application is now working, then you can enable it again and make sure that the firewall enables inbound connections on port 80/443.

To enable port 80: In the Control Panel go to Windows Firewall > Advanced settings > Inbound Rules. Open World Wide Web Services (HTTP Traffic-In) and select Enabled.

2. The client application failed to connect to the server using the connection settings defined.

In this case, you will not see any requests in the Broker Monitor but you will see the access to the server in the Web server log.

a. Check that the execution.properties file is in ANSI format.

b. Check that all the attributes in the execution.properties file have the correct value (case sensitive).

c. If the settings.properties file contains a URL attribute with reference to an external execution file, check that:

* The external file can be accessed from the mobile device. You can check it by entering the same URL value on a browser on the device.

* The external file is in ANSI format and all the attributes in this file have the correct value (case sensitive).

d. Verify that the Magic xpa RIA server is up and is running the project defined in the settings properties.

To check your file on Windows desktop, you can rename the file to execution.properties, place it in the %EngineDir%\RIAModules\Desktop folder and run the MgxpaRIA.exe application in that folder. If everything is properly defined, the RIA application should start on the Windows client.

Q7

When working with an Android or iOS device on Vista OS with IIS 7, why am I getting the "mgrqispi.dll - This method was pruned during dead code elimination" error?

A7

1. Enable the IIS 7 request tracing.

Check the IIS logs on your machine, and also enable the request tracing.

IIS 7 troubleshooting : http://www.trainsignaltraining.com/iis-7-troubleshooting/2008-07-09/

Use the Configuration Pannel/ Add Remove Programs/ enable or disable Windows options and there you will find the modules mentioned in the "tracking" guide (health and diagnostics, tracing, etc).

Once you finish installing this module you will be able to see the new icon "Failed Request Tracing Rules" in the IIS 7 settings.

Also, you can already check the IIS 7 logs using the "Logging" icon in the IIS 7 settings.

Note: On the Vista machine, the log files were located in the folder "C:\inetpub\logs\LogFiles\W3SVC1"

2. Reproduce the error.

3. Check the error message in IIS 7.

"Site 1

Process 6028

Failure Reason STATUS_CODE

Trigger Status 401.2

Final Status 401.2

Time Taken 0 msec

Url http://fml102:80/MagicScripts/MGrqispi.dll?RICHCLIENT=Y&UTF8TRANS=Y&CTX=9135957310680&SESSION=1&CTXGROUP=9135957310680

App Pool DefaultAppPool

Authentication NOT_AVAILABLE

User from token

Activity ID {00000000-0000-0000-1700-0080010000FF}

ModuleName IIS Web Core

Notification 2

HttpStatus 401

HttpReason Unauthorized

HttpSubStatus 2

ErrorCode 2147942405

ConfigExceptionInfo

Notification AUTHENTICATE_REQUEST

ErrorCode Access is denied. (0x80070005)

"

This error seems to be related to the authentication settings you have in IIS.

Check the following:

* Whether anonymous authentication is enabled

* What settings are used for the anonymous identification

4. Fix the IIS 7 error accordingly.

In the tested case, the error message was related to the fact that the Anonymous authentication was disabled in IIS 7 - default Website properties.

Therefore, this issue was solved by enabling the IIS 7 Anonymous authentication.

Q8

Why is the scrolling not working properly on mobile devices?

A8

The Hardware acceleration is set by default to True (since version 3.0). In some scenarios involving screens with scrollbars, you might see poor scrolling performance.

If this happens in your app, set the Hardware acceleration to False in the AndroidManifest.xml file located in the RIAModules\Android\Source folder.

Q9

Why am I getting a “Request Time Out” error when executing an iOS client?

A9

This can happen when the application is not registered to the server. This behavior is different than for Android devices, because for iOS devices the internal timeouts are different than in Android. Therefore, you might get this error instead of the Unavailable Server error.

Q10

Why do I get the following error when trying to install my application on an iOS 9 device: “iPhone Distribution: XXX.” Has not been trusted on this iPhone. Until this developer has been trusted, their enterprise apps will not be available for use?

A10

When installing an application on an iOS 9 device, if this application was compiled using an Enterprise account you need to specify on the device that you trust that account.

You do this as follows:

1. Go to Settings > General > Profile.

2. You should see the app listed on the screen. Tap on it.

3. Tap Trust <your application name>.

Q11

When building the Windows 10 Mobile client, the build fails. What can I check?

A11

This might happen when you changed images in the Assets folder. Check that the customized images have the same name and resolution as the original image.

Q12

I'm trying to install more than one Magic xpa application on the Windows 10 Mobile device, but I'm getting an error. What can I do to fix this?

A12

The uniqueness of the app on the Windows 10 Mobile client is determined by the PhoneProductId tag in the package.appxmanifest file. The Rich Client Deployment Builder sets the value for this tag based on the project GUID. So, when running the builder twice on the same app, it will get the same ID.

To solve this issue, you can manually change the product.id tag in the settings.properties file.

Reference
Attachment 
Attachment