question

Chris avatar image
Chris asked

WhisperLink ServerTransport error

Hi Fling-Developers,

i am having issues with the underlaying whisper link framework from the SDK. It seems the initialization of the SDK does not happen as expected in the android app.

Here are some logs:

Fire TV app logs:

I/WhisperLink: WhisperLinkPlatform - bindSdk: app=com.myappname.fire I/WhisperLink: WhisperLinkPlatform - bindSdk: done, result=true I/WhisperLink: PlatformInitializerAndroidBase - Plugins Found:2

I/WhisperLink: CloudTransportConfig - Component: CloudTransport

I/WhisperLink: SecurityConfig - Component: Security

I/WhisperLink: FeatureFactory - Creating SecureTransport Feature

I/WhisperLink: WPLOG - New log handler set is :com.amazon.whisperlink.platform.GenericAndroidLogHandler@2f93fc8

I/WhisperLink: GenericAndroidPlatform - Initializing.

I/WhisperLink: GenericAndroidPlatform - Initialized.

I/WhisperLink: PlatformOptionsImpl - Added memory channel as internal channel

I/WhisperLink: CloudTransportFactory - Creating Cloud Transport Factory

A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x18 in tid 28237 (WP_2_WhisperPla)

Android app logs (native Android - non fire-os device):

E/WhisperLink: PlatformCoreManager - Failed to create ServerTransport

E/WhisperLink: PlatformCoreManager - Failed to start service router for udp, secure=false E/SQLiteLog: (1555) abort at 11 in [INSERT OR FAIL INTO hashservices(services,hash) VALUES (?,?)]: UNIQUE constraint failed: hashservices.hash

E/WhisperLink: WhisperLinkUtil - Failed to get Registrar Connection in description lookup org.apache.thrift.transport.TTransportException: Should not be written to!! at com.amazon.whisperlink.transport.TWpObjectCacheTransport.write(TWpObjectCacheTransport.java:63) at org.apache.thrift.protocol.TBinaryProtocol.writeI32(TBinaryProtocol.java:201) at org.apache.thrift.protocol.TBinaryProtocol.writeMessageBegin(TBinaryProtocol.java:107) at com.amazon.whisperlink.service.Registrar$Client.getFilteredServices(Registrar.java:488) at com.amazon.whisperlink.util.WhisperLinkUtil.quickDescriptionLookup(WhisperLinkUtil.java:999) at com.amazon.whisperplay.fling.media.controller.impl.WhisperplayControllerAdaptor.getConnection(WhisperplayControllerAdaptor.java:285) at com.amazon.whisperplay.fling.media.controller.impl.PlayerDeviceImpl$23.call(PlayerDeviceImpl.java:454) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818)

E/SQLiteLog: (1555) abort at 11 in [INSERT OR FAIL INTO hashservices(services,hash) VALUES (?,?)]: UNIQUE constraint failed: hashservices.hash

E/SQLiteLog: (1555) abort at 11 in [INSERT OR FAIL INTO hashservices(services,hash) VALUES (?,?)]: UNIQUE constraint failed: hashservices.hash

Although the log says "Failed to start service router for udp" the discovery of the fire tv (stick) is working fine. When it comes to loading the media source the bold-italic exception line is thrown. So i am unable to fling the content to the fire tv.

Does anyone of You know this issue?

Thanks for Your answers! Chris

fire tvsdkamazon flingwhispersync
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Levon@Amazon avatar image
Levon@Amazon answered

Hi Chris,

Thanks for posting!

> Although the log says "Failed to start service router for udp" the discovery of the Fire TV (Stick) is working fine.

Yes, this is expected. UDP router is not needed for Fling.

> When it comes to loading the media source the bold-italic exception line is thrown. So i am unable to fling the content to the Fire TV.

Yes, this indeed looks like the root cause.

> Does anyone of You know this issue?

Unfortunately, we have not seen this issue when testing the Fling sample apps.

Could you please elaborate on "native Android - non fire-os device" with make model of the device? Do you see this with any of the Android devices?

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Chris avatar image
Chris answered

Hi Levon,

Thanks for Your reply!

For testing i used a LG Nexus 4 with API 22 and a LG Nexus 5x with API 25. The Fire-TV stick has API 22.

The logs i've posted are from the Nexus 4 and the Fire-TV stick.

When the error occurred, i also updated the included Fling-SDK to the latest version (last week).

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Chris avatar image
Chris answered

With additional logging it seems that every call to the Fling device (sendCommand() / addStatusListener() / setMediaSource()) is throwing an IllegalArgumentException with the following message: "java.lang.IllegalArgumentException: Input Description is null"

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Levon@Amazon avatar image
Levon@Amazon answered

Hi Chris,

Thanks for the exception details. It appears that you are adding WhisperPlay.jar library for your Fire TV app. This library is meant for your non Fire OS apps. Is that right?

Please refer to the instructions here: https://developer.amazon.com/public/apis/experience/fling/docs/setting-up-your-amazon-fling-development-environment-for-android

Once you remove WhisperPlay.jar from your Fire TV app, you should be able to communicate from app to Fire TV. Thanks!

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.