-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Android] App crashes right after launch (using fcm) #1800
Comments
Are you sure the |
yes, they are not newly added and I just double checked that the file exists in the drawable folders (hdpi, mdpi, xhdpi, xxhdpi, xxxhdpi). From the crash logs, it does not seem to be related to the image but reading the sender ID string |
Followings are more detailed logs, particularly the line
|
@kukikiloke are you using FCM? Did you add the Regardless, this is a bug as the app should not crash. |
@macdonst Yes, I am using FCM. I also have
|
@kukikiloke that shouldn't be a problem as the google services plugin should pick up the right value by build type. |
me too ! i allway crash when receive notification topics ! |
I am running into the same issue, it looks like the plugin cannot find the GCM_DEFAULT_SENDER_ID on init although the google-services.json file is in the root of the project and I've included this line in the anddroid platform: <resource-file src="google-services.json" target="google-services.json" /> |
Any update on this? |
I removed this plugin and it started working again. https://github.com/EddyVerbruggen/cordova-plugin-safariviewcontroller |
Some help please, I have the same problem! My Log:
App Push Init
Installation
So I followed the installation instructions and added above to my existing package.json, result:
I'm also using the safariviewcontroller plugin and removed it from my project, but app still stops after launch :( |
We're experiencing the same behavior and haven't found a solution so far. We're not using the SafariViewController-Plugin and the latest version of this plugin |
me too. any fix, workaround, solution, ... ? |
I am also encountering this problem in combination with cordova-plugin-safariviewcontroller, if I remove it, it works. But I need it to support social login. Any idea what is causing the problem, has anyone been able to solve it? |
I am encountering the same problem, the reason in my case is that the resource string with the id gcm_defaultSenderId cannot be found. This crash occurs in the execute function of the plugin. I have added another catch so that the error does not crash the app, but of course, the plugin still is not working without the id.
|
But does the push notifications functionality still work after you do this? |
@gregor-srdic no, it does not. It just prevents the full app from crashing just because the plugin does not work. Which plugin do you use now? To help debugging, here is a list of other plugins I use:
|
I have the same issue here. Here is the list of my plugins: cordova-plugin-device |
@ben-8409 I merged in your PR. All, I still can't reproduce this bug so I can't fix it. If anyone has a detailed reproduction scenario please let me know. |
I have the same issue and removing cordova-plugin-safariviewcontroller as @tlaverdure commented has fixed it. |
@macdonst The plugin 'cordova-plugin-safariviewcontroller' also uses ext.postBuildExtras in SafariViewController-java17.gradle and it will replace postBuildExtras. Thus, if some plugins use ext.postBuildExtras in *.gradle, then it can be replaced. |
I encounter the same problem |
For me solution was to move everything from .gradle files pertaining to plugins (push plugin and Safari view controller) to build-extras.gradle and comment out references to these files in project build.gradle and project.properties |
The same issue here. If i change the problematic line with |
I solved the problem by adding |
I have the same issue and removing cordova-plugin-safariviewcontroller as @tlaverdure commented has fixed it. |
Having the same issue, cordova-android 6.3.0 + FCM |
I'm facing the same Issue @macdonst The problem occurs if using "builds-extra.gradle" which I have to use, as cordova uses Java 1.6 instead of 1.7 for me
But I can't use my app without this.. EDIT:
Now it works, but I can't use SafariViewController Plugin anymore, as it also uses postBuildExtras. So this is a 100% reproducable error |
@ardabeyazoglu what line did you changed for |
@valerymadiedo exactly. However it doesnt help that way, it produce error in other parts eventually. I solved it by playing with project.properties version numbers. |
@ardabeyazoglu thank you, I wanted to be sure as I did the change but got this error on the same line |
What error you see exactly ? And plz show your project.properties file contents |
@ardabeyazoglu I mean that When i changed to I'm also using project.properties
|
Well i never used it so i dont know what cause this bug. But there are fcm push plugins you might consider instead of this plugin, if you dont use advanced features. |
@macdonst - I encountered this problem as well today - on an app (plain cordova) that used to work with TL;DRTo reproduce (or, at list I think so):
The Long Story(maybe it can help, not sure) In the js console I was getting the (cryptic) error (which yields no meaningful google search results ):
Using logcat, it seems that there's a Resource.NotFoundException as described earlier in this thread and the error handler added by @ben-8409 . (Note - I have not stepped through the code so I assume this is the cause of the error - trying to I was initially baffled with it as the app used to work before with the same set of plugins. After some tinkering (and headbanging), I realized that maybe there's some conflict between plugins (as suggested above, though I have not used the specific plugin). In my initial version (one that worked) the last plugin I added was To verify it, I created a new app adding the relevant plugins in the "wrong" order and indeed I was getting this error again. (see above how to reproduce). My guess is that somehow some plugins conflicts but I don't know enough to know exactly what. The relevant logcat messages follows. I believe the source is
|
same problem here... Removing the cordova-plugin-safariviewcontroller and the push notifications are back Please help. |
Is there any progress on this issue? I'm also facing the same problem: Since I also need to use the auth0-WebView authentication which requires |
@adrenaline15 I also had to use |
I was able to fix by updating my build-extras.gradle like this. Although i havent dug down in it, I think @tunafly is right. I noticed there was a cdvPluginPostBuildExtras towards the end of the build.gradle and was able to add support for the SafariViewController without wiping out the ext.postBuildExtras
|
Is there any update on this? The safariviewcontroller plugin dev is saying that it can't be fixed from his end, so is anyone working on fixing phonegap-plugin-push? Other folks suggest that using cordova v8 will fix this. I tried that, but it breaks cordova-plugin-customurlscheme, which is needed to register an oauth callback inside cordova. So trying to use oauth redirects + push notifications currently is not possible with phonegap until this gets fixed |
If the problem is a conflict when using multiple postBuildExtras, it can’t be fixed on the plugin, should be fixed on Cordova. If you say that some people say it works on Cordova 8 you’ll have to update and try to fix the other plugin that doesn’t work there |
It seems like Cordova already provides cdvPluginPostBuildExtras for this exact purpose, so I think the problem lies with cordova-plugin-safariviewcontroller and cordova-support-google-services. (the latter a dependency of phonegap-plugin-push) Both of the plugins already have issues for this: In other words, I don't think the problem lies with phonegap-plugin-push or Cordova. See my latest comment on the safariviewcontroller issue for a simple temporary fix until the issue is fixed upstream. |
I had the same problem. My solution was like this. please check this page
|
Actual Behaviour
App crashes right after launching it.
Steps to Reproduce
Nothing particular was done. Maybe configuration related?
Platform and Version
Android 6.0
(Android) What device vendor
Motorola G
Cordova CLI version and cordova platform version
cordova 6.5.0
cordova-android 6.2.1
Plugin version
Latest from master branch
cordova plugin add https://github.com/phonegap/phonegap-plugin-push
Sample Code that illustrates the problem
Logs taken while reproducing problem
The text was updated successfully, but these errors were encountered: