Google Drive App integration

Hi, I’m trying to use the Google Drive app to integrate Drive, Docs, Sheets, and Slides into my Mattermost server, but I’m encountering errors while following the guide.

Steps to reproduce
For now i’m working on a local WLS with Ubuntu 22.04.4 LTS installed (please let me know if this could be the issue), then i will replicate the process on the VSL where i’m working on the project.
I’ve followed the Manual Installation because, i’m already using Docker and also because i saw another thread where the solution was to go with the manual installation itself.
I’ve verified my node version and i’m on node -v v15.14.0 so in range with the requirements.
Also i’ve noticed that in the Makefile docker-compose is used, which doesn’t work anymore, so i’ve changed as follow:

## build: build the app when changed
watch: node_modules
        $(NPM) run dev

        docker compose up

        docker compose stop

        docker compose stop && docker compose up

Expected behavior
Being able to access http://localhost:4004/, the default path, and most importantly, being able to execute the install command in Mattermost /apps install http http://localhost:4004

Observed behavior
If i try to run sudo make run on log side i see this:

Where “site_url”:“” result as empty, should be a value in there?
While on browser console side, i’m using Mozilla, these errors shows up:

I’ve tryed to understand how to handle “Content-Security-Policy”, but i have no clue where i’m supposed to make changes in order to make it work.

On Mattermost, if i try to use the /apps install command i receive this error:

I think you need to install appsctl to get the /apps command

Hi John, thank you for your reply, sorry, i didn’t see it.
Since i’m using Docker for my Mattermost installation, where should i run go install command?
I tried to execute it inside the Mattermost container in my local WSL, but i still get the error command with a trigger of /apps not found, could be because i’m in a localhost? I’ve noticed that no “/” commands seems to work in here.
But if i run the command inside my hosted Mattermost container, that should solve the issue?
Also it’s right that i cannot access google drive container at http://localhost:4004/ if i put the URL in browser, or should i see it?

What happens if you docker exec -it <container> /bin/bash and run go install inside the container? You’d probably need to install whatever system package provides the go binary first.

And SIteUrl should be set to whatever URL you access the Mattermost instance, like

I’ve entered in the container as root by executing the command sudo docker exec -u root -it <container-id> /bin/bash and then installed all the required packages in order to be able to use go install ... without errors. The installation ends with no errors, but the /apps command doesn’t work anyway, but also other “/” command like “/help” seems to not work.

As i mentioned, i’ve done this attempt in a non-hosted Ubuntu WSL, i use that for testing before making changes to my other Mattermost installation (also done with docker) that is hosted on a Virtual Server. However, i’m wondering if in this case, i need to perform the go install ... directly on the hosted Mattermost (where default slash commands works).
I understand the situation is very confusing, and i apologize for that, but i’m hesitant to make changes directly to the hosted Mattermost, but, if running go install inside the hosted Mattermost container should solve the issue, i will do it.

Regarding SiteUrl, in the installation guide, i’ve followed all the steps but i’m unsure where to input the SiteUrl value, should i define it also in the .env file?
My .env file is the same as the one in the guide, no other changes made.
Thank you for your time.

You can pass SiteUrl via an environment variable when you start your container. Environment variables - Mattermost documentation

I’m not sure why the installation doesn’t seem to be working. Running that install would be a temporary “fix” anyway, since the next time the container was started the result would no longer be there.

You might try in one of our community channels like Mattermost

The SiteUrl i’m referring is from the Google drive container, not Mattermost itself, the pic with the log in the first message is after a make run command, the only info i see is that message:
{"level":"info", "message":"Listening on 4004", "request_path":"none", "site_url":"","status":200,"timestamp":"2024..."}).
Then, are all errors since i can’t access http://localhost:4004 with the errors also visible in the other image of the browser console log.
But maybe i’m not supposed to access Google Drive app directly on http://localhost:4004? And i will be able only after, through Mattermost after the app is installed?

But so, what exactly is the right way to install appsctl in a docker Mattermost installation?

I’ve also asked in the community channel.

Someone asked if you had installed GitHub - mattermost/mattermost-plugin-apps: Powers the Mattermost App Framework It sounds like that may be a prerequisite?

Sorry I’m not smarter about this! Hopefully we’ll learn an answer together.