Blog

Troubleshooting Mobile development & proxy service tiers

  • 18 January 2019
  • 0 replies
  • 86 views
Troubleshooting Mobile development & proxy service tiers
Userlevel 6
Badge +2
Troubleshooting
There is a small chance that you might run into some difficulty along the way. Since Mobile uses technologies that most developers at Thinkwise are not very familiair with, this troubleshooting chapter should help with the most common problems. Pinpointing the problem is the most important activity, since the vast majority of all problems have nothing to do with the mobile GUI but instead are caused by the proxy service tier, the model, the database or a setting in IAM.

'My service tier won’t run!'
If instead of an authentication pop-up an error page shows up, something could be wrong. However, if you entered correct credentials, you might get a 404-not found, because there is no website at this location.

Anything other but an authenticaton pop-up or a 404 should not happen. If the authentication pop-up keeps showing up even though you entered valid credentials, the database configuration might be wrong. Re-check the web.config and make sure the webserver can actually reach the database server.

If you get a 500-internal server error, there is definitely something wrong. To get more information about the error, you can change the following setting in web.config to true:


  • A parent web.config is present that messes up the service tier. This happens when a Web GUI is installed as the default web site and the service tier is deployed ‘under’ the web GUI.
  • ASP .NET is not installed for IIS. Check the installation manual.
  • Pooling account cannot reach the SF or IAM database.

'Why do I have so many reachable objects?'
When investigating the reachable objects, make sure you include the process flows. Process flows included in mobile require those objects to be accessible in mobile. This can introduce a lot of reachable objects.

Look-up sources, both direct and resolved, are also marked as reachable, else the GUI wouldn’t be able to load the translations. however, look-up sources do not introduce further reachable objects themselves unless the pop-up is enabled.

I get an error during generation!
Any error that occurs during generation should be identifiable by checking the validations. If you run into an error with all validations green, contact Product Innovation.

Generation is taking very long!
Limiting the reachable objects helps a lot with generation performance. If generation times are getting out of hand, consider unlinking the CSHARP_SERVICE_TIER base project while you are not working on mobile.

My service_tier folder doesn’t show up!
If no folder is opened when you pressed the big button to compile, there’s a fat chance the compilation of the service tier went wrong somehow. Best thing to do is running it manually. Go to the project folder, open the \Source_code\Csharp\ folder and run build.bat. If you see white and yellow text, it’s all good, but red text is a problem. This can have many causes, most of which are actually covered by validations.

‘The server returned an unexpected result: status code 404’ on login!
Check the server URL and the meta server URL. One of them is probably incorrect. When using IAM, the server URL is located at the application.

‘The username and password combination is incorrect’ on login!
Well, maybe you typed the wrong password? If trying again doesn’t help, either the SF or IAM service tier or the product service tier has an incorrect database configuration. If pooling is used, the pooling configuration or IAM database could be set wrong.

To check which service tier causes the problem, run the Mobile GUI in debug mode using debug.bat and check the Network tab. The service that blocks access is shown with a 401 status. Click this request and check the headers-tab. This shows which service tier is blocking access.


'The Mobile GUI says ‘An unknown error occurred’ on login!'
First, check your login settings. It’s possible to mix up the meta-service tier and the product service tier.

If this is not the case, try to run the Mobile GUI in debug mode using debug.bat and check the Network tab.

If there is no red text when the error occurred, there is a chance that your model or product contains some invalid characters not supported by XML. Set the following web.config property to true in both your SF or IAM service tier and your product service tier. This does cost quite a bit of performance, but investigating the character that causes the issue might be a bit too much for this blog.


If there is red text in the network tab when the error occured, there are quite a few issues that could cause this.

  • The service tier could be sleepy, it could be a timeout. Especially if the request took long. Try again a few times.
  • If this doesn’t help, generate the project again and redeploy the service tier, in case someone forgot to deploy a change or didn’t write files to disk.

If the error persists, check where the error occurs by checking the Request URL in the headers, see the image at the previous troubleshooting topic. It might be

'The Mobile GUI says ‘An unknown error occurred’ on opening a table!'
Try to run the Mobile GUI in debug mode using debug.bat and check the Network tab.

If there is no red text when the error occurred, there’s a chance that you set your proxy service tier for the application towards the IAM service tier instead of your product service tier. Check the request URL and update the proxy address at the application in IAM (you can do this by opening the database look-up).

It is also possible that your service tier address is right, but the DLL’s deployed on the server are are actually the IAM DLL’s and not the product DLL’s. Re-check the deployed service tier and the physical application path in IIS.

If there is no red text and you are sure the proxy service tier address is correct, there is a chance that your product contains some invalid characters not supported by XML, as mentioned earlier. Set the following web.config property to true in your product service tier.


If there is red text, turn on detailed information for the error by setting the following web.config option to true:


This should provide you with the query that causes the error. The query can be used to determine the underyling problem.

If the error is something like ‘Invalid column name – employee_name’ and the query contains a prefilter ór the query contains an expression field, be extra wary. It is very important that expressions and prefilters use a t1-prefix for the fields that refer to the main table and use a different prefix for the other tables. The following example, brought to you by my amazing MS-Paint skills, shows the difference between a good prefilter and a bad prefilter.


Always use aliases for all tables and always refer to the main table as t1.

'My settings are gone after I clear the Mobile GUI cache!'
If you want to set the default settings of the GUI or configure more advanced options (kind-of like INI-parameters), you can go to the folder \Electron\resources\default_app\www\js\ and create a file named CustomConfig.js (case-sensitive). This file is used to create a JSON configuration for mobile. For example:


'I don’t see any data (and I’m working offline)'
Open debug and press the refresh button. From here, check the section about ‘An unknown error occurred’ on opening a table.

0 replies

Be the first to reply!

Reply