Community

Community Forums

Where our customers, developers, and more can come together to help each other with both general and technical questions about our products and services.

Error encountered while consuming stream for my app

Srinivas Puramshetty

Hi All,

I am trying to get the receiving events of my app through connect api.
I able to "Connecting to stream for app xxxxx".
While consuming stream I am getting "Error encountered while consuming stream for app xxxx"

I am follows  instructions which is given in the URL(https://github.com/urbanairship/connect-java-library/blob/master/README.md).
After executing the java class I am getting below error.
Please provide how to resolve the issue.

 

Error:

5 [main] INFO com.urbanairship.connect.client.MobileEventConsumerService - Connecting to stream for app xtojwNzNRsChB_prw5Jb2Q
2535 [main] INFO com.urbanairship.connect.client.MobileEventConsumerService - Consuming from stream for app xtojwNzNRsChB_prw5Jb2Q
32540 [main] INFO com.urbanairship.connect.client.MobileEventConsumerService - Ending stream handling for app xtojwNzNRsChB_prw5Jb2Q
32541 [main] INFO com.urbanairship.connect.client.MobileEventConsumerService - Connecting to stream for app xtojwNzNRsChB_prw5Jb2Q
34324 [main] INFO com.urbanairship.connect.client.MobileEventConsumerService - Consuming from stream for app xtojwNzNRsChB_prw5Jb2Q
37384 [main] ERROR com.urbanairship.connect.client.MobileEventConsumerService - Error encountered while consuming stream for app xtojwNzNRsChB_prw5Jb2Q
java.lang.RuntimeException: Error occurred consuming stream for app xtojwNzNRsChB_prw5Jb2Q
at com.urbanairship.connect.client.MobileEventStream.consume(MobileEventStream.java:124)
at com.urbanairship.connect.client.MobileEventConsumerService.stream(MobileEventConsumerService.java:117)
at com.urbanairship.connect.client.MobileEventConsumerService.run(MobileEventConsumerService.java:82)
at com.sample.push.App.main(App.java:96)
......
at java.lang.Thread.run(Thread.java:745)
37387 [main] INFO com.urbanairship.connect.client.MobileEventConsumerService - Ending stream handling for app xtojwNzNRsChB_prw5Jb2Q
37387 [main] INFO com.urbanairship.connect.client.MobileEventConsumerService - Connecting to stream for app xtojwNzNRsChB_prw5Jb2Q
39153 [main] INFO com.urbanairship.connect.client.MobileEventConsumerService - Consuming from stream for app xtojwNzNRsChB_prw5Jb2Q
43186 [main] ERROR com.urbanairship.connect.client.MobileEventConsumerService - Error encountered while consuming stream for app xtojwNzNRsChB_prw5Jb2Q
java.lang.RuntimeException: Error occurred consuming stream for app xtojwNzNRsChB_prw5Jb2Q
at com.urbanairship.connect.client.MobileEventStream.consume(MobileEventStream.java:124)
at com.urbanairship.connect.client.MobileEventConsumerService.stream(MobileEventConsumerService.java:117)
at com.urbanairship.connect.client.MobileEventConsumerService.run(MobileEventConsumerService.java:82)
at com.sample.push.App.main(App.java:96)
..........
at java.lang.Thread.run(Thread.java:745)
43188 [main] INFO com.urbanairship.connect.client.MobileEventConsumerService - Ending stream handling for app xtojwNzNRsChB_prw5Jb2Q
43189 [main] INFO com.urbanairship.connect.client.MobileEventConsumerService - Connecting to stream for app xtojwNzNRsChB_prw5Jb2Q
44082 [main] INFO com.urbanairship.connect.client.MobileEventConsumerService - Consuming from stream for app xtojwNzNRsChB_prw5Jb2Q
47122 [main] ERROR com.urbanairship.connect.client.MobileEventConsumerService - Error encountered while consuming stream for app xtojwNzNRsChB_prw5Jb2Q
java.lang.RuntimeException: Error occurred consuming stream for app xtojwNzNRsChB_prw5Jb2Q and etc

 




App.java

Please sign in to leave a comment.

0
Avatar

Hello Srinivas,

Urban Airship Connect is available as part of a paid plan with Urban Airship. Connect is not available under the Trial or Starter plans.

If you would like to purchase Connect as part of your plan, please contact our Sales team or reference our pricing plans here:

https://www.urbanairship.com/products/pricing

Michael Halka 0 votes
0
Avatar

We have two accounts those are
1. Username : srinivas.vidyayug@yahoo.in (new account -- Enterprise Trial plan -- Connect services are not enabled)
2. Username: chani4219@gmail.com (old account -- Engage Starter plan -- -- Connect services enabled)

Urban Airship support team already enabled the Connect services for our old account-Engage Starter plan(i.e, Username: chani4219@gmail.com).
we are trying to get the mobile event stream for development app which is created in the engage starter plan.
Through this development app key and access-token key we able to connecting to stream for app but we are getting error after connected to stream for app i.e, Error encountered while consuming stream for my app

Please provide how to resolve above the issue.

Srinivas Puramshetty 0 votes
0
Avatar

Hi Michael Halka,

We are able to get the mobile event stream of app with our engage starter plan(i.e, Username: chani4219@gmail.com) by executing the CURL statement.
Above error is coming while executing through Connect Client Java Library API.

Srinivas Puramshetty 0 votes
0
Avatar

Hi Michael Halka,

Yes, we are able to connected and receiving events for my app key xtojwNzNRsChB_prw5Jb2Q  through by executed CURL statements. But we are unable to receiving events when we are working with java.

Here we are attached curl related request and response details. Find the attached file.

Srinivas Puramshetty 0 votes
0
Avatar

Hi Srinivas,

We just posted an update to the Connect Java Library (2.2.1). It appears that there were some problems parsing Screen View events and in-app message events.

I'll do some testing on my end, but it would be great if you could update to the latest version on your end and let us know if that fixes those errors.

Michael Halka 0 votes
0
Avatar

Hi Michael Halka,

We updated the connect-client Java Library version 2.0.0 to 2.2.1
After updated version we executed my Java program it is not shows any error.
We are able connect and consuming from stream for my app.
But it shows just list of received events like below

Received event ee23ef65-18f7-11e6-a195-90e2ba211bf8
Received event ee23ef66-18f7-11e6-a195-90e2ba211bf8
Received event 087e02c0-18fc-11e6-bc8d-001018948f58
Received event 087ddbb0-18fc-11e6-bc8d-001018948f58
Received event a55b5ec1-18fd-11e6-a2e4-90e2ba025ad8
Received event a55b5ec0-18fd-11e6-a2e4-90e2ba025ad8
Received event f1b92be3-223e-11e6-b9e2-14feb5d26827
Received event 00000154-e686-4d68-4e36-9c53d977a07e
Received event f1b92be1-223e-11e6-b9e2-14feb5d26827
Received event 2c6b91a0-2303-11e6-9182-14feb5d3172c
Received event 2c6b91a2-2303-11e6-9182-14feb5d3172c
Received event 2c6b91a1-2303-11e6-9182-14feb5d3172c

We are not getting each event related information like below?

{"id":"f1b92be3-223e-11e6-b9e2-14feb5d26827","offset":"930","occurred":"2016-05-25T06:07:22.014Z","processed":"2016-05-25T06:07:23.366Z","device":{"android_channel":"688bd986-a00d-4faf-bfb1-0930324fd969","attributes":{"locale_variant":"","app_version":"1.0","device_model":"XT1033","connection_type":"WIFI","app_package_name":"com.example.srinivas.vidyayugtest","iana_timezone":"Asia/Kolkata","push_opt_in":"true","locale_country_code":"AU","device_os":"5.1","locale_timezone":"19800","carrier":"!dea","locale_language_code":"en","location_enabled":"false","background_push_enabled":"true","ua_sdk_version":"7.0.4","location_permission":"NOT_ALLOWED"}},"body":{"push_id":"b7e6b480-8ea3-4fb0-bf67-57466e0dbd9b"},"type":"SEND"}

Srinivas Puramshetty 0 votes
0
Avatar

Hi Srinivas,

That is correct. The print statements in the sample code only display the identifier

log.info("Received event " + event.getIdentifier());

You should now be able to access the Event Body and other info from the event object, to display to the screen. From here, it is up to you on how you want to consume that data.

 

Michael Halka 0 votes