oh-my-ig icon indicating copy to clipboard operation
oh-my-ig copied to clipboard

502 error

Open FeIipeSoares opened this issue 6 years ago • 11 comments

I think instagram is blocking Oh My Ig requests, i have created new account for testing and i receive 502 error in hours, my default account not working more.

FeIipeSoares avatar Jun 18 '18 17:06 FeIipeSoares

Could you share your config? i.e. this is my config: Auto Reload Feed Page (mins) 3 No. of Feed per Page 50 Sync Count 6 No of items sync each time 33 Sync One Feed Interval (mins) 3 Sync Multi Feed Interval (mins) 30

inDream avatar Jun 23 '18 13:06 inDream

Auto Reload Feed Page (mins) 5 Sync Count 33 Sync One Feed Interval (mins) 5 No. of Feed per Page 200 No of items sync each time 50 Sync Multi Feed Interval (mins) 10

FeIipeSoares avatar Jun 23 '18 20:06 FeIipeSoares

Could you try to reduce No of items sync each time to 33?

inDream avatar Jun 25 '18 09:06 inDream

Hi a number of my assoicates using the published version in the store are getting this 502 error and their main instragram accounts stop working. They get this in console

instagram

It does seem to be some sort of authorisation issue related to the use of this plugin. As it only happens when they use an account and the this plugin.

The instagram page starts to load but stalls due to the above error.

instagram screen

once the instagram account has broken there is no fixing it short of deleting it and starting over again. Just unistalling the plugin does not solve it.

markhunte avatar Aug 13 '18 09:08 markhunte

Anyone got any ideas how to fix this...!!??

markhunte avatar Aug 21 '18 07:08 markhunte

my idea is updating feed from profile page, i changed query_hash and used user_id Extension working fine

FeIipeSoares avatar Aug 21 '18 08:08 FeIipeSoares

Hi @cucucucu2

Thanks for your answer, Can you explain it in a bit more detail including where you did this.. we are using the extension from the app store and not a compiled clone..

markhunte avatar Aug 21 '18 13:08 markhunte

@markhunte Could you try logout, clean cache (Ctrl + F5) and login again, then go to chrome://extensions/ reload the extension?

@cucucucu2 Could you give me more detail about update feed from profile?

inDream avatar Aug 23 '18 14:08 inDream

I edited this.query_hash = 'd6f4427fbe92d846298cf93df0b937d3'; to this.query_hash = '6305d415e36c0a5f0abb6daba312f2dd';

and manually put id from profile

  feed(oldCount, total) {
    let url = null;
    if (this.query_hash) {
      const data = JSON.stringify({
        fetch_media_item_count: this.syncEach,
        fetch_media_item_cursor: this.lastCursor,
        fetch_comment_count: 4,
        fetch_like: 10,
        has_stories: false,
      });
      url = `hash=${this.query_hash}&variables=${encodeURIComponent(data)}`;
    } else {
      url = `id=${this.query_id}&` +
        `fetch_media_item_count=${this.syncEach}&` +
        `fetch_media_item_cursor=${this.lastCursor}&` +
        'fetch_comment_count=4&fetch_like=10';
    }
    return this.getJSON(`graphql/query/?query_${url}`).then((body) => {
      const feed = body.data.user.edge_web_feed_timeline;
      this.lastCursor = feed.page_info.end_cursor;
      this.storeItem(feed.edges);
      const count = oldCount - 1;
      console.log(`Synced ${total - count}/${total} feed.`);
      chrome.browserAction.setBadgeText({ text: `${total - count}/${total}` });
      if (count > 0 && feed.page_info.has_next_page) {
        return pdelay(2000).then(() => {
          this.feed(count, total);
        });
      }
      return chrome.browserAction.setBadgeText({ text: '' });
    });
  }

to

feed(oldCount, total) {
    let url = null;
	var that = this;
setTimeout(function() {
    if (that.query_hash) {
      const data = JSON.stringify({
        id: 000000000, // profilePage_
		first: that.syncEach,
        after: null,
      });
      url = `hash=${that.query_hash}&variables=${encodeURIComponent(data)}`;
    }
    return that.getJSON(`graphql/query/?query_${url}`).then((body) => {
      const feed = body.data.user.edge_owner_to_timeline_media;
      that.lastCursor = feed.page_info.end_cursor;
      that.storeItem(feed.edges);
      const count = oldCount - 1;
      console.log(`Synced ${total - count}/${total} feed.`);
      chrome.browserAction.setBadgeText({ text: `${total - count}/${total}` });
      if (count > 0 && feed.page_info.has_next_page) {
        return pdelay(1000).then(() => {
          that.feed(count, total);
        });
      }
      return chrome.browserAction.setBadgeText({text: '1'});
    });
				}, 2000);
  }

I can't explain with very details due i not speak english very well i have changed other lines, you can see my modification to you update to next version

https://github.com/cucucucu2/igsync

FeIipeSoares avatar Aug 23 '18 15:08 FeIipeSoares

@cucucucu2 Thanks for your help. I've fixed it at 24ad385936f43a40867fed01710549daf3d3442b. Could you help me check is version 0.0.4.10 fixed your issue?

inDream avatar Aug 23 '18 20:08 inDream

Will do. Thanks for looking at this. While I test it are you able to explain the issue.. Cheers

markhunte avatar Aug 23 '18 22:08 markhunte