mautrix / meta

A Matrix-Facebook Messenger and Instagram DM puppeting bridge.
GNU Affero General Public License v3.0
178 stars 12 forks source link

Failing to bridge to facebook messenger "Missing some cookies" #2

Closed Aadniz closed 10 months ago

Aadniz commented 10 months ago

Following the steps here: https://docs.mau.fi/bridges/go/meta/authentication.html I cannot get this to work.

Pasting JSON of cookies (from Cookie-Editor firefox extension) results in the bridge bot saying Failed to parse input as JSON: json: cannot unmarshal array into Go value of type cookies.InstagramCookies.

Copying the websocket request as cURL makes the bot say: Missing some cookies even though I can clearly see they are all there in the request. The instructions for copying this network info from chrome just tells you to copy, but there is no way to just copy. The copy as cURL in chrome doesn't include cookies.

I don't expect this issue to be specific to only me and my setup.

tulir commented 10 months ago

JSON cookies must be a simple key-value object, no arrays. Didn't realize copying websockets on chrome doesn't include cookies, I guess I'll switch the example to use a normal api request instead. Also made it say which cookies are missing now

Aadniz commented 10 months ago

Thank you for quick reply! I now see the JSON message worked, and with the updated main branch, it shows this message:

Missing some cookies: [mid ig_did ds_user_id sessionid csrftoken]

My guess is that it really are looking for instagram cookies, but this is a facebook messenger bridge I'm setting up

tulir commented 10 months ago

Did you tell it that it's a facebook bridge?

Aadniz commented 10 months ago

That's it, It looks like that option got created by itself when I copied the old config from mautrix/facebook earlier. Thank you for helping out