Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27245] Android: App crashes on Huawei devices

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterHans Knöchel
AssigneeUnknown
Created2019-07-15T19:40:02.000+0000
Updated2019-07-17T01:53:01.000+0000

Description

We are currently noticing some crashes on Huawei devices (see device logs) related to play-services. We are using a fork of [Ti.GoogleSignIn](https://github.com/hansemannn/Ti.GoogleSignIn-Android/tree/parity) that seems to trigger the crash, but I think the root issue is the activity handling of Titanium. A rough confirmation would be great! *EDIT*: We might just need to add some config from [here](https://stackoverflow.com/a/34007675/5537752) to make it work. Sorry for being a bit fast on this one, it can probably be closed.

Attachments

FileDateSize
Bildschirmfoto 2019-07-15 um 21.36.35.png2019-07-15T19:38:55.000+0000277885

Comments

  1. Joshua Quick 2019-07-17

    You're getting an IllegalStateException from Google's android.google.android.gms.auth.api.signin.internal.SignInHubActivity.onCreate activity method. The issue is on Google's end. I can see similar stack traces on stackoverflow here... https://stackoverflow.com/questions/41671068/google-sign-in-is-failing-only-on-some-xiaomi-devices https://stackoverflow.com/questions/41034764/googlesign-in-error-only-on-xiomi-devices It's hard to say what the problem is since it's happening on Google's end. Possible issue is that the installed Google Play Service on the device is older than the one you are using. That can cause no-ops or exception in the Google Play Services APIs. Our "ti.playservices" module has a makeGooglePlayServicesAvailable() function that you can use which will check if the installed Google Play Services is up-to-date and enabled. If it's not, then it'll display a dialog (made by Google) asking the end-user to do an update. You'll want to do this on app startup and do not proceed to your app's main window until Google Play Services has been updated if your app requires this feature. https://github.com/appcelerator-modules/ti.playservices I noticed that your app is using our "x.bootstrap.js" feature, which was designed to do exactly this. You'll want to export an execute(finish) function like you see in our test code below. Titanium's bootstrap feature won't load your app.js until the bootstrap invokes the given finish callback. (I actually designed our bootstrap feature for this exact scenario.) https://github.com/appcelerator/titanium-mobile-mocha-suite/blob/master/Resources/bootstraps/ui.bootstrap.js

JSON Source