You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by "romanisitua@yahoo.com.INVALID" <ro...@yahoo.com.INVALID> on 2021/05/25 09:37:31 UTC

CORS issue related to HttpService

Hi everyone,
I am new to apache royale. I have started learning apache royale by trying my hands on the GitHubCommit tutorial.  I know my issue should go to the user mailing list but for strange reasonsI have attempted subscribing to this mailing list yet I have not received mail acknowledgement. I have tried with another email account the same issue. No mail acknowledgement. If there is an admin I can contact to resolve this. I appreciate if he/her details are shared here.
In the mean time here is my issue.
I am working on the GitHubCommit tutorial. When I run it, I get the following error
Access to XMLHttpRequest at 'https://github.com/apache/royale-asjs/blob/develop/examples/express/GitHubCommitLogViewer/src/main/resources/project.json' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.


When I run it my browser prevents the project.json file from being accessed. I get the following error from the google chrome console
Access to XMLHttpRequest at 'file:///C:/Users/my_royale/GitHubCommit/bin/js-debug/project.json' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.  this is code  <js:HTTPService id="configurator" url="project.json" complete="setConfig();fetchCommits()"> </js:HTTPService>  I decided to see if I can access the project.json from the github repository using the following url

https://github.com/apache/royale-asjs/blob/develop/examples/express/GitHubCommitLogViewer/src/main/resources/project.json

I get the following error
Access to XMLHttpRequest at 'https://github.com/apache/royale-asjs/blob/develop/examples/express/GitHubCommitLogViewer/src/main/resources/project.json' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Any ideas what can  be done ? There seems to be a CORS restriction enforced by the browser.

Regards,
Roman,


Re: CORS issue related to HttpService

Posted by "romanisitua@yahoo.com.INVALID" <ro...@yahoo.com.INVALID>.
 Thanks for the response. I will install the cross domain plug in my google chrome and try again.
Thanks.
    On Tuesday, May 25, 2021, 10:44:36 AM GMT+1, Hugo Ferreira <hf...@gmail.com> wrote:  
 
 Hi,

About the infamous CORS, this is what I do:

For debug purposes (my machine only), I'm using the "Cross Domain" plugin
for Google Chrome.


romanisitua@yahoo.com.INVALID <ro...@yahoo.com.invalid> escreveu no
dia terça, 25/05/2021 à(s) 10:37:

> Hi everyone,
> I am new to apache royale. I have started learning apache royale by trying
> my hands on the GitHubCommit tutorial.  I know my issue should go to the
> user mailing list but for strange reasonsI have attempted subscribing to
> this mailing list yet I have not received mail acknowledgement. I have
> tried with another email account the same issue. No mail acknowledgement.
> If there is an admin I can contact to resolve this. I appreciate if he/her
> details are shared here.
> In the mean time here is my issue.
> I am working on the GitHubCommit tutorial. When I run it, I get the
> following error
> Access to XMLHttpRequest at '
> https://github.com/apache/royale-asjs/blob/develop/examples/express/GitHubCommitLogViewer/src/main/resources/project.json'
> from origin 'null' has been blocked by CORS policy: No
> 'Access-Control-Allow-Origin' header is present on the requested resource.
>
>
> When I run it my browser prevents the project.json file from being
> accessed. I get the following error from the google chrome console
> Access to XMLHttpRequest at
> 'file:///C:/Users/my_royale/GitHubCommit/bin/js-debug/project.json' from
> origin 'null' has been blocked by CORS policy: Cross origin requests are
> only supported for protocol schemes: http, data, chrome, chrome-extension,
> chrome-untrusted, https.  this is code  <js:HTTPService id="configurator"
> url="project.json"
> complete="setConfig();fetchCommits()"> </js:HTTPService>  I decided to see
> if I can access the project.json from the github repository using the
> following url
>
>
> https://github.com/apache/royale-asjs/blob/develop/examples/express/GitHubCommitLogViewer/src/main/resources/project.json
>
> I get the following error
> Access to XMLHttpRequest at '
> https://github.com/apache/royale-asjs/blob/develop/examples/express/GitHubCommitLogViewer/src/main/resources/project.json' from
> origin 'null' has been blocked by CORS policy: No
> 'Access-Control-Allow-Origin' header is present on the requested resource.
>
> Any ideas what can  be done ? There seems to be a CORS restriction
> enforced by the browser.
>
> Regards,
> Roman,
>
>
  

Re: CORS issue related to HttpService

Posted by Hugo Ferreira <hf...@gmail.com>.
Hi,

About the infamous CORS, this is what I do:

For debug purposes (my machine only), I'm using the "Cross Domain" plugin
for Google Chrome.


romanisitua@yahoo.com.INVALID <ro...@yahoo.com.invalid> escreveu no
dia terça, 25/05/2021 à(s) 10:37:

> Hi everyone,
> I am new to apache royale. I have started learning apache royale by trying
> my hands on the GitHubCommit tutorial.  I know my issue should go to the
> user mailing list but for strange reasonsI have attempted subscribing to
> this mailing list yet I have not received mail acknowledgement. I have
> tried with another email account the same issue. No mail acknowledgement.
> If there is an admin I can contact to resolve this. I appreciate if he/her
> details are shared here.
> In the mean time here is my issue.
> I am working on the GitHubCommit tutorial. When I run it, I get the
> following error
> Access to XMLHttpRequest at '
> https://github.com/apache/royale-asjs/blob/develop/examples/express/GitHubCommitLogViewer/src/main/resources/project.json'
> from origin 'null' has been blocked by CORS policy: No
> 'Access-Control-Allow-Origin' header is present on the requested resource.
>
>
> When I run it my browser prevents the project.json file from being
> accessed. I get the following error from the google chrome console
> Access to XMLHttpRequest at
> 'file:///C:/Users/my_royale/GitHubCommit/bin/js-debug/project.json' from
> origin 'null' has been blocked by CORS policy: Cross origin requests are
> only supported for protocol schemes: http, data, chrome, chrome-extension,
> chrome-untrusted, https.  this is code  <js:HTTPService id="configurator"
> url="project.json"
> complete="setConfig();fetchCommits()"> </js:HTTPService>  I decided to see
> if I can access the project.json from the github repository using the
> following url
>
>
> https://github.com/apache/royale-asjs/blob/develop/examples/express/GitHubCommitLogViewer/src/main/resources/project.json
>
> I get the following error
> Access to XMLHttpRequest at '
> https://github.com/apache/royale-asjs/blob/develop/examples/express/GitHubCommitLogViewer/src/main/resources/project.json' from
> origin 'null' has been blocked by CORS policy: No
> 'Access-Control-Allow-Origin' header is present on the requested resource.
>
> Any ideas what can  be done ? There seems to be a CORS restriction
> enforced by the browser.
>
> Regards,
> Roman,
>
>