marzika / Snapprefs

A project which offer enhanced features for Snapchat throught the Xposed Framework.
GNU General Public License v3.0
272 stars 82 forks source link

Saving button fails on specific stories repeatedly (even for multiple phones). #336

Closed psylenced closed 7 years ago

psylenced commented 7 years ago

Log_2016-11-21_18-03-08-1.txt

I'm having an issue where some stories for a user refuse to save, where as others save perfectly. This is repeated when I try again in "all stories" section, after reboot and also repeated on multiple phones.

It's always the exact same stories that fails each time, even when trying on multiple phones. This seems to be an issue with the particular story's data perhaps.

It also seems to happen with about 1 user out of 20, so not on a large scale.

Saving is set to "save button" for stories.

Expected Behavior

View user aui.'s story who has 3 story items: 1st story - press save button (saves). 2nd story - press save button (saves). 3rd story - press save button (saves).

Repeat: 1st story - press save button (story exists). 2nd story - press save button (story exists). 3rd story - press save button (story exists).

Current Behavior

View user aui.'s story who has 3 story items: 1st story - press save button (saves). 2nd story - press save button (nothing happens) 3rd story - press save button (nothing happens).

Repeat: 1st story - press save button (story exists). 2nd story - press save button (nothing happens) 3rd story - press save button (nothing happens).

Steps to Reproduce (for bugs)

  1. Start snapchat
  2. Move over to stories
  3. Click user aui.'s name
  4. Press save button on each of the 3 story items that show up

Your Environment

Below is logcat: Log_2016-11-21_18-03-08-1.txt

psylenced commented 7 years ago

In the log it has MediaType set to null for some stories. Perhaps that is related to this issue.

Andrerm124 commented 7 years ago

From a quick look it seems that additional key stripping is necessary for certain stories.

https://app.snapchat.com/bq/storybook?story_id=fQ7TEEQKxEMMDWhe_uWhupg&t=3&mt=1NQA3eBGmXxewXMBIxAIQnAAAArh-7stlCZx_dAViEzAJ5AViEy_xSAAFRgA

Should be stripped to: NQA3eBGmXxewXMBIxAIQnAAAArh-7stlCZx_dAViEzAJ5AViEy_xSAAFRgA

(Key has slightly been modified for potential privacy concerns)

psylenced commented 7 years ago

It seems to be a lot more prevalent tonight. Yesterday it only affected a handful of users, today it's moved up to affect 1 in 5.

It's also strange how there is no separator between the 1 and the key.

Is the fix simply to add the following code?

if( finalOutput.contains("#") )
{
    String[] split = finalOutput.split("#");

    if( split.length > 0 )
        finalOutput = split[0];
}

// Fix:
if( finalOutput.contains("&mt=1") )
{
    String[] split = finalOutput.split("&mt=1");

    if( split.length > 1 )
        finalOutput = split[1];
}

I might actually do a full logcat for all stories tonight and see if there are any variations, try and capture them all.

psylenced commented 7 years ago

log_https2.txt

Andrerm124 commented 7 years ago

I think currently the logs output the key BEFORE the stripping (Something I'm going to change). So I'm just going off of memory, but I don't recognise that kind of key so I'm assuming it's not handled

Andrerm124 commented 7 years ago

I'll take a look when I get in and make some changes to the system

psylenced commented 7 years ago

No problems, if you need any further captures, let me know.

It seems to be mostly limited to videos, although it may have happened once or twice with an image.

psylenced commented 7 years ago

Ran the latest build (stable 88) and went back over the stories that failed.

All looked like they are now working properly. So can confirm the above fix resolved the issue.