Skip to content

Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'offset') blockedsource.js #262

@casper5822

Description

@casper5822

Hello i have a problem reading a simple tif in angular 11 app with fromUrl.

This is my code:

fromUrl("http://localhost:4200/assets/img/test.tif")
.then(
tiff =>{
console.log(tiff)
})

Version: geotiff 1.0.8

But i get this error:

ERROR Error: Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'offset')
TypeError: Cannot read properties of undefined (reading 'offset')
at blockedsource.js:276
at Array.map ()
at BlockedSource.readSliceData (blockedsource.js:267)
at BlockedSource._callee$ (blockedsource.js:171)
at tryCatch (runtime.js:63)
at Generator.invoke [as _invoke] (runtime.js:294)
at Generator.next (runtime.js:119)
at asyncGeneratorStep (asyncToGenerator.js:3)
at _next (asyncToGenerator.js:25)
at ZoneDelegate.invoke (zone.js:400)
at resolvePromise (zone.js:1255)
at resolvePromise (zone.js:1209)
at zone.js:1321
at ZoneDelegate.invokeTask (zone.js:434)
at Object.onInvokeTask (core.js:28578)
at ZoneDelegate.invokeTask (zone.js:433)
at Zone.runTask (zone.js:205)
at drainMicroTaskQueue (zone.js:620)
at ZoneTask.invokeTask (zone.js:520)
at ZoneTask.invoke (zone.js:505)


In lib code where the error begins i notice this comment:
// TODO: satisfy each slice
return this.readSliceData(slices, requiredBlocks);

I debug this line and the requiredBlocks is this map (size 1):
0: {0 => undefined}

Can you help me?
Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions