Instagram stream "user_lifetime_insights" leads to failure

22b8b65b_bd02_45d5_ba52_32865c1fba9e_logs_767.txt (480.6 KB)

  • Is this your first time deploying Airbyte?: No
  • OS Version / Instance: Debian GNU/Linux 10 VM instance
  • Memory / Disk: 7.50 / 35 GB
  • Deployment: Docker
  • Airbyte Version: * 0.40.16
  • Source name/version: Instagram 1.0.0
  • Destination name/version: BigQuery 1.2.5
  • Step: The issue is happening during sync.
  • Description: Connector fails due to:Additional Failure Information: 'end_time' if one includes the stream:user_lifetime_insights Without this stream the connector works as expected.

log file attached

Hello there! You are receiving this message because none of your fellow community members has stepped in to respond to your topic post. (If you are a community member and you are reading this response, feel free to jump in if you have the answer!) As a result, the Community Assistance Team has been made aware of this topic and will be investigating and responding as quickly as possible.
Some important considerations that will help your to get your issue solved faster:

  • It is best to use our topic creation template; if you haven’t yet, we recommend posting a followup with the requested information. With that information the team will be able to more quickly search for similar issues with connectors and the platform and troubleshoot more quickly your specific question or problem.
  • Make sure to upload the complete log file; a common investigation roadblock is that sometimes the error for the issue happens well before the problem is surfaced to the user, and so having the tail of the log is less useful than having the whole log to scan through.
  • Be as descriptive and specific as possible; when investigating it is extremely valuable to know what steps were taken to encounter the issue, what version of connector / platform / Java / Python / docker / k8s was used, etc. The more context supplied, the quicker the investigation can start on your topic and the faster we can drive towards an answer.
  • We in the Community Assistance Team are glad you’ve made yourself part of our community, and we’ll do our best to answer your questions and resolve the problems as quickly as possible. Expect to hear from a specific team member as soon as possible.

Thank you for your time and attention.
Best,
The Community Assistance Team

Hey thanks for reaching out. I can see that the error is regarding.

 "error_user_title": "Media posted before business account conversion",
        "error_user_msg": "The media was posted before the most recent time that the user's account was converted to a business account from a personal account.",

Looks to me more like a limitation or something on the FB side?

Hey,

thanks for having a look.

I have seen that as well but didn’t think that it was related to my error. I adjusted the Start Date in the Instagram Source. First to the date after which I am certain that all accounts should have been already converted:

22b8b65b_bd02_45d5_ba52_32865c1fba9e_logs_886.txt (225.3 KB)

And then to yesterday (!):

22b8b65b_bd02_45d5_ba52_32865c1fba9e_logs_887.txt (227.1 KB)

Unfortunately the error message remains.

Hello.

In case you didn’t resolve this or someone is still hitting his head on the screen, here’s what I did:

  1. Delete currently installed airbyte/source-instagram image (I think docker image rm airbyte/source-instagram is the correct for terminal os. I was on Windows/wsl so I used Docker desktop to remove it)

  2. Navigate to the cloned airbyte repo directory (default name is “airbyte”)

  3. Modify the file inside the repo “/airbyte-integrations/connectors/source-instagram/source_instagram/streams.py” @Line 124 and remove the “date” key and value from the yielded dictionary

  4. Modify the file inside the repo “/airbyte-integrations/connectors/source-instagram/source_instagram/schemas/user_lifetime_insights.json” @Line 10 and remove the “date” json key from the schema

  5. Navigate to the “/airbyte-integrations/connectors/source-instagram” directory

  6. Run the command docker image build -t airbyte/source-instagram:latest . and wait a few moments

Based on this documentation: Insights - Instagram Platform - Documentation - Meta for Developers all “lifetime” period metrics mention the following, among others:

Response does not include the end_time JSON property

What we did above:

  1. Removed the invalid access of the missing “end_time” key from the instagram api response
  2. Removed the missing schema key “date” (since it’s not returned from instagram)
  3. (@step 6) replaced the current problematic source-instagram image with a new one which contains our fixed files

Hope I helped.

Hello Sebastian Brickel, it’s been a while without an update from us. Are you still having problems or did you find a solution?

Hello John,

this sounds like it could work, however I am a bit stuck right now.

I am running Airbyte from downloaded docker-compose.yaml and .env files without a GitHub repo. I applied your changes to the running Instagram image and that did not fix the issue, but then I am not sure if that image persisted or not (most likely it didn’t)

Is there a way to modify a connector from a downloaded yaml and .env file that I don’t see right now or do I have to modify my Instagram connector locally, build an image of it and upload that to my VM (or something to that extend)

Also, since this seems to be a proper error in the Instagram connector is that something that will be fixed within the next release of it?

Best,

Sebastian

I applied the changes recommended by @JohnGreek on my local version of Airbyte and it does work.
For applying these changes to Airybte hosted on GCP, using a .env and docker-compose.yaml one must change the code and rebuild the container with a different version

@marcosmarxm Since this is an issue that should affect other users as well, would it be worth it to make it an issue on github as well?

1 Like

Hello Sebastian.
Sorry for not replying, I had my answer ready but a lot of things were popping up and I was forgetting to send it.

When I wrote my first reply I didn’t really ask for the deployment method and I assumed github was used, my bad.
Also, I was not familiar at all with docker, containers etc. It was maybe the third or fourth day I started reading and using them on my WSL2. The method you resolved it in GCP looks similar, except the environment is different.
I hope my reply helped you and maybe others find out where the issue lied and eventually resolve it :slightly_smiling_face:

Best regards.