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.

blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource

See original GitHub issue

Rasa version: 1.3.2

Rasa X version (if used & relevant):

Python version:3.6

Operating system (windows, osx, …): Windows 10

Issue:

We are not able to connect MR.bot widget with rasa using socketio.

I had faced the same issue in rasa = 1.2.0 but after downgrading the python-engineio==3.8.1 .

After seeing a lot of articles that this issue is fixed in the new version. I tried to install the rasa =1.3.2

but the issue is same and looks like it’s not fixed. Could anybody please help?

Mr bot script

<script>
    WebChat.default.init({
        selector: "#webchat",
        initPayload:
            "/get_started",
        interval: 1000, 
        socketUrl: "http://localhost:5005", 
        socketPath: "/socket.io/",
        title: "Chat ",
        subtitle: "",
        inputTextFieldHint: "Type a message...",
        connectingText: "Waiting for server...",
        hideWhenNotConnected: false,
        fullScreenMode: false,
        profileAvatar: "Images/User.png",
        openLauncherImage:
            "",
        closeLauncherImage: "",
        params: {
            images: {
                dims: {
                    width: 300,
                    height: 200,
                }
            },
            storage: "session"
        }
    });
</script>

Credentials.yml


socketio:
  user_message_evt: user_uttered
  bot_message_evt: bot_uttered
  session_persistence: true

Error (including full traceback): Access to XMLHttpRequest at ‘http://localhost:5005/socket.io/?EIO=3&transport=polling&t=MqhDu8m’ from origin ‘http://localhost:3073’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

Command or request that led to error:

rasa run -m models --credentials credentials.yml --cors '*'

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
piyush29programmercommented, Sep 16, 2019

No we are using rasa only .

Get Outlook for Androidhttps://aka.ms/ghei36


From: Ella Rohm-Ensing notifications@github.com Sent: Monday, September 16, 2019 10:27:57 PM To: RasaHQ/rasa rasa@noreply.github.com Cc: Piyush Kumar piyush29kumar@hotmail.com; Author author@noreply.github.com Subject: Re: [RasaHQ/rasa] blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource (#4459)

It shouldn’t be an issue in production, you can also secure the API with a token so that there aren’t any erroneous requests coming in. Are you using Rasa x at all? If so, there currently isn’t a version that runs on Rasa>=1.3

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/RasaHQ/rasa/issues/4459?email_source=notifications&email_token=ACQHJZHBWNYYVRL35YGLIZLQJ63JLA5CNFSM4IWRWT4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6ZZY6I#issuecomment-531864697, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACQHJZBS4QTDUTEDQFEZGZ3QJ63JLANCNFSM4IWRWT4A.

0reactions
erohmensingcommented, Sep 28, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

Reason: CORS header 'Access-Control-Allow-Origin' missing
The response to the CORS request is missing the required Access-Control-Allow-Origin header, which is used to determine whether or not the ...
Read more >
Why does my JavaScript code receive a "No 'Access-Control ...
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. I know that the API ...
Read more >
3 Ways to Fix the CORS Error — and How the Access-Control ...
Fix one: install the Allow-Control-Allow-Origin plugin. The quickest fix you can make is to install the moesif CORS extension .
Read more >
Fixing "No 'Access-Control-Allow-Origin' Header Present"
This error occurs when a script on your website/web app attempts to make a request to a resource that isn't configured to accept...
Read more >
How to resolve CORS policy: No 'Access-Control-Allow-Origin ...
How to resolve CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource isssue? angularjs ibmbpm BPM Business Process Manager.
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