View Issue Details

IDProjectCategoryView StatusLast Update
0014187MMASynchronizationpublic2019-11-07 10:30
Reporterpeke Assigned To 
PriorityurgentSeveritymajorReproducibilityunable to reproduce
Status assignedResolutionopen 
Product Version1.3.0 
Target Version2.1.0 
Summary0014187: Sync: MTP Sync Fail due the permission issues on SDCard
DescriptionUser experienced fail USB sync on SD Card that previously worked.

User Settings:
Moto X Play v6.0.1
MMW 1832

Sync Settings:
Playlists selection mask root to \Music\ folder

1. Sync fail like in MTP freeze but MMA shows SDCard/Music folder exists on device but it is not seen by either MMW nor Windows explorer.
2. We updated drivers for Moto X which allow us to delete newly created folders, but no access to Music folder.
3. After extensive testing we have found that even device can access and play tracks from SDCard that was previously in different device and not formatted on Moto X folders that were not created on Moto X are not propagated to either MMW nor Explorer.
4. Making creation of SDCard/Music/ folder fail (JAN-PC_MTPFail.LOG and first sync from JAN-PC1fail2workchgfldr3WorkafterRename.LOG).
5. After driver install we changed Destination root mask from \Music\ -> \Music2\ which allowed MMW to sync files without any problems (second sync from JAN-PC1fail2workchgfldr3WorkafterRename.LOG).
6. To pursue that approach user installed ES File explorer and renamed SDCard/Music -> SDCard/Music1 which magically made folder available in both MMW and Explorer.
7. Then we changed sync mask back to \Music\ and sync (and subsequent syncs) went OK without any issues (third sync from JAN-PC1fail2workchgfldr3WorkafterRename.LOG)

NOTE: I tried to replicate the behavior on several of my devices without success.
Additional InformationDVC-290-10718 Attached logs.
TagsNo tags attached.
Attached Files
usb_error_log.json (1,303 bytes)
Fixed in build

Activities

Ludek

2017-04-11 15:43

developer   ~0047770

Last edited: 2017-04-11 15:48

As discussed offline:

The workaround is to change the default sync folder from '/Music/' to '/My Music/' , but changing it by default would probably cause that third party players wouldn't see the music synced by MMW (to be tested by Peke)

Also, the workaround should be mentioned in corresponding KB article:
[Help] button from the sync error dialog goes to http://www.mediamonkey.com/mediamonkey-sync-missing-files

i.e. please add it to item 5) here: http://www.mediamonkey.com/support/index.php?/Knowledgebase/Article/View/165/1/android-some-synchronized-tracks-are-missing

peke

2017-04-13 07:16

developer   ~0047784

Last edited: 2017-04-13 07:16

As talked offline and confirmed by four users simple rename in device file manager gets MMW to see the Music folder over MTP.

I'm suggesting to add simple feature in Developers options (eg. "Regain access to SDCard Music") of MMA to do the same thing and if it fails it will give us even more feedback on SDCard state

Assign back to me so that I can updated KB articles.

marek

2017-04-26 04:41

developer   ~0047856

I have added a new developer preference to 1.3.0.696 . It renames Music folder to Music2 and back. It works on both writable SD cards and SAF SD cards.

It renames the folder on first external storage, usually SD card.

peke

2017-04-26 10:09

developer   ~0047858

Verified MMA 697

peke

2017-04-26 10:11

developer   ~0047859

Lowered priority to see if workaround in 696 work so that we can update info on solution information on MMW side.

peke

2017-05-03 10:31

developer   ~0047894

Another user confirmed that MMA option resolves the issue.

Is there any need for changing MMW notification on SDcard/Music/ Creation and or just to update KB article (Rusty?)

Ludek

2017-05-04 18:11

developer   ~0047914

Last edited: 2017-05-04 18:12

OK, so once renaming 'Music' to 'Music2' and back solves the issue then MMA should probably do this automatically:
a) on MMA install
b) once it finds that MMW cannot access the 'Music' folder

In case of b) MMW would need to write this info somewhere for MMA, but this wouldn't prevent the negative user experience that sync isn't working. So ideal solution would be if MMA could somehow predict the failure and repair it in advance. Not sure whether it is currently possible supposing that anyone of us cannot reproduce the issue?

But supposing that MMA has often updates then maybe applying the workaround right after _each_ MMA version update could be a solution??

marek

2017-06-09 11:27

developer   ~0048112

Btw, Peke, do you know whether it occurs strictly for Music folder or it can occur for Movies, or any other folder ?

We can add there some automatic procedure on install. Hopefully it won't fail during renaming back to Music from Music2. But it will fix Music folder only.

peke

2017-06-10 21:05

developer   ~0048114

Last edited: 2017-06-10 21:05

It can happen on any folder not related to Music.

I would not do that on each install but rather when MMW detects the problem.

I do not think It will fail, except media store is reading/preparing folder.

At least that is what my/used tests concluded.

marek

2017-06-14 17:51

developer   ~0048140

MMA cannot predict it. It is MTP refresh issue and MTP states and processes were always hidden for MMA.

MMA cannot rename all synced folders. Btw I think that it can occur for any subfolder too (for any album) - I admit that it won't have such consequences as for Music folder.

So I don't know how to effectively implement it. Maybe the best approach might be the b) approach, i.e. some repairing service that will try to rename all folders (this is btw. quite dangerous, because renaming over SAF really can fail and cause some unexpected results - it depends on device implementation). This service can be started by MMW signal or user request.

Ludek

2017-06-14 20:44

developer   ~0048142

Last edited: 2017-06-15 13:57

OK, so MMW could probably log MTP failures to a file, e.g. /MediaMonkey/files/usb_error_log.json and based on the log MMA could try to repair the corresponding folders.

The log could be e.g. JSON array like this:


[{
item: "/Music/ABBA/",
operation: "create",
error_code: 80004005
},{
item: "/Music/ABBA/Dancing Queen.mp3",
operation: "delete",
error_code: 80070490
}]


It will be also easier to analyze without a need for the users to manually generate MMW debug logs just to find that there was MTP error.

To be added to 4.1.17

Ludek

2017-06-15 13:24

developer   ~0048146

Last edited: 2017-06-15 13:48

Writing of usb_error_log.json added in 4.1.17.1838 and merged to MM5

Example is attached (is UTF-8 encoded) and is always log from the last USB sync, another USB sync will replace it by the new log. In case of success the log contains just empty array, i.e. []