Hello,
I was trying this Tiledesk Community version. I made the deploy, the server is working, but the widget is with some problems. I was trying to embed the widget in a page located in a apache server, that is using another port, and the message below appears in the browser console:
ERROR Error: firebase config is not defined. Please create your widget-config.json. See the Chat21-Web_widget Installation Page
Does Firebase (in blaze plan) still required in this version?
Update
A detail I forgot to mention - what appears in browser’s console before the error:
initfirebase::: firebaseConfig
Object
apiKey: "CHANGEIT"
authDomain: "CHANGEIT"
databaseURL: "CHANGEIT"
messagingSenderId: "CHANGEIT"
projectId: "CHANGEIT"
storageBucket: "CHANGEIT"
__proto__: Object
Please update your Tiledesk docker images to the last version using:
docker-compose pull
and after that start it with:
EXTERNAL_BASE_URL=“http://localhost” docker-compose up
as described in the updated README here: tiledesk-deployment/README.md at master · Tiledesk/tiledesk-deployment · GitHub
Thanks, Andrea!
But now I’ve stumbled in another issue:
The widget is trying to get some resources and is getting 404. I am on my localhost searching for the resource on the server.
http://localhost:9988/api/609bec8b6848530012f00bc3/widgets
http://localhost:9988/api/609bec8b6848530012f00bc3/labels/PT
http://localhost:9988/api/609bec8b6848530012f00bc3/labels/EN
BUT this resource is avaliable in the remote server on the 29005 port, where the tiledesk server is listening.
There’s some config where I can force the widget to look to the right location?
What service is installed on 9988 port? and what on 29005?
Port 9988 : apache server, where the page is calling the html widget is
Port 29005: Tiledesk server
So you must run Tiledesk as follow:
EXTERNAL_BASE_URL=“http://localhost:29005” docker-compose up
Ok?
I’ve tried this before, and the error remains in the browser’s console.
Update
I forgot the code I’m using to embed in my page:
The code in dashboard was not working, then I changed the js.src
value:
<script type="application/javascript">
window.tiledeskSettings =
{
projectid: "609bec8b6848530012f00bc3"
};
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "http://here.is.the.address:29005/widget/launch.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'tiledesk-jssdk'));
</script>
No If you set EXTERNAL_BASE_URL=“http://localhost:29005” docker-compose up
the dashboard automatically update the widget script.
Remember to update before the images with :
docker-compose pull
and run with :
EXTERNAL_BASE_URL=“http://localhost:29005” docker-compose up
If you have problem send us the screenshot
I made this call
EXTERNAL_BASE_URL=“http://localhost:29005” docker-compose up
and the script in the dashboard remains like the image below
(and the widget is not working, even if i put js.src
with the value "http://here.is.the.address:29005/widget/launch.js"
)
Hey Folks!
I’ve solved this problem doing two things:
-
docker-compose pull
as @andrealeo said;
- Instead of
EXTERNAL_BASE_URL="http://localhost" docker-compose up
, I called using the remote address and its port, something like this: EXTERNAL_BASE_URL="http://the.remote.address.online:PORT_NUMBER" docker-compose up
And the widget worked!
Thanks @andrealeo for your help!