Internal server error when generate embed link with branch param

Goal:
I am trying to create an embed URL using the route /api/embed-url/external-user, passing a JSON body with user and landing page information. However, when accessing the returned URL, I get a 500 error and the screen turns blank.

Steps:

  1. I made the POST request to the /api/embed-url/external-user route with the following body:

json

Copiar

{
	"environment": "development", 
	"branch": "development",
	"landingPageUuid": "7a297b14-1331-4115-801e-05c72ac46737", 
	"groupIds": [
		1
	],
	"externalIdentifier": "felipe@email.com.", 
	"userInfo": {
		"email": "felipe@email.com" 
	}
}
  1. The request returned the following response body with the embed URL:
{
	"embedUrl": "http://app.selfretool.com/embed-redirect?nonce=cde96658-ec87-4c2f-9bff-b952efe08f5e&destination=%2Fembedded%2Fauthed%2F23580674-0316-11ef-87a1-6fccee579940%3F_environment%3Ddevelopment%26_branch%3Ddevelopment"
}
  1. I tried accessing the returned URL, redirect to https://app.selretool.com/embedded/authed/7a297b14-1331-4115-801e-05c72ac46737?_environment=development&_branch=development but I received a 500 error and the screen turned blank.

Details:

  • The request was made to the URL http://app.selfretool.com/api/embed-url/external-user with the mentioned body.
  • The generated embed URL is: http://app.selfretool.com/embed-redirect?nonce=cde96658-ec87-4c2f-9bff-b952efe08f5e&destination=%2Fembedded%2Fauthed%2F7a297b14-1331-4115-801e-05c72ac46737%3F_environment%3Ddevelopment%26_branch%3Ddevelopment
  • The 500 error occurs when trying to access the embed URL.
  • {"error":true,"message":"Internal server error"}

Looking the retool api container logs i found this

    "error": {
        "level": "error",
        "msg": "Internal server error: n.getHead is not a function",
        "stack": "TypeError: n.getHead is not a function\n    at /retool_backend/bundle/main.js:6990:35640\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)",
        "type": "INTERNAL_ERROR"
    },~