community-app icon indicating copy to clipboard operation
community-app copied to clipboard

CORS errors prevent running locally

Open stdunbar opened this issue 4 years ago • 4 comments

When running against an against a local server, CORS error prevent the application from doing anything.

Steps to Reproduce

  1. Checkout fineract 1.4.0 or develop branch from github.com/apache/fineract
  2. docker run --name mysql-5.5 -p 3306:3306 -e MYSQL_ROOT_PASSWORD=mysql -d mysql:5.5
  3. ./gradlew createDB -PdbName=fineract_tenants
  4. ./gradlew createDB -PdbName=fineract_default
  5. ./gradlew tomcatRunWAR
  6. Note that output is The Server is running at http://localhost:8080/fineract-provider
  7. Check out community-app, develop branch
  8. bower install
  9. npm install
  10. gem install bundler
  11. bundle install
  12. grunt serve
  13. Open browser, go to http://localhost:9002/?baseApiUrl=http://localhost:8080#/
  14. Login with user mifos, password password

Expected Behaviour

Login should work

Actual Behaviour

Login fails because of CORS error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://localhost:8080/fineract-provider/api/v1/authentication. (Reason: CORS request did not succeed).

Note that there is a CORS error and the protocol is ignored.

Settings

  • Mifos X version: fineract 1.4.0 branch or develop branch
  • Browser used: Firefox 74.0
  • OS: Ubuntu

Screenshots

stdunbar avatar Mar 29 '20 17:03 stdunbar

Hi am also faacing same error can you help me

Access to XMLHttpRequest at 'https://demo.openmf.org/fineract-provider/api/v1/authentication' from origin 'http://localhost:9002' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.

ravitejasrt avatar May 10 '20 16:05 ravitejasrt

I am also facing similar issues, I checked out 18.x version community app, fineract 1.4 resulting in same error

saifromeo avatar Oct 08 '20 11:10 saifromeo

Has anyone been able to solve this? I am also having the same error

Argez avatar Feb 26 '21 02:02 Argez