Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

App crushes when using plugin push #1708

Closed
tomavic opened this issue May 8, 2017 · 11 comments
Closed

App crushes when using plugin push #1708

tomavic opened this issue May 8, 2017 · 11 comments

Comments

@tomavic
Copy link

tomavic commented May 8, 2017

I have a phonegap project that requires using your plugin to get device token and recive notification from back-end

The plugin and the app was working fine for over past 10 months, but what happened is from 2 weeks I was not able to open the app.

Every time I build it success, but when I open the app it crushes in first page (the page where I am calling push notification object).

BTW: I didn't change anything in the code

    <plugin name="phonegap-plugin-push" source="npm" spec="~1.8.0">
        <variable name="SENDER_ID" value="430xxxxxxxx" />
    </plugin>
    <engine name="ios" spec="~4.1.1" />
    <engine name="android" spec="~5.1.1" />

ddddddddddd

If there is particular version I should target please advise

@ben-kn-app
Copy link

ben-kn-app commented May 8, 2017

Hi Tomavic,

It seems you have the wrong plugin version.

I was encountering the same problem. The app just closes as soon as the Push plugin was initiated. It seemed I installed by accident an old version of the push plugin version.

Please check this by cordova plugin list:
I got: phonegap-plugin-push 1.8.1 "PushPlugin"

So I got version 1.8.1 while the newest is 1.10.3. When I tried to install the plugin it gives an

Unmet project requirements for latest version of phonegap-plugin-push:
    cordova (0.0.0 in project, >=6.4.0 required)
Fetching highest version of phonegap-plugin-push that this project supports: 1.8.1 (latest is 1.10.3)

Hence the unwanted lower version. As I also see your plugin version is 1.8, I expect the same problem for you.

On another project I was successful in installing the new 1.10.3 and the problem went away. I'm now stuck on this project where I have this unmet dependency, any thoughts are appreciated. Cordova version gives 7.0.0.

Hope this gives a notch in the right direction.

@tomavic
Copy link
Author

tomavic commented May 8, 2017

Yes , I also have another project and I it's working fine with the old version. But my current project crushes as soon as I open it

UPDATE:

I changed spec from spec="~1.8.0" to spec="~1.9.2" and I am still testing it

@macdonst
Copy link
Member

macdonst commented May 8, 2017 via email

@tomavic
Copy link
Author

tomavic commented May 8, 2017

@macdonst No, I am using 6.5.0

you can check screenshot of all version

@macdonst
Copy link
Member

macdonst commented May 8, 2017 via email

@tomavic
Copy link
Author

tomavic commented May 8, 2017

BTW I have another issue with diagnostics plugin, you can check here

@tomavic
Copy link
Author

tomavic commented May 8, 2017

@macdonst in this thread #271 , you mentioned

image

did you mean to copy this folder

image

to my project's www folder ?

@tomavic
Copy link
Author

tomavic commented May 8, 2017

I had changed plugin.xml of this plugin. I had changed the this line
<framework src="com.android.support:support-v4:+" />

to

<framework src="com.android.support:support-v13:23+"/>

and I got

BUILD SUCCESSFUL

Total time: 47.879 secs

Command finished with error code 0: cmd /s /c "C:\Users\IM\Desktop\mink-foodiee\platforms\android\gradlew.bat cdvBuildDebug -b C:\Users\IM\Desktop\mink-foodiee\platforms\android\build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m -Pandroid.useDeprecatedNdk=true"

@tomavic tomavic closed this as completed May 8, 2017
@tomavic
Copy link
Author

tomavic commented May 8, 2017

But still I didn't got it.

What is the reason behind that?

@macdonst
Copy link
Member

macdonst commented May 9, 2017

@chinib you are actually running into this bug in Cordova https://issues.apache.org/jira/browse/CB-12773

@lock
Copy link

lock bot commented Jun 3, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants