Skip to content

webgl not supported #4989

Closed
Closed
@danielfrunza

Description

@danielfrunza

WARN: webgl setup failed possibly due to enabling preserveDrawingBuffer config. The device may not be supported by is-mobile module! Inverting preserveDrawingBuffer option in second attempt to create webgl scene.

The above message is displayed despite that my browser supports WebGL as here

The environment:
Angular: 9.0.7
PlotlyJS: 1.54.5
Chrome: Version 83.0.4103.116 (Official Build) (64-bit)

Steps to reproduce:

  1. create an angular 9 project
  2. npm install plotly.js
  3. add plotly.min.js in scripts in angular.json:
    "scripts": [ "node_modules/plotly.js/dist/plotly.min.js" ]
  4. create an angular component and add a 3D surface plot from docs
  5. ng serve --prod

When using the --prod from angular compiler, I think that the already minified plotly.min.js gets bundled and minified in a wrong way. If the angular app is served or build without the '--prod' option everything works as expected.

PS: The last version of Plotly that is still working with --prod flag is 1.41.3

SS without --prod
plotly2

SS with --prod
plotly1
plotly3

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