Ticket: Facebook App-ID Error During Instagram Channel Setup
@Peter Just created a ticket
Question: I'm trying to setup the Instagram provider. But if I want to 'add the channel' in the frontend Facebook gives an error that the provided app-id does not exist. In the url it also has 'clientId=undefined'.
Attempted: I've checked .env and postiz.env to see if the App ID and Secret are in there. They are. If I connect to the docker container and cat the .env I also see the correct data. Cloudflare is correctly setup. I don't see what I'm doing wrong. Or discovered a bug? But I also can't find anyone else with the same issue.
Working On: I run on Coolify with docker-compose.
Take it from here @Postiz
Question: I'm trying to setup the Instagram provider. But if I want to 'add the channel' in the frontend Facebook gives an error that the provided app-id does not exist. In the url it also has 'clientId=undefined'.
Attempted: I've checked .env and postiz.env to see if the App ID and Secret are in there. They are. If I connect to the docker container and cat the .env I also see the correct data. Cloudflare is correctly setup. I don't see what I'm doing wrong. Or discovered a bug? But I also can't find anyone else with the same issue.
Working On: I run on Coolify with docker-compose.
Take it from here @Postiz
17 Replies
I think in Docker compose you have to add the variable into the docker-compose
@Peter
I'll give it a go! Thanks!
In my compose:
But get same result unfortunately.
try it with double quotes
example
environment:
MAIN_URL: "https://postiz.test.com"
FRONTEND_URL: "https://postiz.test.com"
you also need to make sure your mounting the /config/ directory into the contaier
Double quotes don't make a difference.. I connected to the running container and if I
cat
the .env file, everything is there (with double quotes). If I check the volume there is a file called postiz.env
and that contains also the correct data (also with double quotes).Heya, nah it's not the quotes
You've got too many spaces in there
4 spaces, instead of 2
You should generally use environment variables in your docker compose, OR a static .env file, not both
That's the formatting of Discord.. In the files there are just 2 spaces π
don't think so π
So,
postiz.env
is a file you create yourself
The alternative is setting enviromment variables in your composeWhat is the order of that the config are read? So is
postiz.env
the last one it takes in? Is that the one that get's to be the .env in the running container?I've not actually tested @Peter , but I believe it would be container env variables, then .env, then postiz.env last - logically that should be the order, but that's why I recommend keeping everything in the compose file.
So I've renamed
postiz.env
to postiz.env.bak
, so that one can't be used. I've moved everything to the compose file:
Is this correct? Or am I missing something?That's looking good, you can certainly remove the Cloudflare details though
Because you have STORAGE_PROVIDER: "local"
Have you tried running postiz with that config?
Tried both actually, no dice π² Unfortunately..
@Peter , okay dokey, but help me to help you - is there sn error message or problem you're getting instead? If there is an error message I can work out what's wrong
That's what I'm trying to find, the container logs just tells me everything is happy:
Okay, and so you're getting an erorr trying to connect Facebook still?
Yeah, still have the undefined as clientId.. So Facebook gives the error that the app doesn't exist, which makes sense
So I started with a completely clean slate. Removed everything and have only Instagram APPID and SECRET in the docker-compose file. But still same result. Am I missing a config somewhere?
Is there a way to see which config values are loaded and being used?
Got it to work! Seems you have to setup FACEBOOK_APP_ID/SECRET in Docker environment. INSTAGRAM_APP_ID/SECRET are not used. Quotes/doublequotes are not required for it to work btw. But it works now! Thanks for the help!
Ok, yep, you do need the env vars to be set π
glad it's all good now