You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/05/17 15:17:31 UTC

[GitHub] [superset] EBoisseauSierra opened a new issue, #20100: Error when trying to use a custom viz plugin as per blog post

EBoisseauSierra opened a new issue, #20100:
URL: https://github.com/apache/superset/issues/20100

   I have created a HelloWorld custom viz plugin as per https://preset.io/blog/building-custom-viz-plugins-in-superset-v2/
   
   Yet Superset becomes unstable after I load it.
   
   #### How to reproduce the bug
   
   1. Follow the [blog post](https://preset.io/blog/building-custom-viz-plugins-in-superset-v2/) instructions up to the `npm run dev-server` code block.
   2. Run Superset in dev mode (cf. below),
   3. Open the browser and try to:
     * Create a chart,
     * List already existing charts.
   
   ### Expected results
   
   It works as in the blogpost.
   
   ### Actual results
   
   I get a different kind of error in each case.
   
   #### Screenshots
   
   **Issue 1**: Adding new chart
   
   ![Screenshot from 2022-05-17 16-10-55](https://user-images.githubusercontent.com/37387755/168845785-ed76c8d7-a765-4eca-97c4-dd92793ad50d.png)
   
   **Issue 2**: Listing charts
   
   ![Screenshot from 2022-05-17 16-14-06](https://user-images.githubusercontent.com/37387755/168846317-2fd8c953-6395-46f8-953b-f546d63f544a.png)
   
   
   ### Environment
   
   - browser type and version: Firefox DevEd 101.0b7
   - superset version: tested on `1.5.0` and `e69f6292c`
   - python version: `3.8.13`
   - node.js version: `16.14.2`
   - any feature flags active: n/a
   
   ### Checklist
   
   - [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   ### Additional context
   
   I'm accessing Superset running:
   
   * `cd /tmp/superset-hello-world && npm run dev`
   * `cd superset && FLASK_ENV=development superset run -p 8088 --with-threads --reload --debugger `
   * `cd superset/superset-frontend && npm run dev-server`
   
   ----
   ```
   $ npm run dev-server
   
   > superset@1.5.0 dev-server
   > cross-env NODE_ENV=development BABEL_ENV=development node --max_old_space_size=4096 ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --mode=development
   
   [Superset Plugin] Use symlink source for @superset-ui/chart-controls @ ./packages/superset-ui-chart-controls
   [Superset Plugin] Use symlink source for @superset-ui/core @ ./packages/superset-ui-core
   [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-calendar @ ./plugins/legacy-plugin-chart-calendar
   [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-chord @ ./plugins/legacy-plugin-chart-chord
   [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-country-map @ ./plugins/legacy-plugin-chart-country-map
   [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-event-flow @ ./plugins/legacy-plugin-chart-event-flow
   [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-heatmap @ ./plugins/legacy-plugin-chart-heatmap
   [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-histogram @ ./plugins/legacy-plugin-chart-histogram
   [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-horizon @ ./plugins/legacy-plugin-chart-horizon
   [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-map-box @ ./plugins/legacy-plugin-chart-map-box
   [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-paired-t-test @ ./plugins/legacy-plugin-chart-paired-t-test
   [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-parallel-coordinates @ ./plugins/legacy-plugin-chart-parallel-coordinates
   [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-partition @ ./plugins/legacy-plugin-chart-partition
   [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-pivot-table @ ./plugins/legacy-plugin-chart-pivot-table
   [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-rose @ ./plugins/legacy-plugin-chart-rose
   [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-sankey @ ./plugins/legacy-plugin-chart-sankey
   [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-sankey-loop @ ./plugins/legacy-plugin-chart-sankey-loop
   [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-sunburst @ ./plugins/legacy-plugin-chart-sunburst
   [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-treemap @ ./plugins/legacy-plugin-chart-treemap
   [Superset Plugin] Use symlink source for @superset-ui/legacy-plugin-chart-world-map @ ./plugins/legacy-plugin-chart-world-map
   [Superset Plugin] Use symlink source for @superset-ui/legacy-preset-chart-deckgl @ ./plugins/legacy-preset-chart-deckgl
   [Superset Plugin] Use symlink source for @superset-ui/legacy-preset-chart-nvd3 @ ./plugins/legacy-preset-chart-nvd3
   [Superset Plugin] Use symlink source for @superset-ui/plugin-chart-echarts @ ./plugins/plugin-chart-echarts
   [Superset Plugin] Use symlink source for @superset-ui/plugin-chart-handlebars @ ./plugins/plugin-chart-handlebars
   [Superset Plugin] Use symlink source for @superset-ui/plugin-chart-pivot-table @ ./plugins/plugin-chart-pivot-table
   [Superset Plugin] Use symlink source for @superset-ui/plugin-chart-table @ ./plugins/plugin-chart-table
   [Superset Plugin] Use symlink source for @superset-ui/plugin-chart-word-cloud @ ./plugins/plugin-chart-word-cloud
   [Superset Plugin] Use symlink source for @superset-ui/preset-chart-xy @ ./plugins/preset-chart-xy
   [Superset Plugin] Use symlink source for @superset-ui/switchboard @ ./packages/superset-ui-switchboard
   
   1% setup initialize[HPM] Proxy created: /  -> http://localhost:8088
   <i> [webpack-dev-server] Project is running at:
   <i> [webpack-dev-server] Loopback: http://localhost:9000/
   <i> [webpack-dev-server] On Your Network (IPv4): http://192.168.1.66:9000/
   <i> [webpack-dev-server] On Your Network (IPv6): http://[fe80::f23e:9459:7104:e585]:9000/
   <i> [webpack-dev-server] Content not from webpack is served from '/home/ebosi/documents/superset/static/assets' directory
   <i> [webpack-dev-server] 404s will fallback to '/index.html'
   794 assets
   10964 modules
   
   WARNING in ./node_modules/@data-ui/shared/esm/enhancer/WithTooltip.js 3:60-78
   export 'withTooltipPropTypes' (imported as 'vxTooltipPropTypes') was not found in '@vx/tooltip/build/tooltips/TooltipWithBounds' (possible exports: __esModule, default)
   
   WARNING in ./src/dashboard/components/Header/index.jsx 60:8-35
   export 'UserWithPermissionsAndRoles' (imported as 'UserWithPermissionsAndRoles') was not found in 'src/types/bootstrapTypes' (possible exports: isUser, isUserWithPermissionsAndRoles)
   
   WARNING in ./src/visualizations/presets/MainPreset.js 168:10-39
   export 'SupersetPluginChartHelloWorld' (imported as 'SupersetPluginChartHelloWorld') was not found in 'superset-hello-world' (possible exports: SupersetHelloWorld)
   
   WARNING in ./src/components/Checkbox/index.tsx 19:0-74
   export 'CheckboxProps' (reexported as 'CheckboxProps') was not found in 'src/components/Checkbox/Checkbox' (possible exports: default)
   
   WARNING in ./src/components/Popover/index.tsx 20:0-48
   export 'PopoverProps' (reexported as 'PopoverProps') was not found in 'antd/lib/popover' (possible exports: __esModule, default)
   
   WARNING in ./src/components/Popover/index.tsx 21:0-52
   export 'TooltipPlacement' (reexported as 'TooltipPlacement') was not found in 'antd/lib/tooltip' (possible exports: __esModule, default)
   
   WARNING in ./src/utils/textUtils.ts 23:13-46
   Module not found: Error: Can't resolve '../../../superset_text' in '/home/ebosi/documents/superset/superset-frontend/src/utils'
   
   webpack 5.52.1 compiled with 7 warnings in 61633 ms
   [HPM] Proxy created: /  -> http://localhost:8088
   
   ```
   ----
   
   Error when trying to access `./chart/list`:
   
   > Unexpected error: TypeError: superset_hello_world__WEBPACK_IMPORTED_MODULE_54__.SupersetPluginChartHelloWorld is not a constructor
   
   ```
       in Unknown (at App.tsx:61)
       in ErrorBoundary (at App.tsx:60)
       in Suspense (at App.tsx:59)
       in Route (at App.tsx:58)
       in Switch (at App.tsx:57)
       in LocationProvider (created by Context.Consumer)
       in Route (created by QueryParamProvider)
       in QueryParamProvider (at RootContextProviders.tsx:38)
       in DynamicPluginProvider (at RootContextProviders.tsx:37)
       in EmbeddedUiConfigProvider (at RootContextProviders.tsx:36)
       in FlashProvider (at RootContextProviders.tsx:35)
       in Unknown (at RootContextProviders.tsx:34)
       in Provider (at RootContextProviders.tsx:33)
       in ThemeProvider (at RootContextProviders.tsx:32)
       in RootContextProviders (at App.tsx:54)
       in Router (created by BrowserRouter)
       in BrowserRouter (at App.tsx:52)
       in App (created by HotExportedApp)
       in AppContainer (created by HotExportedApp)
       in HotExportedApp (at views/index.tsx:22)
       ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] EBoisseauSierra closed issue #20100: Error when trying to use a custom viz plugin as per blog post

Posted by GitBox <gi...@apache.org>.
EBoisseauSierra closed issue #20100: Error when trying to use a custom viz plugin as per blog post
URL: https://github.com/apache/superset/issues/20100


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] EBoisseauSierra commented on issue #20100: Error when trying to use a custom viz plugin as per blog post

Posted by GitBox <gi...@apache.org>.
EBoisseauSierra commented on issue #20100:
URL: https://github.com/apache/superset/issues/20100#issuecomment-1129001319

   @villebro I'm taking the liberty of tagging you as I think it's your corner (:


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] EBoisseauSierra commented on issue #20100: Error when trying to use a custom viz plugin as per blog post

Posted by GitBox <gi...@apache.org>.
EBoisseauSierra commented on issue #20100:
URL: https://github.com/apache/superset/issues/20100#issuecomment-1129004972

   :facepalm: It was a clerical error of mine, that was hiding in plain sight in the logs:
   
   > export 'SupersetPluginChartHelloWorld' (imported as 'SupersetPluginChartHelloWorld') was not found in 'superset-hello-world' (possible exports: SupersetHelloWorld)
   
   Importing the module with the correct name solved the issues.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org