Búsquedas recientes


No hay búsquedas recientes

Debugging an App locally with zcli proxy error



Publicado 05 jul 2023

When debugging locally and trying to call google authenitcation api call for example  I get proxy errors and a code of 422.
It works in production, but doesn't work locally with "?zcli_apps=true"



Proxy error: {:code=>"UnprocessableEntity", :status=>"422", :title=>"Unprocessable Entity", :message=>"Failed to get installation and oauth information for app."}

The code were using : 

const AUTH_URL =

'https://identitytoolkit.googleapis.com/v1/accounts:signInWithPassword?key={{setting.apiKey}}';

async function authenticate() {

const settings = {

url:AUTH_URL,

type:'POST',

contentType:'application/json',

data:JSON.stringify({

email:'{{setting.email}}',

password:'{{setting.password}}',

returnSecureToken:true,
}),

secure:true,

dataType:'json',
};

const response = await_client.request(settings);

return response.idToken;
}"

Tried "@zendesk/zcli": "1.0.0-beta.35" and "1.0.0-beta.32".
Disabled chrome addons.

Also, tried adding "https://joindaisy.zendesk.com" as an allowed domain in firebase.

Github issue.

 

0

2

2 comentarios

Thanks, I just removed the secure when debugging locally and added the email & pass & API key from .env variables.

0


Hi Slava, 
 
I see you're using secure settings. The ZCLI server doesn't render secure settings and is a known limitation as found here. However, you can package and upload you app privately to your Zendesk instance for testing. 
 
All the best,
 
Erica

0


Iniciar sesión para dejar un comentario.

¿No encontró lo que buscaba?

Nueva publicación