marzika/Snapprefs

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

Closed this issue · 8 comments

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

  • Version used: stable build 86.
  • Android version: 6.0.1
  • Xposed version: Framework version 86.1 (custom build by wanam / 20160904) for Samsung S7 edge
  • Root version and type (SuperSU, phh, etc. and system or systemless): SuperSU
  • Do you use any root/xposed hiding? If yes, which?: No

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

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

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)

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.

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

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

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.

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.