Unable to pass cors "*" as args to helm install

Hi team,

Unable to pass --enable-api --cors “" as args in helm values. Pods crash with with error unknow command "

i think you need to pass them as list of values.

['--enable-api', '--cors', '"*"']

Yes tried passing it as a list of values. “*” Is being considered as a command rather than the args

More details:

logs from pod: usage: rasa [-h] [–version] {init,run,shell,train,interactive,telemetry,test,visualize,data,export,x} … rasa: error: invalid choice: ‘"*"’ (choose from ‘init’, ‘run’, ‘shell’, ‘train’, ‘interactive’, ‘telemetry’, ‘test’, ‘visualize’, ‘data’, ‘export’, ‘x’)

values: rasa:

version: “2.6.3” # Please update the default value in the Readme when updating this

command: []

args: [’–enable-api’,’–cors’, ‘"*"’]

extraArgs: []

Was able to solve cors issue. Values.yml file socket was enabled with wrong values.

Hi bro, I am also facing the same issue. Can you please share the configurations you used in your values.yml file, i.e., rasa config and socketio config.

Hi @basudev ,

Please find the rasa config with socket.io

rasa:

additionalChannelCredentials:
socketio:
  user_message_evt: user_uttered
  bot_message_evt: bot_uttered
  session_persistence: true
1 Like

Thanks for replying. But this config I have already added. Also I have added extraArgs for rasa as extraArgs: ['--enable-api', '--cors', '"*"'] But I am still getting the cors error -

`Access to XMLHttpRequest at 'http://xxxxxxx:8000/socket.io/?EIO=4&transport=polling&t=NqwerLN' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.`

Can you please also share your rasa config(command, args, and extraArgs if you are using).

Hi @basudev ,

I have kept them empty, as they were crashing with errors. Please find the rasa config section below.

rasa:

version: “2.6.3”
command: [] args: [] extraArgs: [] name: “rasa/rasa” tag: “” port: 5005 scheme: http token: “rasaToken” rabbitQueue: “rasa_production_events” additionalRabbitQueues: []

1 Like

@basudev Seems the issue has cropped again. Manipulating the nginx config also seems to be failing.

1 Like

@souvikg10

When trying to edit the Rasa Pod, noticed that --cors “*” is present in the default arguments as mentioned below but with single quotes. Could you please let me know if there is a way to edit it to accept double quotes? I did try adding extra args but still single quotes get added.

automountServiceAccountToken: false containers:

1 Like

Deleted all my deployments and persistence storages, and redeployed everything just fell in place.

1 Like

Hi @ChangappaMA ,

I used these values for myself and then it worked for me -

# rasa: Settings common for all Rasa containers
rasa:
    # tag refers to the Rasa image tag
    tag: "2.7.1-full"
    # override the default arguments to run in the container
    args: []
    # add extra arguments to the command in the container
    extraArgs: ['--enable-api', '--cors', "*"]
    # additionalChannelCredentials which should be used by Rasa to connect to various
    # input channels
    additionalChannelCredentials:
        socketio:
            user_message_evt: user_uttered
            bot_message_evt: bot_uttered
            session_persistence: true
1 Like

Hello @basudev. Can you help me out? I’ve tried that same config but I’m still getting a CORS error when trying to use the Agent deployed in Rasa X from the Rasa’s widget.

This is the error I get:

Access to XMLHttpRequest at ‘http://xxxxxxxxxx/socket.io/?EIO=4&transport=polling&t=O6GA23I’ from origin ‘http://0.0.0.0:8000’ has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space `private

Any ideas? I’m using the same values that you show for “extraArgs”, but it does not work.