Cordova app crashing on Samsung Marshmallow phones - android

I'm trying to teach myself JavaScript by creating an little puzzle/game app with Cordova. I've got a basic prototype thing working, and have successfully got it to build on iPhone, and it runs perfectly.
I have 3 android phones to test with, 1 Marshmallow (BLU branded), 1 Lollipop, and 1 Kitkat... and the app works perfectly on those as well. I sent the app to 2 friends on the other side of the country to test, and it crashes on their Samsung Marshmallow phones ( a Galaxy 7, and a Galaxy Edge 7). It runs for a bit, and then just crashes without any user input.
So, I tried 2 separate crash analytics plugins, Fabric and Crittercism. I can verify that both of these are working, as I can force a crash in the app, and it shows up as a crash report.
But when my friends run the app with the crash analytics, whatever is going on that makes the app blowup, it isn't triggering any reports from Fabric or Crittercism. I've tried to get the android emulator running on my PC, but unfortunately it is an AMD processor, which is missing some necessary virtualization. I can't even get the super slow ARM version of the emulator to run on my PC, it just hangs forever.
I just recently installed cordova, and took all the defaults during setup. So from what I can tell, it should be targeting android API 23 (Marshmallow). But maybe there's some other kind of build issue that is messing things up?
So I'm kind of at a loss of how to debug this problem. Short of finding someone locally who can lend me a Samsung Marshmallow phone to debug with, I can't think of anything else that would work. Does anyone have any ideas?

The ARM emulator is indeed excruciatingly slow. I would suggest a third-party emulator. I use GenyMotion (which uses VirtualBox under the hood). You might have some luck with that. Alternatively, ManyMo is a cloud-based solution that might prove useful.
The system web view used by PhoneGap/Cordova will vary widely across Android devices, which means you can run into different issues across Android versions and device manufacturers. I suggest using the Crosswalk plugin to mitigate those problems. Do note that this will increase the size of your APK and footprint of the installed app on your device.
When the app crashes, does it actually crash to the launcher, or does the app reload itself (or just show a background color)? I wouldn't expect Crashlytics to handle JavaScript issues unless the JavaScript caused the app to crash out to the launcher.

Related

Unable to initialize WebGL in Android Instant Game ("WebGL1 blacklisted")

I'm developing an android instant game utilising a WebView (wrapped with Cordova). The game works well in a browser, and also as an installed app, and even through a WebView inside Facebook Messenger. However as an Android instant app initialising the WebGL context fails and I find this error in the log:
04-20 14:38:43.833 16769 16848 E chromium: [ERROR:context_group.cc(145)] ContextResult::kFatalFailure: WebGL1 blacklisted
The device I've tried is Huawei MediaPad T3 10. I don't know if other devices work (I don't have any available at the moment). Some other instant games work with the device, but then again they probably don't use a WebView.
I've tried initialising WebGL2 if WebGL1 is blacklisted but that didn't work, probably for many reasons.
Why is the device blacklisted only in Android Instant Apps? Is there any way to circumvent the issue? Can I somehow whitelist the device?
It seems the device some GLES feature support status caused webkit blacklist it. It's better to try on other devices.
I know it's an old topic, but I ran in to this as well. Just try a newer Android image in your emulator. It may work on real hardware, but not the emulator.
https://issuetracker.google.com/issues/37129533?pli=1

How To Get Ionic 4 To Work On Android 5.1

I currently just created an Ionic 4 application and when i test on my android 5.1 device nothing shows, i go to google to find out what the issue could be and it turns out ionic 4 has a problem working on android 5.1 and lower devices. Is there anyway to get it to run on at least android 5.1 ?
It appears that Ionic has a closed issue on Github for this that states that Android 5 is not entirely supported:
https://github.com/ionic-team/ionic/issues/15438
One of the Ionic team members states:
"We are aware of this issue and have been working to fix it for some time. The main issue here is that there seems to be a constant stream of things that need to either be polyfill or reworked in order to support older Android. And to add to this, the android emulator is not always the best test ground
As the older android emulators are not connected to google play, they do not receive updates to the browser, meaning that though a real android 5 device might have chrome 70, the emulator is stuck on chrome 37 (~1% of the global market), which is a drastically different environment.
While we are making fixes internally in both stencil and ionic/(core,angular), devs can enable Angular Polyfills to fix some older features.
For most cases though, people will not be seeing "older" webviews that devs are getting in the Android emulator. They will be getting new chrome (70+) and all the latest web features.
We will we continuing to address this issue and make sure things work as expected."

Debug App in Galaxy S5

I am building an Android app for my company, using Android Studio 1.5.1 . I've discovered that the app won't work on some Galaxy S5 phones.
These phones just show a white screen when the app runs.
This error happens on Galaxy S5 devices with Android version 5.1.1 But not on an Galaxy S5 Device running Android version 5.0
I'm focusing on the Android Version as a clue to solving this bug.
I can't actually get one of the devices so I've created several Virtual Devices. There are 6 Downloadable system images of Android 5.1.1 in Android Studio's Virtual Device Configuration wizard. I've installed all of them. none replicate this white screen error.
What else can I do to uncover this bug?
If it helps answer my question, my app relies heavily on server communication. The whole app is just one Webview with a few html & JS files.
The problem with emulators is that they are not reproducing actual device behaviour(especially, once many OEMs like Samsung tend to customise Android based on their needs), so I'm afraid the only options you have are:
Get Samsung Galaxy S5 with 5.1.1
Apart from obvious ideas "go to shop and buy", I can recommend you:
to take a look at Open Device Lab. It operates around the world and there's an arguably good chance to find the device you need there;
build a pool of alpha-beta users you can talk to and share new builds. Google Play has quite rich functionality in this area. Samsung S5 is quite common model, so it shouldn't be a problem to find people with it. If your product is "public", you can try to find beta-users on services like BetaBound or just among your social media network;
Use Analytics tools to collect more data from affected devices and act based on the information you get
There're dozens of different frameworks for accomplishing it. I can suggest Crittercism as a super powerful and comprehensive tool. In particular, I'd definitely log:
All handled exceptions
Add breadcrumbs (short string to capture app run-time information) to all Activity/Fragment lifecycle methods, to Application's methods (as white screen on start might mean some issues there), to all meaningful async tasks, etc.
If app gets into suspicion state - log it as a handled exception, so you can see the whole trail of breadcrumbs and track history of exceptions for the user. Unfortunately, you won't get trail of breadcrumbs, before something has been logged as an issue (crash or exception). There're frameworks, which log everything, like MixPanel, for example, but I honestly think that Crittercism suits much more here)
Crittercism will also catch & report all crashes happen in the app and
The Get Started Guide is here and it's pretty straightforward: http://docs.crittercism.com/android/android.html
Saying that, I'd suggest you to integrate some analytics anyway, as it'll help you in the future and to try to get affected phone in hands for test.
I guess the culprit is webview. Can you check the webview version on which the issue is reproducible.
To check the version you need to go to settings->Application Manager-> Downloaded Apps-> check "Android System Webview"version
We had a similar issue when the screen used to go blank and it used to happen only on particular version of webview. The issue was fixed by Google later.
The chromium webview layer is now updatable from Google Play.
For more details refer-http://developer.android.com/about/versions/lollipop.html#WebView
I assume you are building a hybrid app.
If the webview is the culprit, you could try crosswalk.
It adds Mb's to your app but it makes sure every device uses the same webview (latest chromium). Moreover rendering differences etc are also minimized.
if you are using cordova run: cordova plugin add cordova-plugin-crosswalk-webview and that's it.
If you implement this and the whitescreen problem is gone, you debugged it in a sherlock holmish deduction way...
The problem is not with emulator. It is with WebView in Android versions 5.1 onward.
Try
uninstalling the updates for "Android system webview" app (go to
settings and look for it under "downloaded") it works just fine!
Source - similar question

Testing Issues on Particular Android Devices for Mobile Website

I am trying to recreate an issue which is only caused on HTC One XL phone running Android 4.2.2. It is a styling issue which can be fixed with CSS. The problem is that the Chrome Developers Tool does not have a profile for HTC One XL phone running Android 4.2.2.
I do not have a real device! How can I test for an issue that only exists on particular phone running a particular Android version?
FInd someone with the device to test a beta or debug info gathering build. There's three reasons one particular device has issues.
1)Hardware problem. No emulator will solve this as they won't perfectly emulate hardware.
2)Software bug on this device's framework. Since each OEM ships their own set of patches, there's no way to know what is actually running, except for having the device.
3)Something weird in the system of an individual user. Some odd combo of software, hardware, and data. You need that actual phone to fix this, but it generally only effects a handful of users.
But none of these are solvable without access to the device, or a real Eureka moment. More logging helps, but you'd still need to get those logs which requires a device.

Flex 4.6 Mobile App Install

I copied a tutorial like the simple Hello World App which I followed and created to try features on in Flex 4.6. It work it the emulator with the Flash Flex 4.6 software but when it cam to using / testing the simple App on a real phone there was a problem.
it installed on the HTC Wildfire S but when it came to running the app, there was a error with the following.
"The application HelloWorld(process air.HelloWorld has stopped unexpectedly. Please try again"
I am new to Flex but this error is making things harder, It seems this is a unknown error the code seem to be all correct I checked it with the tutorial.
The HTC That I tested on has the following os
Android version 2.3.5
Software number 2.13.206.1
Kernel version 2.6.35.10
Do you know any common reason for this error, the firmware is the latest 2.3.5
Thanks
If i could i would just comment this, but anyways...
I have few working Flex mobile apps which i tested on android devices. Yesterday i only had my friends HTC sense 2.3.3 (which i didnt used before) available for testing. None of my working AIR apps did work on that phone. I am always using captive runtime. App size is usually around 10 mb apk, and 20 mb when installed (even small hello world app always have about 20mb when installed with captive runtime). Strange thing is, that apps on HTC sense had only 10 mb after being installed - so there was clearly some problem with deploying captive runtime...
If your hello world works on flash builder simulator, then its probably some problem with device.
You should try another devices.
You should also check, if your app size is around 20mb...

Categories

Resources