Skip to content

bug(CDK): Drag and drop: Cannot read properties of null (reading 'style') #27692

@anton-white

Description

@anton-white

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

Hi guys,

We are constantly facing production issues reported by Sentry.
Here is the screenshot:
image

The problem occurs on https://github.com/angular/components/blob/main/src/cdk/drag-drop/dom/styling.ts#L77C18-L77C18

It looks like it happens on Chrome OS only:
image

Affected browser versions:
image

This is a real problem for us, because this error crashes the entire app and users have to refresh the browser and sign in again to bypass it.

Please hint us where to look at.

Reproduction

Unfortunately we cannot reproduce this error locally. Neither we were able to identify conditions that are causing it.

Expected Behavior

No error and no browser crash.

Actual Behavior

Error and browser crash.

Environment

Angular CLI: 16.2.0
Node: 18.16.0
Package Manager: npm 9.6.6
OS: darwin x64

Angular: 16.2.1
... animations, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1602.0
@angular-devkit/build-angular   16.2.0
@angular-devkit/core            16.2.0
@angular-devkit/schematics      16.2.0
@angular/cdk                    16.1.4
@angular/cli                    16.2.0
@angular/material               16.1.4
@schematics/angular             16.2.0
rxjs                            7.8.1
typescript                      5.1.3
zone.js                         0.13.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: cdk/drag-dropneeds: clarificationThe issue does not contain enough information for the team to determine if it is a real bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions