Parse Push Plugin error
Just to be sure i took an empty project and added the plugin. It also breaks.
Fetch queue Info... Start building 597adac6803451371d84384a Setup working directories... Download project archive... Extract project archive... Fetch project info... Webview:null Arch:null cordova version: 6.2.0 - preBuild - buildForAndroid - Cordova create - $ /data/build-server/cordova/6.2.0/bin/cordova create /tmp/monaca/597adac6803451371d84384a/project Creating a new cordova project. - Copy .monaca-res directory - - Copy config.xml - - Cordova platform add - $ /data/build-server/cordova/6.2.0/bin/cordova platform list $ /data/build-server/cordova/6.2.0/bin/cordova platform add /data/build-server/cordova/platforms/android/5.1.1 Adding android project... Creating Cordova project for the Android platform: Path: platforms/android Package: com.example.helloworld Name: Minimum_Template Activity: MainActivity Android target: android-23 Android project created with email@example.com - Copy external plugin setting files - - Copy www files - - Cordova plugin add - $ /data/build-server/cordova/6.2.0/bin/cordova plugin add mobi.monaca.plugins.Monaca $ /data/build-server/cordova/6.2.0/bin/cordova plugin add firstname.lastname@example.org $ /data/build-server/cordova/6.2.0/bin/cordova plugin add email@example.com $ /data/build-server/cordova/6.2.0/bin/cordova plugin add firstname.lastname@example.org $ /data/build-server/cordova/6.2.0/bin/cordova plugin add /tmp/monaca/597adac6803451371d84384a/output/plugins/parse-push-plugin - Cordova prepare - $ /data/build-server/cordova/6.2.0/bin/cordova prepare android cordova-custom-config: Skipping auto-restore of config file backup(s) - postBuild - Remove working directories... Build Error: Error: Sandbox Exec Error: [ Error: Cannot read property 'get' of null ]
Thanks for more information!
I tried adding the plugin (without any configuration on config.xml and no setup on Parse server) and got the same error in the build log.
I think this has to do with the plugin configuration, you need to make sure setup the Parse server properly and add the necessary configuration in
config.xmlfile. Moreover, will this plugin work properly since Parse service is shut down? For push notification, why don’t you use cordova-plugin-firebase?
Thanks for your reply. Since my backend is Parse (hosted by Sashido), it’s a big change to move to Firebase.
But maybe the Sashido backend does not allow this plugin, which Monaca detects via the config.xml during build. I’ll look into that first.
I contacted the Parse provider, the plugin should work fine. I redid the XML file as well. Would you have any other idea what it can be?
Same issue here.... If i remove parse plugin it compiles without error.... Looks like I was missing preference ParseNotificationIcon in config.xml, it wasn't in doc though...
I think this should help to fix your issue. Good luck!
This post is deleted!
Yes, it looks like it does something. The only thing is, it cannot find the icon file. It’s looking in the root.
I can only create a folder in the www- directory (so not in the root, Monaca won’t let me)
when i add …/…/ to the path in the config.xml i get this error:
- postBuild - Remove working directories... Build Error: Error: Sandbox Exec Error: [ Error: ENOENT: no such file or directory, open '/private/tmp/monaca/59830d5e013eb0b95fd62dee/www/resources/android_notification_icon.png' ]
I added the file in a newly created directory www/resources/
without adding anything in the config it says:
Build Error: Error: Sandbox Exec Error: [ Error: ENOENT: no such file or directory, open '/private/tmp/monaca/5983113fff2af238350ed243/project/resources/android_notification_icon.png'
i tried to add ‘project’ to the config path, it looks pretty ok but is still an error…
no such file or directory, open '/private/tmp/monaca/59832d51013eb050565dd864/project/www/resources/android_notification_icon.png'
Sorry for late reply. I talked about this with our development team and found that it’s impossible to upload the file to the
resourcesfolder at the moment from Monaca Cloud IDE. Therefore, in this case, you will not be able to config the preference as instructed in this plugin. I’m very sorry about this. However, we will take this into account and consider for our next feature release. We appreciate your kind understanding.
For other readers, there is a solution after all:
As you may already know, this plugin requires you to set a push notification icon which has to be put inside resources folder in the project root. However, it is impossible to add the file directly into that folder from Monaca Cloud IDE.
After a long searching around, I found a Cordova plugin, called cordova-plugin-copy-resources, which allows you to copy resource files at build time. I tested the plugin and successfully added the file under resources folder.
Therefore, in your case, please do as follows:
Add cordova-plugin-copy-resources to your Monaca project.
Add the following snippet to the config.xml file:
<!-- copy the www/resources/android_notification_icon.png into project/resouces/ folder during build time --> <resource dest="resources" src="www/resources/android_notification_icon.png" /> <!-- set the ParseNotificationIcon --> <preference name="ParseNotificationIcon" value="android_notification_icon" />
Save the config.xml file and start building again. This time the build should be successful.
So in the folder that is mentioned you should put your icon!