mendix / hybrid-app-base

This repository contains the core files needed to build a Phonegap package for your Mendix application
9 stars 14 forks source link

Online app default timeout of 5 second is causing client exception in the app #31

Closed romilgaurav closed 4 years ago

romilgaurav commented 6 years ago

Hi, the timeout in the app is changed to 5 seconds now.

https://github.com/mendix/hybrid-app-base/blob/master/src/www/scripts/app.js line 152 server: { timeout: enableOffline ? 30000 : 5000 },

Can this be increased to 30000 again? This will cause issue if the request is taking longer time or if we are uploding document of larger time. I have to build custom app every time and it fails many times in the process. Also, custom build causes other unwanted issues in the app.

KevinVlaanderen commented 6 years ago

Hi there.

That is actually not what we changed. The timeout used to be 5000 (5s) in all cases. We extended the period for offline apps, where more data needs to be uploaded. We are not comfortable with changing the timeout for all apps by default. In case there actually is a connection issue, the user would only get feedback after 30 seconds, instead of 5.

Perhaps it's better if we try and address the issues you're running into. Can you share some more details, please?

Cheers,

Kevin

romilgaurav commented 6 years ago

++ Rob Bond

Hi Kevin,

We have Hybrid app on Mendix, and we are calling few APIs in the app which take more than 10 seconds to respond. Also, we are having feature where we use camera to upload image to the app. Whenever it takes more than 5 seconds, we get connection error from client. [cid:image001.png@01D42D77.B1A6E510]

If we increase the timeout in entry.js to 30 seconds, this error stops coming.

// Increase the timeout dojoConfig.server.timeout = 30000;

But this cause new issue

  1. the built app now always points to production environment.

  2. I always have to do a custom build to increase the timeout.

We do not use offline features of the app. So while building, I don’t select “offline features” in Mendix home website.

Is there a way to increase default timeout of the app?

Thanks,

Romil Gaurav Software Engineer, Home Services, Sears Holdings Corporation Cell - +1 224 201 9944

From: Kevin Vlaanderen [mailto:notifications@github.com] Sent: Monday, August 06, 2018 3:54 AM To: mendix/hybrid-app-base hybrid-app-base@noreply.github.com Cc: Gaurav, Romil Romil.Gaurav@searshc.com; Author author@noreply.github.com Subject: Re: [mendix/hybrid-app-base] Online app default timeout of 5 second is causing client exception in the app (#31)

Enterprise Security Team Alert: This email originated from outside of the organization. Please use caution when opening messages from external sources.


Hi there.

That is actually not what we changed. The timeout used to be 5000 (5s) in all cases. We extended the period for offline apps, where more data needs to be uploaded. We are not comfortable with changing the timeout for all apps by default. In case there actually is a connection issue, the user would only get feedback after 30 seconds, instead of 5.

Perhaps it's better if we try and address the issues you're running into. Can you share some more details, please?

Cheers,

Kevin

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmendix%2Fhybrid-app-base%2Fissues%2F31%23issuecomment-410636912&data=02%7C01%7Cromil.gaurav%40searshc.com%7Ceb5b0c2c3294418b762608d5fb7a37c8%7C27e4c16803234463acad7e124b566726%7C0%7C0%7C636691424696641908&sdata=W%2BLBQEud736VZjdmcndR2Pu3ifymTD5wu%2B20OjH6oFc%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAbln8JM_NpOUOj6KWF2a6qBIgn58apC8ks5uOARCgaJpZM4Vvyrx&data=02%7C01%7Cromil.gaurav%40searshc.com%7Ceb5b0c2c3294418b762608d5fb7a37c8%7C27e4c16803234463acad7e124b566726%7C0%7C0%7C636691424696641908&sdata=d32%2B57TCEIi1CNhY3FHclBPh1j43qLKhDxt6qoa7nG4%3D&reserved=0.

This message, including any attachments, is the property of Sears Holdings Corporation and/or one of its subsidiaries. It is confidential and may contain proprietary or legally privileged information. If you are not the intended recipient, please delete it without reading the contents. Thank you.

MulderWH commented 6 years ago

Hi Romil, what unwanted issues do you get when using custom builds?

romilgaurav commented 6 years ago

The only issue I am getting now is that the custom build always point to prod environment. I am yet to explore more issues, but for now this is the only issue. We need to create app from accep and test environment too.

From: MulderWH [mailto:notifications@github.com] Sent: Monday, August 06, 2018 12:33 PM To: mendix/hybrid-app-base hybrid-app-base@noreply.github.com Cc: Gaurav, Romil Romil.Gaurav@searshc.com; Author author@noreply.github.com Subject: Re: [mendix/hybrid-app-base] Online app default timeout of 5 second is causing client exception in the app (#31)

Enterprise Security Team Alert: This email originated from outside of the organization. Please use caution when opening messages from external sources.


Hi Romil, what unwanted issues do you get when using custom builds?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmendix%2Fhybrid-app-base%2Fissues%2F31%23issuecomment-410788017&data=02%7C01%7Cromil.gaurav%40searshc.com%7C71385823a3f046306d4d08d5fbc2b168%7C27e4c16803234463acad7e124b566726%7C0%7C0%7C636691735973137672&sdata=Pae%2BurhjFOBtlY2EBi8CnMQLDvunoZEn%2B%2FXem9hxpkw%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAbln8MZS34oZL9NOXblyqJF3DngmdgIKks5uOH3agaJpZM4Vvyrx&data=02%7C01%7Cromil.gaurav%40searshc.com%7C71385823a3f046306d4d08d5fbc2b168%7C27e4c16803234463acad7e124b566726%7C0%7C0%7C636691735973137672&sdata=MJ%2BqTFCXIYuWTFaD4aKpaeKg5n3wU9yU7khtp54b%2FXI%3D&reserved=0.

This message, including any attachments, is the property of Sears Holdings Corporation and/or one of its subsidiaries. It is confidential and may contain proprietary or legally privileged information. If you are not the intended recipient, please delete it without reading the contents. Thank you.

MulderWH commented 6 years ago

For that you can setup the environments.json file in the config folder, i.e. { "test" : { "name" : "My App", "identifier" : "io.mxapps.myapp", "url" : "https://myapp-test.mxapps.io" }, "acceptance" : { "name" : "My App", "identifier" : "io.mxapps.myapp", "url" : "https://myapp-accp.mxapps.io" }, "production" : { "name" : "My App", "identifier" : "io.mxapps.myapp", "url" : "https://myapp.mxapps.io" } }

romilgaurav commented 6 years ago

Thanks. This worked.

Regards,

Romil

From: MulderWH [mailto:notifications@github.com] Sent: Monday, August 06, 2018 1:29 PM To: mendix/hybrid-app-base hybrid-app-base@noreply.github.com Cc: Gaurav, Romil Romil.Gaurav@searshc.com; Author author@noreply.github.com Subject: Re: [mendix/hybrid-app-base] Online app default timeout of 5 second is causing client exception in the app (#31)

Enterprise Security Team Alert: This email originated from outside of the organization. Please use caution when opening messages from external sources.


For that you can setup the environments.json file in the config folder, i.e. { "test" : { "name" : "My App", "identifier" : "io.mxapps.myapp", "url" : "https://myapp-test.mxapps.io" }, "acceptance" : { "name" : "My App", "identifier" : "io.mxapps.myapp", "url" : "https://myapp-accp.mxapps.io" }, "production" : { "name" : "My App", "identifier" : "io.mxapps.myapp", "url" : "https://myapp.mxapps.io" } }

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmendix%2Fhybrid-app-base%2Fissues%2F31%23issuecomment-410806243&data=02%7C01%7Cromil.gaurav%40searshc.com%7Cdfeec3b60e144950db9c08d5fbca7abb%7C27e4c16803234463acad7e124b566726%7C0%7C0%7C636691769423170508&sdata=lVCnTesBIUyO6K%2FAMmYrKitaKQN7dfv8qw5vWTm9rrM%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAbln8Jl7fuXahUFIeR0pLvFV0tcPj-miks5uOIrrgaJpZM4Vvyrx&data=02%7C01%7Cromil.gaurav%40searshc.com%7Cdfeec3b60e144950db9c08d5fbca7abb%7C27e4c16803234463acad7e124b566726%7C0%7C0%7C636691769423170508&sdata=L7eE3QxPznbEFqKKVja3JIjZq%2BZWd6NmZL01jRS8TZM%3D&reserved=0.

This message, including any attachments, is the property of Sears Holdings Corporation and/or one of its subsidiaries. It is confidential and may contain proprietary or legally privileged information. If you are not the intended recipient, please delete it without reading the contents. Thank you.

MulderWH commented 6 years ago

Cool. For the camera widget it's a best practice to change the image quality. If you do not change the default values of the widget, then you get the full sized picture of the mobile device. However in most use cases there's no need to. For example we have changed ours to 500 pixels, which is perfect for a profile pic scenario;-)