page.Page27:1 Access to fetch at from origin ‘
https://platform.preview.appgyver.com
’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.
I want to link my app with apps script using web app. Please help me solve this CORS
First check that it’s an actual CORS problem and not some other error that is displayed as CORS error by checking in mobile preview if it also fails. If it works on mobile, it’s a CORS error. If it does not work on mobile, it’s a misconfiguration. You can use the web developer console for the error or use something like cURL or Postman to find out the correct configuration for the API.
If it is a CORS error however, it has to be solved from the server/backend side, as we have no way to affect it. If you can not edit the CORS policy, another way to solve this is to set up a proxy for the API.
It is working on apps. The error happened when I use all web version including apple and android.
I do not know how to solve this CORS issue, Appgyver-Google appscript. The same api works fine if I use Xano-Google appscript.
Hi! Yes, all web versions would have the same problem. However, the mobile preview app should not have the same problem, if it’s a CORS issue.
If it is a CORS issue, I can’t help you. If it is not a CORS issue, there is some misconfiguration in your API, and you can use the debugger or the developer console (e.g. Chrome’s developer console on the web preview) to find out more about the error.
Madness going on.
This is a CORS issue since it’s only happening with the browser. It is browser-related issue.
You need to review your CORS settings again from the google cloud dashboard.
Ok you say that it is a problem of my browser that concerns the CORS but in my Google Clouds dashboard I have no restrictions on access to the API (see screenshot of the detail of my API key that I am using). This should mean that with this API key I can access all (enabled) Google APIs from any website or mobile app. I’m doing it wrong ?
This hypothesis of mine is confirmed by the fact that:
1 - I access the api both from POSTMAN and from google Chrome;
2 - my Data Source in Appgyver pointing to the Geocoding service (downloaded from the marketplace) works fine.
Where am I wrong then? Help me understand please!
Schermata 2022-09-01 alle 12.34.24
1920×947 116 KB
All i can do now is suggest you do a CORS search in the Console dashboard and check these options: