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 2023/01/09 10:09:15 UTC

[GitHub] [superset] ivanshamaev opened a new issue, #22641: Deployment custom viz plugin hello world in superset image 2.0.0 & 2.0.1. Unexpected error: TypeError: Go.default is not a constructor

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

   Hi all!
   
   On new releases 2.0.0 and 2.0.1, I can't repeat the deployment of custom visualization into a superset image (as I used to do on 1.3.2 version). I get an **"Unexpected error: TypeError: Go.default is not a constructor"** error, while neither the dashboard nor the creation of charts work. Something is wrong in the image built locally by me. Without custom plugin all works. With plugin - it shows the error.
   
   **The sequence of my actions:**
   1. Created a new demo plugin using the new instructions [https://preset.io/blog/building-custom-viz-plugins-in-superset-v2/](https://preset.io/blog/building-custom-viz-plugins-in-superset-v2/) and [https://superset.apache.org/docs/contributing/creating-viz-plugins](https://superset.apache.org/docs/contributing/creating-viz-plugins).
   2. Checked through the dev server, everything works .
   3. Published demo hello world plugin in npmjs (public repository) - [https://www.npmjs.com/package/superset-plugin-chart-counters-new](https://www.npmjs.com/package/superset-plugin-chart-counters-new)
   4. Added lines to **package.json** & **MainPreset.js** files
   5. Launched the image build. Everything worked without errors
   6. Run docker-compose locally with the image that I built
   7. I go to the dashboard or create a chart - an error is shown.
   
   In version 1.3.2, I did exactly these steps for deploying plugins. But in the new version it doesn't work for some reason. My searches have not yielded results.
   
   -------
   
   **_superset/superset-frontend/package.json_**
   `"superset-plugin-chart-counters-new": "0.1.0",`
   
   **_superset/superset-frontend/src/visualizations/presets/MainPreset.js_**
   ```import SupersetPluginChartCountersNew from 'superset-plugin-chart-counters-new';
   
   new SupersetPluginChartCountersNew().configure({
   key: 'superset-plugin-chart-counters-new',
   }),
   ```
   
   **_Building an image_**
   `sudo docker build -f Dockerfile --force-rm -t apache/temp-superset:2.0.12 .`
   
   **_run docker-compose:_**
   `sudo docker-compose -f docker-compose-non-dev.yml up`
   
   ### Other errors from docker containers
   ```
   List of error:
   Unexpected error: TypeError: Go.default is not a constructor
   
   Unhealthy container superset_worker:
   [2023-01-05 15:46:00,053: INFO/MainProcess] Task reports.scheduler[b0fccb65-8f9e-49f1-a89a-cf6c6929cb82] received
   [2023-01-05 15:46:00,073: INFO/ForkPoolWorker-1] Task reports.scheduler[b0fccb65-8f9e-49f1-a89a-cf6c6929cb82] succeeded in 0.018434799000260682s: None
   
   Unhealthy container superset_worker_beat:
   [2023-01-05 15:48:00,050: INFO/MainProcess] Scheduler: Sending due task reports.scheduler (reports.scheduler)
   
   Common log:
   superset_app          | [2023-01-05 15:39:04 +0000] [10] [ERROR] Error handling request
   superset_app          | Traceback (most recent call last):
   superset_app          |   File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/gthread.py", line 326, in handle_request
   superset_app          |     resp.write_file(respiter)
   superset_app          |   File "/usr/local/lib/python3.8/site-packages/gunicorn/http/wsgi.py", line 385, in write_file
   superset_app          |     if not self.sendfile(respiter):
   superset_app          |   File "/usr/local/lib/python3.8/site-packages/gunicorn/http/wsgi.py", line 375, in sendfile
   superset_app          |     self.sock.sendfile(respiter.filelike, count=nbytes)
   superset_app          |   File "/usr/local/lib/python3.8/socket.py", line 482, in sendfile
   superset_app          |     return self._sendfile_use_sendfile(file, offset, count)
   superset_app          |   File "/usr/local/lib/python3.8/socket.py", line 346, in _sendfile_use_sendfile
   superset_app          |     self._check_sendfile_params(file, offset, count)
   superset_app          |   File "/usr/local/lib/python3.8/socket.py", line 460, in _check_sendfile_params
   superset_app          |     raise ValueError(
   superset_app          | ValueError: count must be a positive integer (got 0)
   ```
   
   


-- 
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] ivanshamaev commented on issue #22641: Deployment custom viz plugin hello world in superset image 2.0.0 & 2.0.1. Unexpected error: TypeError: Go.default is not a constructor

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

   Problem was in npm 8 on my local computer where I built viz plugin. 
   I switched on npm 7 used by command `sudo npm install -g npm@7`
   Then I recreated new hello world plugin, published it on npmjs. 
   
   Now it works well.


-- 
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] rusackas commented on issue #22641: Deployment custom viz plugin hello world in superset image 2.0.0 & 2.0.1. Unexpected error: TypeError: Go.default is not a constructor

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

   Do you know what `Go.default` actually _is_? I don't see it anywhere in the codebase, so I suspect it's part of your custom plugin. 
   
   It looks like you might be calling `new` on that, and whatever data type it is doesn't support that. Here's some [generic info](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Not_a_constructor) on the error type you're encountering.


-- 
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] ivanshamaev commented on issue #22641: Deployment custom viz plugin hello world in superset image 2.0.0 & 2.0.1. Unexpected error: TypeError: Go.default is not a constructor

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

   [https://github.com/apache/superset/issues/20768](https://github.com/apache/superset/issues/20768) did not help.
   
   Some images with error **Unexpected error: TypeError: Go.default is not a constructor**:
   ![error_details](https://user-images.githubusercontent.com/16321084/211284699-023a2efc-99a7-4876-81b7-792c1c425e9a.png)
   
   ![unexpected_error_and_superset_version](https://user-images.githubusercontent.com/16321084/211284701-97d5908d-f73e-4a4b-8890-d77e41359b59.png)
   
   ![dev-server-success](https://user-images.githubusercontent.com/16321084/211284704-868c4db9-30b0-411e-966a-1fd09445e74a.png)
   


-- 
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] ivanshamaev closed issue #22641: Deployment custom viz plugin hello world in superset image 2.0.0 & 2.0.1. Unexpected error: TypeError: Go.default is not a constructor

Posted by GitBox <gi...@apache.org>.
ivanshamaev closed issue #22641: Deployment custom viz plugin hello world in superset image 2.0.0 & 2.0.1. Unexpected error: TypeError: Go.default is not a constructor
URL: https://github.com/apache/superset/issues/22641


-- 
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