workload-discovery-on-aws icon indicating copy to clipboard operation
workload-discovery-on-aws copied to clipboard

Cannot export to draw.io. Browser console shows CORS error.

Open migscabral opened this issue 3 years ago • 2 comments

Describe the bug Nothing happens when I export to draw.io. Browser console shows CORS errors.

To Reproduce Steps to reproduce the behavior:

  1. Go to Actions -> Export -> Draw.io
  2. Nothing happens.
  3. Open browser console, and see CORS errors

Expected behavior

Diagram is exported to draw.io

Screenshots

Screen Shot 2021-12-02 at 10 11 10 AM

Browser (please complete the following information):

  • Name: chrome
  • Version: 95.0.4638.69 (Official Build) (x86_64)

Additional context

Error from browser console:

Access to XMLHttpRequest at 'https://x3isczre30.execute-api.us-west-2.amazonaws.com/Prod//resources' from origin 'https://d1b7om70zj2v3b.cloudfront.net' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
...
x3isczre30.execute-api.us-west-2.amazonaws.com/Prod//resources:1 Failed to load resource: net::ERR_FAILED

migscabral avatar Dec 02 '21 02:12 migscabral

Sorry for the delay getting back to you on this. Could you please take a look at the DrawIOExportFunction logs and see if there are any errors?

This may be related to this issue. We are working on a fix for this.

thebutler12 avatar Dec 16 '21 09:12 thebutler12

@thebutler12

I have the same error on v1.1.4

DrawIOExportFunction error log

[ERROR] TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'
Traceback (most recent call last):
  File "/var/task/main.py", line 178, in handler
    xml_output = produce_xml_output(elements)
  File "/var/task/main.py", line 216, in produce_xml_output
    xml_object = elem.get_xml_object()
  File "/var/task/main.py", line 99, in get_xml_object
    'x': str(self.x),
  File "/var/task/main.py", line 67, in x
    children_points = list(
  File "/var/task/main.py", line 68, in <lambda>
    filter(None, map(lambda c: (c.center_x - 0.5*c.width), self.children)))
  File "/var/task/main.py", line 54, in width
    children_points = list(
  File "/var/task/main.py", line 55, in <lambda>
    filter(None, map(lambda c: (c.width*0.5 + c.center_x), self.children)))
  File "/var/task/main.py", line 54, in width
    children_points = list(
  File "/var/task/main.py", line 55, in <lambda>
    filter(None, map(lambda c: (c.width*0.5 + c.center_x), self.children)))
  File "/var/task/main.py", line 54, in width
    children_points = list(
  File "/var/task/main.py", line 55, in <lambda>
    filter(None, map(lambda c: (c.width*0.5 + c.center_x), self.children)))

chatii avatar May 26 '22 07:05 chatii

This will be fixed in v2.1.0.

svozza avatar Jun 30 '23 14:06 svozza

Addressed in v2.1.0

morjoan avatar Sep 26 '23 20:09 morjoan