XInsta icon indicating copy to clipboard operation
XInsta copied to clipboard

Broken push notifications

Open shadow443 opened this issue 4 years ago • 3 comments

Hi, I recently had trouble downloading push notifications. Apparently it happens when there are 2 accounts connected in the Instagram application. With 1 account the notifications are downloaded correctly.

  • It seems that it is because the user in the notification bar appears in parentheses (user).
  • I use the latest version of xinsta 2.2.1 / IG v98.0.0.15.119 and also test 127.0.0.30.121
  • Attached the error.txt for the 2 types of situations:
  • Account_Name = My account
  • Account_Name_Friend = My friend's account that I want to download the image.

2 accounts connected to instagram app: (Image does not download):

  • 20201011_205954 - Hooked 20201011_205954 - GOt it: {"a":"https://scontent.cdninstagram.com/v/t51.2885-19/(I deleted this part)...&oe=5FAECC35","SuppressBadge":"1","m":"(Account_Name): Account_Name_Friend acaba de publicar una foto.","collapse_key":"post",(I deleted this part)... # The Account_Name appears in parentheses followed by the name of my friend's account: Account_Name_Friend 20201011_205954 - URL: https://www.instagram.com/(Account_Name): # The same thing happens here 20201011_205955 - Getting Post URL Failed - java.io.FileNotFoundException: https://www.instagram.com/(Account_Name): 20201011_205955 - Post URL Tried - https://www.instagram.com/(Account_Name): 20201011_205955 - Download Error - java.io.FileNotFoundException: /MYSTORAGE_PATH/(Account_Name):/(Account_Name):_2417938819243248126_3024245564&media_id=2417938819243248126_3024245564.jpg (No such file or directory) # In this part I only hide my storage path, the rest is as it appears in the log.

1 account in instagram app. (The image is downloaded):

  • 20201011_210321 - Before Hooked - Notification 20201011_210321 - Hooked 20201011_210321 - GOt it: {"a":"https://scontent.cdninstagram.com/v/...(I deleted this part)","bc":"{"dt":0}","c":"post","sound":"default","i":"https://scontent.cdninstagram.com/v/t51.2885-(I deleted this part)"... # My "Account_Name" no longer appears here. 20201011_210322 - URL: https://www.instagram.com/Account_Name_Friend 20201011_210322 - Getting Post URL Failed - java.lang.ArrayIndexOutOfBoundsException: length=1; index=1 20201011_210322 - Post URL Tried - https://www.instagram.com/Account_Name_Friend

I hope you understand, my English is not very good: I think that when there are two instagram accounts in the notifications they appear in parentheses (I don't know if this happened before) and Xinsta gets confused and cannot "create" the image in the directory because it appears in parentheses.

shadow443 avatar Oct 12 '20 14:10 shadow443

I am looking into this now. This is due to how XInsta parses for the username in the notification's JSON.

iHelp101 avatar Oct 12 '20 23:10 iHelp101

Please try this Alpha APK.

https://github.com/iHelp101/XInsta/blob/master/XInsta-Alpha.apk

iHelp101 avatar Oct 16 '20 02:10 iHelp101

I still haven't had time to test the new alpha. The alpha that you left me here didn't let me receive instagram notifications. That is, my friend post a photo and the notification from Instagram did not appear.

shadow443 avatar Oct 18 '20 21:10 shadow443