Not able to read pdf in device using pdf js in ionic 2

#1

Able to view pdf on browser using ionic serve ,but not able to view pdf on device(Testing on android right now).

Please see below for error msg-

polyfills.js:3 Fetch API cannot load file:///android_asset/www/assets/imgs/11.pdf. URL scheme “file” is not supported.

(anonymous) @ polyfills.js:3

t @ 0.js:1

value @ 0.js:1

(anonymous) @ 0.js:1

(anonymous) @ 0.js:1

i @ 0.js:1

(anonymous) @ 0.js:1

t.(anonymous function) @ 0.js:1

n @ 0.js:1

(anonymous) @ 0.js:1

t @ polyfills.js:3

(anonymous) @ 0.js:1

(anonymous) @ 0.js:1

_createStreamSink @ 0.js:1

_onComObjOnMessage @ 0.js:1

t.invokeTask @ polyfills.js:3

onInvokeTask @ vendor.js:1

t.invokeTask @ polyfills.js:3

r.runTask @ polyfills.js:3

e.invokeTask @ polyfills.js:3

p @ polyfills.js:2

v @ polyfills.js:2

vendor.js:1 ERROR Error: Uncaught (in promise): TypeError: Failed to fetch

TypeError: Failed to fetch

at polyfills.js:3

at new t (0.js:1)

at t.value (0.js:1)

at t.<anonymous> (0.js:1)

at 0.js:1

at i (0.js:1)

at Generator._invoke (0.js:1)

at Generator.t.(anonymous function) [as next] (file:///android_asset/www/build/0.js:1:278295)

at n (0.js:1)

at 0.js:1

at c (polyfills.js:3)

at polyfills.js:3

at t.invoke (polyfills.js:3)

at Object.onInvoke (vendor.js:1)

at t.invoke (polyfills.js:3)

at r.run (polyfills.js:3)

at polyfills.js:3

at t.invokeTask (polyfills.js:3)

at Object.onInvokeTask (vendor.js:1)

at t.invokeTask (polyfills.js:3)

(anonymous) @ vendor.js:1

t.handleError @ vendor.js:1

e.handleError @ vendor.js:1

next @ vendor.js:1

e.object.i @ vendor.js:1

e.__tryOrUnsub @ vendor.js:1

e.next @ vendor.js:1

e._next @ vendor.js:1

e.next @ vendor.js:1

e.next @ vendor.js:1

e.emit @ vendor.js:1

(anonymous) @ vendor.js:1

t.invoke @ polyfills.js:3

r.run @ polyfills.js:3

t.runOutsideAngular @ vendor.js:1

onHandleError @ vendor.js:1

t.handleError @ polyfills.js:3

r.runGuarded @ polyfills.js:3

(anonymous) @ polyfills.js:3

n.microtaskDrainDone @ polyfills.js:3

o @ polyfills.js:3

Promise.then (async)

r @ polyfills.js:3

t.scheduleTask @ polyfills.js:3

onScheduleTask @ polyfills.js:3

t.scheduleTask @ polyfills.js:3

r.scheduleTask @ polyfills.js:3

r.scheduleMicroTask @ polyfills.js:3

f @ polyfills.js:3

c @ polyfills.js:3

(anonymous) @ polyfills.js:3

Promise.then (async)

(anonymous) @ polyfills.js:3

t @ polyfills.js:3

t.then @ polyfills.js:3

t @ 0.js:1

value @ 0.js:1

(anonymous) @ 0.js:1

(anonymous) @ 0.js:1

i @ 0.js:1

(anonymous) @ 0.js:1

t.(anonymous function) @ 0.js:1

n @ 0.js:1

(anonymous) @ 0.js:1

t @ polyfills.js:3

(anonymous) @ 0.js:1

(anonymous) @ 0.js:1

_createStreamSink @ 0.js:1

_onComObjOnMessage @ 0.js:1

t.invokeTask @ polyfills.js:3

onInvokeTask @ vendor.js:1

t.invokeTask @ polyfills.js:3

r.runTask @ polyfills.js:3

e.invokeTask @ polyfills.js:3

p @ polyfills.js:2

v @ polyfills.js:2

vendor.js:1 ERROR Error: Uncaught (in promise): DataCloneError: Failed to execute ‘postMessage’ on ‘Worker’: TypeError: Failed to fetch could not be cloned.

Error: Failed to execute ‘postMessage’ on ‘Worker’: TypeError: Failed to fetch could not be cloned.

at o.postMessage (0.js:1)

at l (0.js:1)

at Object.error (0.js:1)

at 0.js:1

at t.invoke (polyfills.js:3)

at Object.onInvoke (vendor.js:1)

at t.invoke (polyfills.js:3)

at r.run (polyfills.js:3)

at polyfills.js:3

at t.invokeTask (polyfills.js:3)

at c (polyfills.js:3)

at polyfills.js:3

at t.invokeTask (polyfills.js:3)

at Object.onInvokeTask (vendor.js:1)

at t.invokeTask (polyfills.js:3)

at r.runTask (polyfills.js:3)

at o (polyfills.js:3)

at e.invokeTask [as invoke] (polyfills.js:3)

at p (polyfills.js:2)

at Worker.v (polyfills.js:2)