Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

ApexRest -- No 'Access-Control-Allow-Origin' header is present code 401 #87

Open
craigisakson opened this issue Jul 6, 2016 · 19 comments

Comments

@craigisakson
Copy link

We have multiple orgs using ForceTK to call ApexRest services from VisualForce pages. Everything has been working just fine until last night. Now none of our calls are going through:

XMLHttpRequest cannot load https://cs41.salesforce.com/services/apexrest/v1/productmarkets/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://c.cs41.visual.force.com' is therefore not allowed access. The response had HTTP status code 401.

We've added the CORS records to the org with no difference in outcome. I understand that this is more than likely not a ForceTK issue, but something that has changed on the Salesforce side. I'm wondering if anyone might have suggestions on things I can try to get this to work?

@Bobnix
Copy link

Bobnix commented Jul 6, 2016

We are having the same problem in Chrome. In Firefox we are getting a 405 Method not allowed.

@mikesobczak
Copy link

Yep, I have the same issue. Prod is working fine, but all of your sandboxes, including QA, are broken. I'm investigating changing the code to use remoting. I may put in a ticket to Salesforce.

@craigisakson
Copy link
Author

We also have a case open with Salesforce as well. If we hear anything back from it I will add it to this issue!

@mikesobczak
Copy link

SF told me they have another customer with the same issue. They verified that my issue was with the apexrest call. I went ahead and changed my code to use VisualForce JavaScript remoting.

@koenwesselman
Copy link

We're facing this issue too and have opened a case. Starting today we're also facing it in Production - not just sandboxes.

@dieffrei
Copy link

dieffrei commented Jul 7, 2016

Any update? We are facing this issue in production and sandbox environment.
WORKAROUND: Use @HttpPatch

@koenwesselman
Copy link

@brosiusad
Copy link

We are seeing this in production as well, although ours manifests as a 503 with an "under construction" HTTP page returned from the server.

@dieffrei
Copy link

dieffrei commented Jul 7, 2016

koenwesselman I tried It, but it doesn't work.
Only works for "PATCH" method.

@felixguinetincloud
Copy link

We are facing the exact same situation. Yesterday night, one Sandbox was affected. As of this morning, every instance including Production are down. Support pointed to the exact same knowledge article. Adding CORS settings made it work for Internet Explorer 11 and Edge, but every other browser (Chrome, Firefox, Safari, Salesforce1 iOS App) is affected.

@dieffrei
Copy link

dieffrei commented Jul 7, 2016

May its about the last salesforce update:

Thursday July 07, 2016 06:35 UTC
On July 7, 2016, the Salesforce Technology team resolved a service disruption issue affecting the Salesforce Mobile Classic service. The problem began on July 6, 2016 at 20:51 UTC and was resolved as of July 7, 2016 06:35 UTC.

The problem was caused by a configuration issue on the network tier supporting the Salesforce Mobile Legacy application. Once identified, action was taken to rectify the configuration and normal functionality was restored.

Actions to Prevent Future Incidents:
The Salesforce Technology Team -

  • Is investigating the cause of the configuration issue and the resulting impact
  • Is investigating ways to detect this sort of issue more rapidly in the future

Seen at: http://trust.salesforce.com/trust/instances

@mandar19
Copy link

mandar19 commented Jul 7, 2016

We are also facing same issue in all Sandboxes and also in Prod. The code used to send an Ajax request from visualforce page to REST service (POST). This was working fine till today and now it has stopped working. I changed Ajax request from POST to PATCH and its working fine. Does anyone know what has changed for POST requests?

@scottmcclung
Copy link

I've got the same issue in one of the orgs I look after. Just started happening out of the blue this morning. Following the steps in that knowledge article does not solve the problem.
Unfortunately this org does not have premier support so I can't file a ticket on it. Has support responded to any of you with a solution or a timeline on a solution yet?

@dieffrei
Copy link

dieffrei commented Jul 8, 2016

scottmcclung I notified by opened case, that R&D salesforce team is working on it.

@felixguinetincloud
Copy link

felixguinetincloud commented Jul 8, 2016

Apparently, an update was rolled out yesterday and introduced the problem. Support are aware of several customers affected (I believe the number given is under estimated only with the number of participants in this thread so you should contact them right away). Apparently the R&D team is working on it, but I wasn't able to get any idea of the resolution timeline. There is no sign of any problem on status.salesforce.com

@felixguinetincloud
Copy link

Hi folks, a Known Issue has just been created. Update is apparently scheduled this weekend. Please monitor : https://success.salesforce.com/issues_view?id=a1p3A00000185IjQAI

@felixguinetincloud
Copy link

I tested both our Production and Sandbox this morning and everything seems back to normal. Can you validate on your side? I see no notes/memo/communication on what really happened..

@dieffrei
Copy link

dieffrei commented Jul 9, 2016

Thank you Felix, It is fixed!

@jaskkaur
Copy link

@dieffrei Could you please share, how this issue got fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants