Uploaded image for project: 'AeroGear'
  1. AeroGear
  2. AEROGEAR-6264

Cordova HelloPush quickstart app should fail gracefully if not configured

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • None
    • None
    • examples

    Description

      In case that user forgets to fill in UPS details, Cordova application fails. It should rather show some notification what happened, same as Android app.

      Following output is in logcat:

      07-02 18:15:56.423: E/AndroidRuntime(19795): FATAL EXCEPTION: pool-1-thread-1
      07-02 18:15:56.423: E/AndroidRuntime(19795): java.lang.RuntimeException: java.net.URISyntaxException: Illegal character in path at index 0: <pushServerURL e.g http(s)//host:port/context >
      07-02 18:15:56.423: E/AndroidRuntime(19795): 	at org.jboss.aerogear.cordova.push.PushPlugin.getPushConfig(PushPlugin.java:188)
      07-02 18:15:56.423: E/AndroidRuntime(19795): 	at org.jboss.aerogear.cordova.push.PushPlugin.register(PushPlugin.java:147)
      07-02 18:15:56.423: E/AndroidRuntime(19795): 	at org.jboss.aerogear.cordova.push.PushPlugin.access$000(PushPlugin.java:42)
      07-02 18:15:56.423: E/AndroidRuntime(19795): 	at org.jboss.aerogear.cordova.push.PushPlugin$1.run(PushPlugin.java:95)
      07-02 18:15:56.423: E/AndroidRuntime(19795): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
      07-02 18:15:56.423: E/AndroidRuntime(19795): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
      07-02 18:15:56.423: E/AndroidRuntime(19795): 	at java.lang.Thread.run(Thread.java:856)
      07-02 18:15:56.423: E/AndroidRuntime(19795): Caused by: java.net.URISyntaxException: Illegal character in path at index 0: <pushServerURL e.g http(s)//host:port/context >
      07-02 18:15:56.423: E/AndroidRuntime(19795): 	at libcore.net.UriCodec.validate(UriCodec.java:63)
      07-02 18:15:56.423: E/AndroidRuntime(19795): 	at java.net.URI.parseURI(URI.java:402)
      07-02 18:15:56.423: E/AndroidRuntime(19795): 	at java.net.URI.<init>(URI.java:204)
      07-02 18:15:56.423: E/AndroidRuntime(19795): 	at org.jboss.aerogear.cordova.push.PushPlugin.getPushConfig(PushPlugin.java:178)
      07-02 18:15:56.423: E/AndroidRuntime(19795): 	... 6 more
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kpiwko Karel Piwko
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: