Hi @peder.borg
Thanks for looking into my issue. The problem appears to be when we try to initiate a download from the kiosk in offline mode. In our Android app, we have a method that is called when a user requests to download a video:
public void downloadVideo(String videoManifestUrl) {
SourceConfig sourceConfig = new SourceConfig(videoManifestUrl, SourceType.Dash);
OfflineContentManager offlineContentManager = OfflineContentManager.getOfflineContentManager(sourceConfig,
_file.getPath(),
videoManifestUrl,
this,
_context);
offlineContentManager.getOptions();
}
In our overridden onOptionsAvailable
method, we have the following:
// ...
entry.setAction(OfflineOptionEntryAction.Download);
offlineContentManager.process(offlineContentOptions);
// ...
Based on our TCP dump from our emulator, we believe at this point a call to licensing.bitmovin.com
is hanging or is failing silently.
Here’s that segment of TCP dump from our app:
13:00:17.531863 IP 10.0.2.16.30895 > 10.0.2.3.domain: 43527+ AAAA? licensing.bitmovin.com. (40)
13:00:17.589062 IP 10.0.2.16.18394 > 10.0.2.3.domain: 63146+ A? licensing.bitmovin.com. (40)
13:00:19.529317 ARP, Request who-has 10.0.2.3 tell 10.0.2.16, length 28
13:01:07.729347 IP6 fe80::2 > ff02::1: ICMP6, router advertisement, length 56
13:07:35.886286 IP6 fe80::2 > ff02::1: ICMP6, router advertisement, length 56
13:14:59.388960 IP6 fe80::2 > ff02::1: ICMP6, router advertisement, length 56
13:18:01.845379 IP 10.0.2.16.7485 > 10.0.2.3.domain: 64133+ AAAA? play.googleapis.com. (37)
13:18:01.882870 IP 10.0.2.16.2171 > 10.0.2.3.domain: 10972+ A? play.googleapis.com. (37)
13:18:03.869154 IP 10.0.2.16.6142 > 10.0.2.3.domain: 59701+ A? accounts.google.com. (37)
13:18:03.870939 IP 10.0.2.16.63654 > 10.0.2.3.domain: 26687+ AAAA? accounts.google.com. (37)
As you suggested, I have run the OfflinePlayback app from the samples repo on an Android emulator.
To set up the environment, I blocked licensing.bitmovin.com
on my network through a Pi-hole. Next, I attempted to download one of the video files listed in the app. The network inspector in Android Studio records a request being made to licensing.bitmovin.com
but does not show the request being completed. And downloading fails.
Logcat also shows the following error being thrown in the app:
2022-05-30 23:25:49.503 13472-13542/com.bitmovin.player.samples.offline.playback E/DownloadManager: Task failed: application/dash+xml:/data/user/0/com.bitmovin.player.samples.offline.playback/app_offline/YXJ0T2ZNb3Rpb240:0:0, false
java.lang.NullPointerException: wrapped.getRequestProperty(field) must not be null
at com.android.tools.appinspection.network.httpurl.TrackedHttpURLConnection.getRequestProperty(TrackedHttpURLConnection.kt:235)
at com.android.tools.appinspection.network.httpurl.HttpsURLConnectionWrapper.getRequestProperty(HttpsURLConnectionWrapper.kt:274)
at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.makeConnection(DefaultHttpDataSource.java:625)
at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.makeConnection(DefaultHttpDataSource.java:517)
at com.bitmovin.player.q0.s.a(SourceFile:10)
at com.bitmovin.player.q0.s.makeConnection(SourceFile:2)
at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:359)
at com.bitmovin.player.q0.s.open(SourceFile:4)
at com.bitmovin.player.q0.e.open(SourceFile:12)
at com.google.android.exoplayer2.upstream.TeeDataSource.open(TeeDataSource.java:52)
at com.google.android.exoplayer2.upstream.cache.CacheDataSource.openNextSource(CacheDataSource.java:776)
at com.google.android.exoplayer2.upstream.cache.CacheDataSource.open(CacheDataSource.java:589)
at com.google.android.exoplayer2.upstream.cache.CacheWriter.readBlockToCache(CacheWriter.java:172)
at com.google.android.exoplayer2.upstream.cache.CacheWriter.cache(CacheWriter.java:134)
at com.google.android.exoplayer2.offline.SegmentDownloader$SegmentDownloadRunnable.doWork(SegmentDownloader.java:477)
at com.google.android.exoplayer2.offline.SegmentDownloader$SegmentDownloadRunnable.doWork(SegmentDownloader.java:454)
at com.google.android.exoplayer2.util.RunnableFutureTask.run(RunnableFutureTask.java:125)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
Hopefully, this information is useful.