Skip to content
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

Cannot read property 'self' of null #402

Closed
MorelSerge opened this issue Jul 13, 2020 · 8 comments
Closed

Cannot read property 'self' of null #402

MorelSerge opened this issue Jul 13, 2020 · 8 comments
Labels

Comments

@MorelSerge
Copy link

I'm stumbling on an error: Cannot read property 'self' of null

It occurs at dist/muuri.module.js in getOffset at line 2567:15, meaning right here:

if (element.self === window.self) return offset;

Seems like a problem in ItemDrag, passing a null value to getOffsetDiff?

Any help is appreciated!

@niklasramo
Copy link
Collaborator

Hi @Vluf ! Can you give specific steps how to reproduce this error? A reduced test case would be nice.

@MorelSerge
Copy link
Author

Hi @niklasramo, thanks for getting back to me!
Unfortunately I cannot reproduce this error, it is merely happening in our production SPA and only on Android mobile.

This issue happens during dragging tiles. We happen to log the dragging, so right before crashing it's still logging the drag events.
E.g.

[{"clientX":251.71875,"clientY":510.4609375,"screenX":251.630859375,"isFirst":false,"distance":0,"deltaX":0,"deltaY":0,"isFinal":false,"deltaTime":0,"srcEvent":"[object TouchEvent]","pageX":251.630859375,"pageY":475.2314453125,"pointerType":"touch","screenY":547.2314453125,"identifier":0,"type":"move","target":"[object HTMLDivElement]"}]

I'm more than happy to investigate further or deploy some logging for this, but as of right now I cannot reproduce.

Any guidance in how to proceed from here?
Thanks!

@niklasramo
Copy link
Collaborator

I managed to reproduce this issue once while autoscrolling, but not twice.. no matter how hard I tried to do wonky stuff. It's definitely an edge case and it's definitely very rare.

This issue is probably linked to #403 , both errors pop up when stuff goes sideways.

The first thing we need to do is find the the steps how to reproduce it or at least narrow down the scenario as much as possible. Would be awesome if you could help with that @Vluf ❤️ I have no clear steps as to where to start, but autoscrolling is my best bet. It is somehow linked to that.

@MorelSerge
Copy link
Author

I've been trying to break our production app for quite a while now and can't seem to introduce this bug.

Do you have any indication on what you did that one time you were able to reproduce?

@niklasramo
Copy link
Collaborator

niklasramo commented Jul 16, 2020

My best guess is it's happening right after autoscrolling stops, probably linked somehow to releasing a dragged item during autoscroll.

@MorelSerge
Copy link
Author

I'm getting reports from Chrome 83 on Mac OS X 10.14.6 as well

@niklasramo
Copy link
Collaborator

@Vluf I think I fixed this in the latest version v0.9.2, let me know if you still encounter this issue with that version.

@MorelSerge
Copy link
Author

@niklasramo According to Sentry, this is indeed fixed in v0.9.2. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants