Failed to load resource
by Anton Hughes
Hello
I am followig the guide on
https://aerogear.org/docs/guides/aerogear-cordova/AerogearCordovaPush/ -
and have gone through this a few times now, so I am sure I am not missing
any step.
I am deploying my sample app onto genymotion, and using the chrome
debugger, and I see the following error:
file:///android_asset/www/plugins/aerogear-cordova-push/www/aerogear.ajax.js
Failed to load resource: net::ERR_FILE_NOT_FOUND
file:///android_asset/www/plugins/aerogear-cordova-push/www/aerogear-push.js
Failed to load resource: net::ERR_FILE_NOT_FOUND
cordova.js:1431 Uncaught Error: Module aerogear-cordova-push.AeroGear.ajax
does not exist.
cordova.js:1185 deviceready has not fired after 5 seconds.
cordova.js:1178 Channel not fired: onPluginsReady
cordova.js:1178 Channel not fired: onCordovaReady
How can I fix this?
Thamks
8 years, 10 months
Testing push in Cordova
by Anton Hughes
Hello
I am trying to test the UPS and Cordova.
I have UPS setup, have setup a google account, have all the required pieces.
I have watched all the videos that demonstrate how it should work.
I am deploying the sample app via the android device emulator, and it does
get deployed.
However the UPS never sees any devices as connected, and no push messages
sent from UPS ever arrive.
What should I do to debug this? Are there any obvious things to look into?
Thanks
8 years, 10 months
Qustions about Push and Cordova
by Anton Hughes
Hello
I am trying to get started with Cordova and Aerogear push.
When I try to run a simple cordova app I get the following:
!JavaScript ERROR: Plugin PushPlugin.messageChannel is not supported
!JavaScript ERROR: Plugin PushPlugin.register is not supported
How then do you test that the push is working?
Second question - apologies if this sounds dumb - am completely new to
mobile. Can a push message contain json or xml, or does it have to be
simple text?
Thanks
Anton
8 years, 10 months
Duplicated notifications
by Alex Ballesté
Hi, recently I've updated to 2.0.4 cordova plugin and I noticed that lot
of times notifications are not displayed. Others the notifications are
displayed multiple times in the bar but it was only sent once, and
others times are shown with some older that I've already received. Any
suggestion to find what's happening?
Things already detected: If APP is closed I've see the notification with
"1" number. If opened I see it with an "8" .
Screenshots:
http://ibin.co/2PTCBCRewjEx
http://ibin.co/2PTCPYtIqiJy
Following the stacktrace of the last message sent:
http://pastebin.com/FtFr6fbc
Thanks
Alex.
--
Alexandre Ballesté Crevillén alexandre.balleste at udl.cat
====================
Universitat de Lleida
Àrea de sistemes d'Informació i Comunicacions
Analista/Programador
University of Lleida
Information and Communication Systems Service
Tlf: +34 973 702148
Fax: +34 973 702130
=====================
Avís legal/Aviso legal/Avertiment legal/Legal notice
<http://www.imatge.udl.cat/avis_legal_lopd.html>
8 years, 10 months
Aerogear Cordova Push Plugin Android Issue
by aamagdi
Hi,
I tried to send a push notification message using the rest sender api as
below
{"message": {
"alert": "test123",
"user-data": {
"somedata":"0",
"somedata2":"1234"
}
}}
if the application in the foreground I can read the "user-date" correctly
under the payload object on the notification received call back, but if the
application wasn't in the foreground the object doesn't contain the payload
data ("user-date").
I make a quick review of the plugin code for Android and found that in this
part
NotificationMessageHandler.java -> line 77 (Message message = new
Message(extras);) you are creating a new message object from the extras
variable ;that have all the data; then in
Message.java -> line 46 in the class constructor
public Message(Bundle extras) {
this(extras.getString("alert"), extras.getString("sound"),
Integer.parseInt(extras.getString("badge")),
extras.getString("aerogear-push-id"),
*extras.getBundle("userData"));*
}
there is not "userData" field under extras, so this will result of ignoring
all other payload data.
Could you please check it
--
View this message in context: http://aerogear-users.1116366.n5.nabble.com/Aerogear-Cordova-Push-Plugin-...
Sent from the aerogear-users mailing list archive at Nabble.com.
8 years, 10 months
Aerogear UPS Deployment to Oracle Database
by aamagdi
Hi
I was trying to enable UPS server to work with Oracle database, I will
operation goes fine except adding new iOS variant, I check table
*IOS_VARIANT* and found that column *CERT_DATA* was *varchar2(4000)* so it
is long enough for certification file data I changed it to *CLOB* type but
when starting the server hibernate check is complaining about colum type and
gave the below exception
*2016-01-18 19:44:08,267 ERROR [org.jboss.msc.service.fail] (ServerService
Thread Pool -- 62) MSC000001: Failed to start service
jboss.persistenceunit."unifiedpush-server-wildfly.war#unifiedpush-default":
org.jboss.msc.service.StartException in service
jboss.persistenceunit."unifiedpush-server-wildfly.war#unifiedpush-default":
org.hibernate.HibernateException: Wrong column type in
UNIFIEDPUSH.IOS_VARIANT for column cert_data. Found: clob, expected: long
at
org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:172)
[wildfly-jpa-8.2.1.Final.jar:8.2.1.Final]*
I changed the column type to *LONG*, server started fine but when trying to
add new iOS variant I ma getting the below exception, I checked the database
*IOS_VARIANT* record has been created and *VARIANT* recored created but
*PUSH_APPLICATION_ID* was empty, even after setting *PUSH_APPLICATION_ID*
manually it failed in variants inquiry, could you please advise.
*command : org.hibernate.exception.GenericJDBCException: Could not read
entity state from ResultSet :
EntityKey[org.jboss.aerogear.unifiedpush.api.Variant#ec4df739-8f89-421a-8bad-4f1e72fcb7f8]
2016-01-18 19:36:40,664 ERROR [org.jboss.as.ejb3.invocation] (default
task-27) JBAS014134: EJB Invocation failed on component
PushApplicationServiceImpl for method public abstract void
org.jboss.aerogear.unifiedpush.service.PushApplicationService.addVariant(org.jboss.aerogear.unifiedpush.api.PushApplication,org.jboss.aerogear.unifiedpush.api.Variant):
javax.ejb.EJBException: javax.persistence.PersistenceException:
org.hibernate.exception.GenericJDBCException: Could not read entity state
from ResultSet :
EntityKey[org.jboss.aerogear.unifiedpush.api.Variant#ec4df739-8f89-421a-8bad-4f1e72fcb7f8]
at
org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:190)
[wildfly-ejb3-8.2.1.Final.jar:8.2.1.Final]
at
org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:275)
[wildfly-ejb3-8.2.1.Final.jar:8.2.1.Final]
at
org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:340)
[wildfly-ejb3-8.2.1.Final.jar:8.2.1.Final]
at
org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:239)
[wildfly-ejb3-8.2.1.Final.jar:8.2.1.Final]
at
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
at
.
.
.
Caused by: java.sql.SQLException: Stream has already been closed
at oracle.jdbc.driver.LongAccessor.getBytesInternal(LongAccessor.java:156)
at oracle.jdbc.driver.LongAccessor.getBytes(LongAccessor.java:126)
at oracle.jdbc.driver.LongAccessor.getString(LongAccessor.java:201)
at oracle.jdbc.driver.T4CLongAccessor.getString(T4CLongAccessor.java:450)
at
oracle.jdbc.driver.OracleResultSetImpl.getString(OracleResultSetImpl.java:1297)
at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:494)
at
org.jboss.jca.adapters.jdbc.WrappedResultSet.getString(WrappedResultSet.java:1381)
at
org.hibernate.type.descriptor.sql.VarcharTypeDescriptor$2.doExtract(VarcharTypeDescriptor.java:74)
[hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at
org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:64)
[hibernate-core-4.3.7.Final.jar:4.3.7.Final]
at
org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:267)
[hibernate-core-4.3.7.Final.jar:4.3.7.Final]*
Thanks
--
View this message in context: http://aerogear-users.1116366.n5.nabble.com/Aerogear-UPS-Deployment-to-Or...
Sent from the aerogear-users mailing list archive at Nabble.com.
8 years, 10 months
Aerogear UPS 1.1.0: Severe TTL Bug for APNS
by gklein
Hi!
We specified a value of 3600 (1 hour) for the ttl field in the push message
structure. We detected that in case of iOs devices, that were offline just a
short time (e.g. 20 seconds) no pushes were received. For android everything
seems fine.
Looking at the code (APNsPushNotificationSender#createFutureDateBasedOnTTL)
we can see that the expiry date seems to be computed incorrectly:
---
return new Date(System.currentTimeMillis() + ttl);
---
ttl is the time-to-live in seconds. In this case ttl should be multiplied
with 1000!
So this explains our symptoms. Or am i missing anything here?
Further question/issue: When specifying ttl=-1 we detected, that our ios
device also didn't receive any push notifications after some short time
beeing offline. Can anybody explain why? We thought apns would store the
push message for several weeks in that case. When the device was online we
however successfully received pushes with ttl=-1. Any clue whats going on
here?
p.s.: our message looks something like that:
---
{"message":{"badge":1,"alert":"You have new
messages","sound":"NotificationSound.aiff","user-data":{"room_id":"77bf84a5aa254da0b916bc0e7b0f1f7d","type":"message"},"apns":{"content-available":true}},"criteria":{"alias":["HGEUZTM7"]},"config":{"ttl":-1}}
---
Regards, Gunther Klein
--
View this message in context: http://aerogear-users.1116366.n5.nabble.com/Aerogear-UPS-1-1-0-Severe-TTL...
Sent from the aerogear-users mailing list archive at Nabble.com.
8 years, 10 months
Possible bug in Aerogear Push Cordova/iOS implementation but not in the Cordova/Android version
by Rob Willett
Hi,
We think we have found a possible bug in the Aerogear Cordova 2.0.4 push
plugin specifically on the iOS side.
###Summary###
We have two versions of our app, an Android and an IOS version. Both use
the latest Cordova push plugin 2.0.4. They also both have the latest
Cordova platforms, android 4.1.1, ios 3.9.2. Both the iOS and Android
versions are compiled at the same time. We are running cordova 5.3.3
with Ionic 1.7.8 (?).
1. We make sure that both apps are NOT started up on each device. We
also check they are NOT in the background.
2. We send the same simple notification to each device. This
notification config is as below, we have anonymised the variants and
alias in this JSON structure, though we can report that the UPS server
sends the data correctly. We use the additionalData flag to provide the
information necessary to decide which notification has been clicked in
the notification drawer.
```
'variants' => [‘variant1’,’variant2’ ],
'message' => {
'additionalData' => { 'Disruption_Id' => '107546',
'EpochTime' => '1450125268'
},
'alert' => 'Cannon Street (EC4N) (All Directions) at the junction of
King William Street - To facilitate a heavy lift in Cannon Street,
Cannon Street will be closed. Traffic is slow moving on diversion.' },
'alias' => [ ‘alias1’ ],
'ttl' => 600
};
```
3. Both devices show the message, the Android device stacks the message
and the iOS device display an individual message. This looks correct.
4. Clicking on the Android stacked message starts up the app and the
Javascript notification handler we have defined,
HandleAeroGearNotification is called
```
HandleAeroGearNotification: event => {"alert":"Cannon Street (EC4N) (All
Directions) at the junction of King William Street - To facilitate a
heavy lift in Cannon Street, Cannon Street will be closed. Traffic is
slow moving on
diversion.","coldstart":true,"foreground":true,"payload":{"alert":"Cannon
Street (EC4N) (All Directions) at the junction of King William Street -
To facilitate a heavy lift in Cannon Street, Cannon Street will be
closed. Traffic is slow moving on diversion.","badge":"-1"}}
```
5. Clicking on the notification in the notification drawer on the iOS
device also starts our app up correctly but the notification handler,
HandleAeroGearNotification(), is NOT called. The app starts up as normal
as if the notification had not been clicked. We would expect the
notification handler to be called in iOS as it is in Android.
6. All notifications are cleared on both Android and iOS correctly when
the app is started up.
6. We define HandleAeroGearNotification as
```
var aeroGearPushConfig = {
pushServerURL: "https://push-jambuster.rhcloud.com/ag-push/",
ios: {
variantID: “variantid_obscured”,
variantSecret: “variant_secret_obscured”
} ,
android: {
senderID: "variantid_obscured" ,
variantID: "variant_id_obscured" ,
variantSecret: "variant_secret_obscured"
} ,
sendMetricInfo: true,
alias: alias1
};
function HandleAeroGearNotification(event) {
console.log(“HandleAeroGearNotification: event => “ +
JSON.stringify(event));
// Stuff cut for clarity
}
// Slightly simplified registration event.
push.register(HandleAeroGearNotification , function () {
console.log(“Success”):
} , function () {
console.log(“Failure”);
} , aeroGearPushConfig);
```
We cannot see any reference to this issue in the JIRA database and
wondered if it is a bug or not.
If its a bug we are happy to raise it accordingly.
Please let us know,
Thanks
Rob
8 years, 11 months