-
Notifications
You must be signed in to change notification settings - Fork 181
-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'offset') blockedsource.js #262
Comments
Hi @casper5822 I think the URL should read Maybe this is the issue already. Please let me know if this helps. |
@constantinius the url error is only a typing error here on my github message, thanks i just fix it. |
I made some progress.
|
I see. Can you provide this image somehow? Otherwise it is hard to debug. |
Sorry i'm late @constantinius. |
Hi @casper5822, I'm facing this same issue loading a COG Geotiff in an Angular 12. In what library and which file did you change the above to fix this? |
@jhudson i didn't fix this bug because i think it's a library problem. I made a workaround downloading the file directly with the standard angular http.get and use fromBlob as you can see in my previous comment. |
Thanks @casper5822. Just to add some more information to this bug report, my use case is -> I have an angular 12 application which is using openlayers to consume a cloud optimized geotiff. If I find a resolution to this bug i'll update this post. |
Hi @casper5822 I have found a fix to this bug. In the blockedsource.js file the line Note1: This issue appears to also be present in 2 spots in geotiff.js file. |
@sboag Thanks for the investigation. I will make a patch with that now. |
@casper5822 Can you try with the latest commit to see if the issue is now resolved? |
@constantinius can you release the patch? |
@sboag v1.0.9 is now released |
I've updated to 1.0.9 to address having this same issue. However, now when I npm start my ui, I get:
I've made sure all dependencies (threads, threads-plugin) are up to date and good. Can anyone point me in the right direction? Thanks. |
I would like it to be fixed
and it works for me |
This caused performance problems using the above |
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.
The text was updated successfully, but these errors were encountered: