I am new to Titanium Android App development and going through an unpleasant scenario of "Network goes off" during use of my app.
I tried reproducing it on my emulator, but going "Airplane mode" while app still working.
I tried below in app.js:
Ti.App.addEventListener('uncaughtException',function(){
alert("caught"); });
Ti.App.addEventListener('TiException',function(){
alert("caught:Ti"); });
So good thing is I am able to see "caught" but not before my app sees a red screen detailing and it breaks. see image:
App crash error
it would be very helpful if someone can help me out in identifying how to catch all those 'unplanned' exceptions and direct them as per some business logic so that user doesnot see those blasts.
Thanks in advance
The exception that you are seeing is related to LiveView. See the docs here: http://docs.appcelerator.com/platform/latest/#!/guide/LiveView which is totally unrelated to the code on the app.
If you are going to test offline mode in your app you need to run it without LiveView because it requires connectivity to work.
For reference:
The event that catches all the exceptions is uncaughtException
TiException is not a valid event so it will never be triggered.
Related
I'm having a really weird behaviour with my TWA. When I am launching the app, the address bar is not shown and the app is running in standalone mode as expected.
But when I am switching between Apps (putting the app in the background), and coming back to it, something weird happens: the page reloads, and the address bar is shown at the top of my app. I am not really sure to understand what's happening here. Even more strange, it looks like this weird behaviour is not happening all the time.
Does anybody here encountered similar issues ?
I checked my assetlinks file, it's accessible and valid, app bundle and so on, everything looks fine. The fact that the app is not showing the bar at launch also seems to confirm that the problem is not coming from the certificate or a configuration issue. What else could cause the problem ?
First launch (looking perfect):
Back from background:
We have seen this occasionally as well.
Which version of Chrome Custom Tabs are you using? Seems like most articles/tutorials use e446d08 which is quite outdated. Suggest trying a newer/latest version of it:
https://github.com/GoogleChrome/custom-tabs-client/commits/master
Their last commit comment suggests that they are still testing things:
There's definitely more we can test, but this is a start.
https://chromium.googlesource.com/custom-tabs-client/+/da65829d7d4b80c00809c6c4aa7f61f88fc7ca26
I am developing Phonegap Application and my application has scenarios where camera is used very frequently.
In my application I have used custom camera plugin (https://www.npmjs.com/package/cordova-camera-custom) to take picture and use it in my application.
Now when I capture images from this camera 30 times by opening camera and capturing again and again the app goes to crash.
The app just crashes so I am not able to identify the root cause of the crash.
I am not an iOS Programmer though I have tried to check the plugin code but I was not able to find the cause.
You can even check the plugin code on your end if needed.
I have also posted this issue to DevExtreme, the framework which I am using to develop hybrid applications at following link:
https://www.devexpress.com/support/center/Question/Details/T480068
and they found that issue indeed is related to memory shortage. The error message was with bug_type: 298 and fault cause: vm_pageshortage.
Please help me on this, I am struggling on it since long before.
Any Help is greatly appreciated.
In the following code, the first console.log message prints pretty much instantly. Then everything just hangs (I'm initially assumed it was waiting for the body of the response to be returned). The Body of the response is only about 26K, the time waiting seems to be indefinite UNLESS, I shake the phone and interact with the debug menu. As soon as I interact with the debug menu, the promise resolves and everything moves along as expected. My interactions with the debug menu can be simple, like hide inspector, show inspector, just takes something to kick the promise resolution into gear and everything is fine.
fetch(SEARCH_URL, requestBody)
.then((response) => {console.log(response); return response.json();})
.then((responseData) => {
debugger
...
Note:
Disconnecting from the debugger and running the code does not exhibit the slowness (and not being connected to the debugger ignores the debugger statements)
And yes, I have rebooted the computer.
Might have found something in https://github.com/facebook/react-native/issues/6679
As you've found out yourself, this is a known bug that should be fixed in react-native v0.31
It is a known bug that parsing responses can lag badly when remote debugging is enabled. Disabling remote debugging should speed this up a lot.
You can read the issue for details and other workarounds.
What worked for me is moving the fetch calls inside the constructor of a react component. Otherwise they never resolve. Hope this helps
I am trying to set my app to use iAds but there are some problems. I followed this tutorial and got stuck on step three cause the button isn't available for me.
I'm not entirely sure why. I already filled up the paperwork, tax and contracts info. But the button is not there. Has it been moved?
A few months ago the button WAS there, however after I clicked it and enabled it, it tells me that I can only enable it when the app is in review. Ok now back to the present, I submit my app that has iAds in it. And it is waiting to be reviewed. The button to enable iAds is missing. It's been a week already. The app already got approved and is available, yet the button is not there. I'm not sure how else to enable iAds.
I have tried going to the iAd network site but all it tells me is that iAd network is temporarily unavailable. It's been already a week.
I finally got a response from apple regarding this issue.
They are no longer using the enable iAd button. As long as you have the paperwork and the iAd framework it should work.
I already have the paperwork done so they tell me that my implementation is wrong.
So I stopped using interface builder for my adds and instead just did it all programmatically.
I don't know if it will make a difference. We shall see... After my app gets approved I'll let ya know....
I simply updated the apps that were supposed to have ads from iAd, and now they are working. It seems that Apple is having quite a few issues with their servers at the moment, though.
I have also recently started implementing iAd in my apps. I have published three apps with iAd and did not see the button in iTunes Connect. The test ads work, however, I have not been able to test whether the ads work on a non provisioned device yet.I have also noticed the iAd module giving me the "iAd Network is temporarily unavailable" error message. I have seen it for at least five days now.
Update: My apps are finally being served iAds. What I did was simply release an update. I didn't even change my code for the ads. I am also not seeing the error from iAd that they can't find my account info; I'm just seeing revenue.
I have an (old) audio app that is misbehaving on iOS 5.1.1. It records audio and on older iOS versions (don't know precisely where the "break" is) it would stay "in foreground" while recording, without any nudging.
But on 5.1.1 the app is put into background after two minutes, and then things go sour. Currently (will have to change this, I suppose) the app kills recording when it's backgrounded (and it appears to do this successfully), but it still dies with a trap in the above routine.
Unfortunately, the call stack is empty when this occurs, so there's little clue as to why the app's getting killed, but I gather (just from hints here and there on the web) that the trap occurs because a background app cannot use any UI facilities, and the app must somehow be calling something UI-ish. But I haven't a clue what it might be.
I've worked through most of the notifications, to see if a notification might be lurking in a queue somewhere and doing something, but I've not found anything so far that might be triggering a UI opp.
Any ideas on how to track this down?
Aha!! The app uses an Apple freebee widget known as AQLevelMeter. When recording is stopped, the level meter is also stopped, but the stop code inside AQLevelMeter.mm does not invalidate the timer that's driving the UI updates.