-
Notifications
You must be signed in to change notification settings - Fork 626
App Crash #118
Comments
That's not a really useful stacktrace unfortunately. Can you share a stripped down version of your app (or a new cordova cli one) which reproduces this problem so I can take a look? |
http://crashes.to/s/8cc21611288 - here are all the details from CrashLytics |
I can not reproduce it, but see in production on a certain amount of users thx to CrashLytics |
Any ideas? At this moment this plugins is the most crashable part of my app... May be I`m using it wrong? |
More and more crashes - http://crashes.to/s/8cc21611288 |
Thanks for those Crashlytics details, really helpful! Can you try a new version from master to see if this fixes the issues? |
Yes, I will integrate it on the next version within next 2-3 hours |
Ok. No lets check for the next few days to see the stats |
As I can see - you`ve fixed it! |
Eddy? Did you check the last\new issue (http://crashes.to/s/0b6b00f47c8)? |
More crashes in the new app: http://crashes.to/s/16da04e3dae and http://crashes.to/s/d2d8cad7e4a |
http://crashes.to/s/51c3798b11b - I thought this one should leave in the last update ((( but it`s still there |
Have you installed the app from GitHub or from the npm registry? If you installed from npm, please try out the latest code from GitHub! The usage has changed a bit, but I hope it clears up the issue you've been having. |
Yes. I did. From git. |
Can you get some more info by USB debugging the app on a device? I'm want to be sure that your options are making it into GooglePlus.java. Side note, if the issue is what I think it is, @pranay-mathur is running into the same problem you are. He started issue thread #199. If it's the same issue, let's move this conversation over to that thread. |
Can you get some more info by USB debugging the app on a device? - no, i cant because i dont face this issue. but my users do. I use this options to initialize:
|
First, Second, after looking at my code and your crashlytics page again, I noticed that Line 235 in the latest code is part of a Javadoc comment (I've been at work all day, so I didn't get a chance to check that until now). So, that error, to the best of my knowledge, has two possible causes:
In order for us to be sure that the second case is not the problem, could you please reinstall the plugin using the second (GitHub URL) method found in the README? |
You're not actually running the latest version of the plugin. - How can I check that I`m running the latest version? |
|
Version: Go into the plugin directory and open If you are running 4.0.8, I recommend that you update to 4.0.9. The usage is different, and the information you get back is purely directed at authentication and identity. |
Thx, its 4.0.8 now. I`ll update it soon. |
Hm... I`ve update the plugin from git: |
After the update the new issue came out: |
Package.json/Plugin.xml version: That was my bad. I forgot to update the version in package.json when I updated plugin.xml. I just pushed that today (but it's not something that would break anything; just an inconsistency; whoops). Hmmmm so that crash is at line 275 of GooglePlus.java, which is part of the following if statement: 274: if (mGoogleApiClient == null) {
275: savedCallbackContext.error("GoogleApiClient was never initialized");
276: return;
277: } This tells me two things: The GoogleApiClient was null, but then never got built (which shouldn't happen....), and that an error callback was not provided and/or saved. Did you ever try removing your android platform entirely then readding it? If not, could you give that a go? If that doesn't work, can you double check that you're passing in an error callback function? Those are the only things I can think of right now.... P.S. I know removing the platform seems weird, but other people have done that and on reinstalling things were fixed. Technology's weird, right? |
Btw, I just tried to add it to another Cordova project that is build through Eclipse and it failed. All imports Whats wrong? Before that I successfuly used previous version of the plugin |
Hmmm that error means the Auth api is not getting brought into the project at compile.
|
http://crashes.to/s/19494d28a81 What am I doing wrong? Why do I get this kind of issues? |
And here is another issue: http://crashes.to/s/4cf818b5a9a |
I`m using the plugin this way: window.plugins.googleplus.trySilentLogin(
{}, //just client usage
function (obj) {
console.info('Silent Login: ' + JSON.stringify(obj));
},
function (msg) {
console.error('error: ' + msg);
window.plugins.googleplus.login(
{},
function (obj) {
console.info('Login: ' + JSON.stringify(obj));
},
function (msg) {
gaPlugin.trackEvent(null, null, "login", "g+ login error", "", 0);
}
);
}
); |
Are you passing anything in to login when you call it? You should pass in the same variables to make sure the api client is being built as expected. |
Sorry, dont understand what you mean. |
Oh sorry I didn't see googleplus.login in nested in the code snippet you posted. My recommendation is that you use login and trySilentLogin separately. i.e., on app start up, call trySilentLogin and handle the result of that. Then provide a button of some sort for the user to click when they are ready to log in to the application. (I'm glad to hear it's only some % of users. That means that it could be an issue with their version of Android or Google Play services. I don't know much more than that.) |
One more error: May be this will help you to find the issue. |
May be this happens if there is no gpservices on the device? |
No more ideas? http://crashes.to/s/19494d28a81 - this is still my most frequent bug mostly affected by Android 4.X |
No other users of this plugin have reported this particular exception. My only suggestion is that you make sure all of your build tools and other SDK items are up to date. This plugin, and the Google sources it uses, are supposed to be compatible back to Android 2.3. From the Android documentation: Google Sign-In for Android has the following requirements:
|
# This is the 1st commit message: # This is a combination of 3 commits. # This is the 1st commit message: # This is a combination of 2 commits. # This is the 1st commit message: # This is a combination of 2 commits. # This is the 1st commit message: # This is a combination of 2 commits. # This is the 1st commit message: # This is a combination of 2 commits. # This is the 1st commit message: # This is a combination of 7 commits. # This is the 1st commit message: # This is a combination of 3 commits. # This is the 1st commit message: # This is a combination of 3 commits. # This is the 1st commit message: # This is a combination of 2 commits. # This is the 1st commit message: # This is a combination of 6 commits. # This is the 1st commit message: # This is a combination of 10 commits. # This is the 1st commit message: Finished implementation # The commit message EddyVerbruggen#2 will be skipped: # Attempt at some decent documentation # The commit message EddyVerbruggen#3 will be skipped: # Attempt at some decent documentation # The commit message EddyVerbruggen#4 will be skipped: # Added iOS screenshots # The commit message EddyVerbruggen#5 will be skipped: # cleanup # The commit message EddyVerbruggen#6 will be skipped: # Added a permission for Android preventing a crash on some devices # The commit message EddyVerbruggen#7 will be skipped: # Cleanup # The commit message EddyVerbruggen#8 will be skipped: # iOSApiKey is for iOS, not for Android :) # The commit message EddyVerbruggen#9 will be skipped: # EddyVerbruggen#3 redirect url not handled when redirected from Google+ app on iOS # The commit message EddyVerbruggen#10 will be skipped: # EddyVerbruggen#6 ADD Birthday and AgeRange # The commit message EddyVerbruggen#1 will be skipped: # EddyVerbruggen#6 ADD Birthday and AgeRange (wasn't really happy with the PR, so I changed it a bit and added iOS support). Thanks for the help! # The commit message EddyVerbruggen#2 will be skipped: # EddyVerbruggen#6 addtional checks on Android # The commit message EddyVerbruggen#3 will be skipped: # Add userId property to let developer to get Google user ID for business logic. # The commit message EddyVerbruggen#4 will be skipped: # EddyVerbruggen#7, needed to manually merge # The commit message EddyVerbruggen#5 will be skipped: # EddyVerbruggen#7, needed additional flag # The commit message EddyVerbruggen#6 will be skipped: # Missing dependency for iOS 8 SDK # The commit message EddyVerbruggen#7 will be skipped: # Android - play services jar fixed version # The commit message EddyVerbruggen#8 will be skipped: # Android playservices updated to 21 # The commit message EddyVerbruggen#9 will be skipped: # Update README.md # # Fix typo. I believe this is for iOS only right now and not Android yet if I'm not mistaken. # The commit message EddyVerbruggen#10 will be skipped: # A note about Android config # The commit message EddyVerbruggen#1 will be skipped: # EddyVerbruggen#15 added troubleshooting section # The commit message EddyVerbruggen#2 will be skipped: # Adding idToken to Android # # Based on this gist [1] I'm adding support for getting the auth oauth2 token # that Google generates after the user accepts the login. # # [1] https://gist.github.com/ianbarber/5170508 # The commit message EddyVerbruggen#3 will be skipped: # Introducing idToken and oauthToken # # Allow the user to configure the service so any of the 3 possibles can be reached # when the user passes webApiKey in the credentials dictionary will get a JWT token # id, if androidApiKey is set in the credentials then an off-line capable oauth2 # token bearer will be generated in the oauthToken value, while if no argument is # set a simple oauth2 token will get generated. # The commit message EddyVerbruggen#4 will be skipped: # Adding extra necessary permissions # The commit message EddyVerbruggen#5 will be skipped: # EddyVerbruggen#12 oauthToken for iOS # The commit message EddyVerbruggen#6 will be skipped: # EddyVerbruggen#22 User-cancelled login on iOS - Neither the success nor error callbacks are called # The commit message EddyVerbruggen#7 will be skipped: # EddyVerbruggen#26 Preparing submission to plugins.cordova.io # The commit message EddyVerbruggen#8 will be skipped: # Prep plugin registry release (as tarball, to circumvent an npm symlink issue) # The commit message EddyVerbruggen#9 will be skipped: # Added a warning about the current state of the plugman publish command # The commit message EddyVerbruggen#10 will be skipped: # Removing the symlinks from iOS libs to be plugman (npm) publish compliant # The commit message EddyVerbruggen#1 will be skipped: # Removing the symlinks from iOS libs to be plugman (npm) publish compliant # The commit message EddyVerbruggen#2 will be skipped: # Removing the symlinks from iOS libs to be plugman (npm) publish compliant # The commit message EddyVerbruggen#3 will be skipped: # Removing the symlinks from iOS libs to be plugman (npm) publish compliant # The commit message EddyVerbruggen#4 will be skipped: # Removing the symlinks from iOS libs to be plugman (npm) publish compliant # The commit message EddyVerbruggen#5 will be skipped: # Removing the symlinks from iOS libs to be plugman (npm) publish compliant # The commit message EddyVerbruggen#6 will be skipped: # Removing the symlinks from iOS libs to be plugman (npm) publish compliant # The commit message EddyVerbruggen#7 will be skipped: # Removing the symlinks from iOS libs to be plugman (npm) publish compliant # The commit message EddyVerbruggen#8 will be skipped: # EddyVerbruggen#37 Google+ login using web browser is rejected on the App Store. # The commit message EddyVerbruggen#9 will be skipped: # From Cordova 4 setActivityResultCallback is on CordovaInterfaceImpl # The commit message EddyVerbruggen#10 will be skipped: # Not importing android-support-v4 # The commit message EddyVerbruggen#1 will be skipped: # EddyVerbruggen#45 login and trySilendLogin now return userdata on Android # The commit message EddyVerbruggen#2 will be skipped: # Update plugin.xml # The commit message EddyVerbruggen#3 will be skipped: # Update plugin.xml # The commit message EddyVerbruggen#4 will be skipped: # EddyVerbruggen#56 new playservices version # The commit message EddyVerbruggen#5 will be skipped: # npm # The commit message EddyVerbruggen#6 will be skipped: # or not to npm.. # The commit message EddyVerbruggen#7 will be skipped: # replace deprecated dependency plugin # The commit message EddyVerbruggen#8 will be skipped: # New ID, published to npm # The commit message EddyVerbruggen#9 will be skipped: # New ID, published to npm # The commit message EddyVerbruggen#10 will be skipped: # PGB note # The commit message EddyVerbruggen#1 will be skipped: # Update dependencies to gradle format to fix EddyVerbruggen#64 # The commit message EddyVerbruggen#2 will be skipped: # bump # The commit message EddyVerbruggen#3 will be skipped: # Switch to Google Sign-In SDK for iOS # # This should fix Apple rejection from popping up Safari. # Will update README soon. # Update version to 3.0.0. # The commit message EddyVerbruggen#4 will be skipped: # Allowed scope to be passed into signin # The commit message EddyVerbruggen#5 will be skipped: # Attempt to fix offline screen # The commit message EddyVerbruggen#6 will be skipped: # Cleanup for google plus connection with scopes and offline access # The commit message EddyVerbruggen#7 will be skipped: # Fixed REVERSED_CLIENT_ID variable # The commit message EddyVerbruggen#8 will be skipped: # Invalid quotes (according to my IDE) # The commit message EddyVerbruggen#9 will be skipped: # Made ios use scopes # The commit message EddyVerbruggen#10 will be skipped: # Added server auth code logic for ios # The commit message EddyVerbruggen#1 will be skipped: # Made server auth code not throw a null reference # The commit message EddyVerbruggen#2 will be skipped: # Plugin update to 4.0.0: # - Changed the ID to cordova-plugin-googleplus (again) # - Wider Android dependent fwk compatibility # - Documented scopes feature # - Removed the need for the iosApiKey # The commit message EddyVerbruggen#3 will be skipped: # Fixed npm reference in doc # The commit message EddyVerbruggen#4 will be skipped: # EddyVerbruggen#95 Crash when using isAvailable method before login # The commit message EddyVerbruggen#5 will be skipped: # access_token fix for iOS # # The access_token will now be returned as: accessToken # The commit message EddyVerbruggen#6 will be skipped: # * generate both oauthToken and idToken # The commit message EddyVerbruggen#7 will be skipped: # Added an "offline" parameter to enable getting a server auth token even without androidApiKey. # The commit message EddyVerbruggen#8 will be skipped: # Added info to README about the API key for serverClientId. # The commit message EddyVerbruggen#9 will be skipped: # Google decided to change a link without adding a nice redirect # The commit message EddyVerbruggen#10 will be skipped: # Enabled getting serverAuthCode when the webApiKey param is set. # The commit message EddyVerbruggen#2 will be skipped: # EddyVerbruggen#108 Added an option to generate access token for offline access on Android # The commit message EddyVerbruggen#3 will be skipped: # EddyVerbruggen#82 Google Plus window not loading! # EddyVerbruggen#113 Not getting user extras (e.g. imageUrl) in callback object. Re-added imageUrl for iOS # The commit message EddyVerbruggen#4 will be skipped: # Android: Ensure a new one time token on each login # # When using the androidApiKey parameter a short-lived one time token # is generated, which can then be passed to the server where it can be # exchanged for a proper access and refresh token. Since all tokens get # cached by GoogleAuthUtil logging in a second time will cause the token # to be invalid if it was used before or some time has passed. # The commit message EddyVerbruggen#5 will be skipped: # EddyVerbruggen#118 App Crash # The commit message EddyVerbruggen#6 will be skipped: # EddyVerbruggen#147 Android fwk tags # The commit message EddyVerbruggen#7 will be skipped: # Android 6.0 # # Added call to request permission # The commit message EddyVerbruggen#8 will be skipped: # EddyVerbruggen#149 Android 6.0 # The commit message EddyVerbruggen#9 will be skipped: # IOS Build fails with compilation errors EddyVerbruggen#150 # The commit message EddyVerbruggen#10 will be skipped: # IOS Build fails with compilation errors EddyVerbruggen#150 # The commit message EddyVerbruggen#1 will be skipped: # Android: Gets a new offline token on each login # # Based on EddyVerbruggen#119 # I tested this on an app I'm working where every authentication attempt returned the same invalid token. After applying this change, the authentication works fine each time. # The commit message EddyVerbruggen#2 will be skipped: # Get refreshToken on iOS sign in # # The refresh token is a useful token for third party apps, to refresh the access token and keep users logged in. # The commit message EddyVerbruggen#3 will be skipped: # Update README.md # The commit message EddyVerbruggen#4 will be skipped: # Updated Google Sign-In iOS SDK to 2.4.0 # The commit message EddyVerbruggen#5 will be skipped: # Enabled GoogleOpenSource.framework explicitely # The commit message EddyVerbruggen#6 will be skipped: # EddyVerbruggen#153 Ios updated google framework # The commit message EddyVerbruggen#2 will be skipped: # EddyVerbruggen#168 IOS Build failure with this plugin # The commit message EddyVerbruggen#2 will be skipped: # Added a few npm keywords # The commit message EddyVerbruggen#3 will be skipped: # Update GooglePlus.java # # Fix for app crash on android 6 # The commit message EddyVerbruggen#2 will be skipped: # A note about failing Android builds # The commit message EddyVerbruggen#3 will be skipped: # Adding a link to how to use keytool # The commit message EddyVerbruggen#2 will be skipped: # Update README.md # The commit message EddyVerbruggen#3 will be skipped: # Update README.md # The commit message EddyVerbruggen#4 will be skipped: # Google success login redirects to google.com issue fixed # The commit message EddyVerbruggen#5 will be skipped: # iOS readme updated to include latest Google SDK changes # The commit message EddyVerbruggen#6 will be skipped: # Update README.md # The commit message EddyVerbruggen#7 will be skipped: # Update README.md # The commit message EddyVerbruggen#2 will be skipped: # Remove OpenSource and Plus libraries. # The commit message EddyVerbruggen#2 will be skipped: # ignoring some more files # The commit message EddyVerbruggen#2 will be skipped: # Google SignIn framework bump # The commit message EddyVerbruggen#2 will be skipped: # ignore # The commit message EddyVerbruggen#2 will be skipped: # testing sth # The commit message EddyVerbruggen#3 will be skipped: # testing sth # The commit message EddyVerbruggen#2 will be skipped: # new demos for firebase and ionic2+firebase # The commit message EddyVerbruggen#3 will be skipped: # typo fix
Since I integrated this plugin I began recieving lots of crashes like this one:
The text was updated successfully, but these errors were encountered: