question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dynamic plugin not showing up in VizTypeControl

See original GitHub issue

I am trying to load a plugin via url.

Expected results

Expect plugin to appear in the list of viz types.

Actual results

Plugin is not showing up in viz type list. I can see that a request is made to https://mysupersethost/dynamic-plugins/api/read and response contains:

{
  "count": 1, 
  "label_columns": {
    "bundle_url": "Bundle URL", 
    "changed_by": "Changed By", 
    "changed_by_fk": "Changed By Fk", 
    "changed_on": "Changed On", 
    "created_by": "Created By", 
    "created_by_fk": "Created By Fk", 
    "created_on": "Created On", 
    "id": "Id", 
    "key": "Key", 
    "name": "Name"
  }, 
  "list_columns": [
    "name", 
    "key", 
    "bundle_url", 
    "id"
  ], 
  "modelview_name": "DynamicPluginsView", 
  "order_columns": [
    "name", 
    "key", 
    "bundle_url", 
    "id"
  ], 
  "page": null, 
  "page_size": null, 
  "pks": [
    15
  ], 
  "result": [
    {
      "bundle_url": "url_from_which_plugin_is_served", 
      "id": 15, 
      "key": "superset-indicator-chart", 
      "name": "Indicator Chart"
    }
  ]
}

However, the plugin chart does not appear in the modal. I believe this could be a recent regression because I remember being able to use this feature.

How to reproduce the bug

  1. Write your own plugin using https://github.com/apache-superset/dynamic-import-demo-plugin as template
  2. Run npm install and npm run build, then npm run serve to serve dist dir
  3. Expose port via HTTP server
  4. Enable feature flag on Superset host, run superset init
  5. Go to ‘Settings -> Plugins’ and create a plugin entry containing plugin url
  6. Go to ‘Chart -> Create New’ and verify that your plugin does not appear in the list of viz types

Environment

(please complete the following information):

  • superset version: latest master as of now, latest commit 57035c1b93331b925e9bf91f757f365807ca70ab
  • python version: 3.8.7
  • node.js version: v14.16.0

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven’t found one similar.

Additional context

I have verified that the plugin is working when imported directly in source and linked as here: https://superset.apache.org/docs/installation/building-custom-viz-plugins.

I also debugged and stepped over the piece of code importing the plugin (https://github.com/apache/superset/blob/9773aba522e957ed9423045ca153219638a85d2f/superset-frontend/src/components/DynamicPlugins/index.tsx#L150) and made sure there is no error upon importing.

I have also made sure that the name of the plugin in the package.json is the same as the one in Superset.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
krsnik93commented, Aug 3, 2021

@suddjian hello, any updates on this issue?

1reaction
suddjiancommented, Jun 23, 2021

Thank you so much for your debugging efforts @krsnik93! I think I understand the problem before even needing to repro 😁 I am actively working on this file so I should be able to address the problem quite soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix documentation · Issue #2 · apache/superset · GitHub
Hi, documentation ask to launch : python app.py But it's python run.py Thank you,
Read more >
[Bug] NullReferenceException when displaying Toast or SnackBar ...
So the issue isn't with our code and with Shell navigation, I suppose. When I add that Task.Delay everything works as expected. I...
Read more >
Superset: .../zh/LC_MESSAGES/messages.po | Fossies
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PO translation source code syntax...
Read more >
CHANGELOG.md · update-gitignore · qq_22812535 / incubator ...
c447a97 [css] show border around editable input while editing (@mistercrunch) ... #5181 fix Formula type annotation, it doesn't show up since #4630 (#5181) ......
Read more >
CHANGELOG.md · 黄俊俊/incubator-superset - Gitee.com
... #6251 [Fix] merge since,until request parameter with time_range (#6251) (@graceguo-supercat); #6235 Make VizTypeControl use metadata from plugin (#6235) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found