Ir al contenido
Menú
Se marcó esta pregunta
4 Respuestas
2080 Vistas

Access blocked: This app’s request is invalid

You can’t sign in because this app sent an invalid request. You can try again later or contact the developer about this issue. Learn more about this errorIf you are a developer of this app, see error details.Error 400: redirect_uri_mismatch

Avatar
Descartar

I have same problem. Do you have any idea

Neither helped me. 

Mejor respuesta

Hi,

I have successfully connected by following the provided documentation.. 

https://www.odoo.com/documentation/17.0/applications/productivity/calendar/google.html


Avatar
Descartar
Mejor respuesta

Answers like the ones on this thread really annoy me!


The people at Odoo and Cybrosis don't give us any credit at all for knowing what we're talking about. They don't even try to understand the issue. They just send us a link to an article as if we haven't already read and followed it a thousand times. It's an extremely dismissive approach.


To the original poster, the issue stems from a bug in Odoo's code. The code uses an HTTP request to get your website's URL, but this function relies on a Werkzeug variable, and it completely ignores the web.base.url parameter that you've set in Odoo's settings. If you're running Odoo behind a proxy, the resulting URL will always be wrong.


I corrected this error by rewriting the code to use the web.base.url parameter as a means of retrieving the site's URL, thus bypassing Werkzeug completely. Here's an example of the code I used:


request.env['ir.config_parameter'].sudo().get_param('web.base.url')


I had exactly the same issue as you when trying to set up the Google login for my site and I was able to fix it with this code. Please note that the function MUST be run as sudo. If not, you'll get "403 - access denied" errors".


My advice to you is to is this:


  1. search the Odoo repository on GitHub for references to "base_URL".

  2. Where they appear in files relating to Google authentication, edit the corresponding file on your server by replacing those lines with the code example above.


This is an ancient post so you've probably moved on from this issue now, but the bug is still present today in Odoo 18. I hope this answer will help someone who has this issue and is googling their butt of to no avail.


Good luck!

Avatar
Descartar

This is a valid solution but not newby friendly. What I did was add the HTTP endpoint in "Authorized redirect URIs" (your app must be on test mode) and that's it.

Mejor respuesta

I have same Issue; I already changed url to https in web.base.url but still odoo send http version of url to google for redirect sync, how I can force odoo to send https

Avatar
Descartar