Author Topic: MB Wifi Sync issue: "Server not found"  (Read 4552 times)

HannibAlBundy

  • Newbie
  • *
  • Posts: 17
Hi,

MB Wifi Sync used to work for 2 years now on a Pixel 4a. I moved to android 11 and then android 12 smoothly, without having to follow BoringName's guideline and compile my own apk.

Wifi Sync doesn't work since I've changed my local network with a new wifi router (Huawei E5577). I've also updated to Android 13 in between, without trying to wireless sync on my old local network. I don't believe Android 13 is an issue at this stage though because I'm facing the error message "Server not found. Ensure MusicBee is running and Windows firewall is not blocking MusicBee".

I've tried many different thing and I'm now running out of idea. Please find below what I've checked so far:
* MB is running
* Local network is set to "private network" and IP addresses are in range "192.168.1.*"
* Network discovery and file sharing are activated
* Public folder sharing and media streaming service are activated
* Sharing secured with password is deactivated
* I do have a connexion open listening on port 0.0.0.0:27304
(sorry for the poor translation, I'm using a french Windows 10)

It is very frustrating because MB Remote app works perfectly fine.

When using the net

I'm desperate and will consider any suggestion :)

Many thanks

BoringName

  • Full Member
  • ***
  • Posts: 209
The issues from newer Android versions so far have just been permission issues with file system access. I haven't come across any issues locating the MB server.

So if you haven't changed anything on your windows machine, I would start with the router. See if there is an option to disable any firewall that might be present on the device.

From other peoples experience, if you do an update to a newer version of android while the MB wifi app is installed, it seems to migrate MB to work without having any issues with permissions.

But I think if you uninstall the MB wifi app and reinstall it, you will probably find it won't work anymore without the changes I listed in the other thread.

HannibAlBundy

  • Newbie
  • *
  • Posts: 17
Yes, for all the reasons mentioned I don't believe Android 13 is an issue at this stage.

Unfortunately there is no firewall or anything like this on the router, it is a very very basic 4G device.

Thanks anyway for the reply!

BoringName

  • Full Member
  • ***
  • Posts: 209
I'm not sure you can create a home network with a huawei 5577. They are just a hotspot device to provide internet to multiple devices, I don't think they provide interconnectivity between devices connected to it. I could be wrong though....

Try setting up your phone as a hotspot and connect the computer to that instead of the Huawei device and see if that allows the server to be found.

roth377

  • Newbie
  • *
  • Posts: 8
This has started to happen to me as well.  I'm not sure when it may have occurred, but it *may* have been around the same time I did my phone's latest security update.

I don't have a fix either, BUT I did find a "workaround".  I simply clear data/cache after a force stop.  Since the "setup" is so easy and I don't seem to see any negative effects, it's the best way I've found to get around the issue.

I'm pretty certain it's security related (and the wifi sync app just can't recognize that and appropiately handle the error, so I would ignore talks about "network error".

HannibAlBundy

  • Newbie
  • *
  • Posts: 17
Thanks for your replies guys.

The huawei 5577 definitely allows local network set up. I went in the configuration and you were right there was a firewall activated. Unfortunately, deactivating it doesn't change anything.

Using my phone as the hotspot offers less possibility. I've tried it but it doesn't work and even Musicbee Remote stops working. Is it something that actually worked? I'm happy to give it a better try if this is someone's working set up.

@roth377: I'll try to clear data/cache after a force stop on the android app. Bur prior to this, could you tell me if you use your own apk as suggested by BoringName or if you're still on the playstore version? Also, do you have to clean the android app every time you want to use it or one time was enough?

Many thanks,
Adrien.

BoringName

  • Full Member
  • ***
  • Posts: 209
Using my phone as the hotspot offers less possibility. I've tried it but it doesn't work and even Musicbee Remote stops working.

I read that initially and thought why the hell didn't you mention the remote app was working. But looking back at your original post, you did mention it and I just missed it. Sorry.

So if the remote app is working that means your phone can connect to your PC, it just has an issue specific to the music bee server.

Hopefully roth377 suggestion works for you.

Have you tried manually adding the IP address of the PC into the music bee app?

roth377

  • Newbie
  • *
  • Posts: 8
@roth377: I'll try to clear data/cache after a force stop on the android app. Bur prior to this, could you tell me if you use your own apk as suggested by BoringName or if you're still on the playstore version? Also, do you have to clean the android app every time you want to use it or one time was enough?
I honestly don't remember if I found an .apk on the forum (via developer) or if it was on the play store.  My memory just isn't that great :)

As for an update on my part -- I don't seem to have to do it EVERY time now, but it's definitely often.  It is unfortunate, but (as mentioned), the clearing of data/cache is a quick workaround and doesn't seem to have negative impact on the syncing (it still does the reverse sync of all music I had listened to and such).

I wish I could find some more concrete correlation, but I'm fairly certain there was:
- no known Windows updates around that time
- no network changes in my house
- it WAS around the same time as a recently security update on my phone (I have a OnePlus, and am on the August security update)

I know it's not much to go on, but I would suggest  the clear app data/cache before any additional network changes, only because I''m hopeful it would at least provide you some proof that it's unlikely your network/firewall thats' the cause (because if it works after you wipe data/cache, it would tell me the network can send the information to phone/computer with no problem)

I did also check to make sure my sycn application on the phone had no optimization on it (to make sure the phone wasn't killing a process or removing permissions without my explicit direction.

I know my suggestion won't "fix" your problem -- but hopefully gives you a workable solution while you (and I) still try to find the source of the problem.

Shougun

  • Newbie
  • *
  • Posts: 14
Had a same issue, where it worked fine for a long period of time (after add permissions and using a custom apk), suddenly it couldn't find the server. Clearing data fixed that. I hope I don't have to do it over and over though. Also noting that many ratings I had made before clearing the data are not being transferred over now until I make changes to the file (like if I rated it 1 before when it was broken, then cleared app data, I have to modify it to like .5 or something so then the app will recognize it needs to share back the rating).

roth377

  • Newbie
  • *
  • Posts: 8
One thing I'm going to keep an eye on as a possible root cause:

I double-checked my permissions on the wifi-sync app, and they *had* changed (which itself is bugging me, because I explicitly defined them and then excluded it from system-attempted optimizing).

The storage permission had been removed.

I reenabled, and I haven't had the issue in a couple of days.  I'm going to monitor usage for the next few days.  I can't quite see a correlation between what I "fixed" and the error message, so it's either a) unrelated, and my problem may resurface, or b) the root cause, and perhaps some error handling improvements are needed in the app.

HannibAlBundy

  • Newbie
  • *
  • Posts: 17
Hi, and thanks again for all your replies.

App permissions wasn't an issue so far, they hadn't changed and they were all set up.

I did try to wipe the cache: no success. Then, I tried to wipe the data, and it did what I was expecting based on your last comments: Server is found, but I'm now facing the Android 12+ issue regarding the storage access. @roth377: wiping data must remove and "change" your permissions. Also, you should be able to check in the app system infos if you installed it from the playstore or not. I'd bet this is not the case.

I will now have a deeper look into BoringName custom apk and let you know.

Cheers.

HannibAlBundy

  • Newbie
  • *
  • Posts: 17
Hi,

So BoringName's workaround did the trick, thanks a lot for your work!

Nevertheless, I'm facing another issue regarding the files paths I don't recall to ever had. The only memory troubling me is I recall selecting the main internal storage while setting up MBWifi while I had to select the folder "gmmp" this time. I might be totally wrong though. As a matter of fact, my folder "Music" is not a descendant of the folder "gmmp", but it used to work.

If someone is willing to look into it it would be very much appreciated. Please find below the errors and my conf:


Quote
2022-09-16: Pixel 4a;  13;  2.2
07:10:34: exists: content://com.android.externalstorage.documents/tree/primary%3Agmmp/document/primary%3AMusic%2FSingles%2FS%C3%A9rgio%20Mendes%20%26%20Brasil%20'66%20-%20Mais%20Que%20Nada.ape: java.lang.SecurityException: Document primary:Music/Singles/Sérgio Mendes & Brasil '66 - Mais Que Nada.ape is not a descendant of primary:gmmp
07:10:34: exists: content://com.android.externalstorage.documents/tree/primary%3Agmmp/document/primary%3AMusic%2FSingles: java.lang.SecurityException: Document primary:Music/Singles is not a descendant of primary:gmmp
07:10:34: exists: content://com.android.externalstorage.documents/tree/primary%3Agmmp/document/primary%3AMusic: java.lang.SecurityException: Document primary:Music is not a descendant of primary:gmmp
07:10:34: createFolder: Music: java.lang.SecurityException: Document primary: is not a descendant of primary:gmmp
07:10:34: receiveFile: java.lang.SecurityException: Document primary: is not a descendant of primary:gmmp: file=Music/Singles/Sérgio Mendes & Brasil '66 - Mais Que Nada.ape
07:10:34: exists: content://com.android.externalstorage.documents/tree/primary%3Agmmp/document/primary%3AMusic%2FSingles%2FS%C3%A9rgio%20Mendes%20%26%20Brasil%20'66%20-%20Mais%20Que%20Nada.ape: java.lang.SecurityException: Document primary:Music/Singles/Sérgio Mendes & Brasil '66 - Mais Que Nada.ape is not a descendant of primary:gmmp
07:10:34: exists: content://com.android.externalstorage.documents/tree/primary%3Agmmp/document/primary%3AMusic%2FSingles%2FS%C3%A9rgio%20Mendes%20%26%20Brasil%20'66%20-%20Mais%20Que%20Nada.ape: java.lang.SecurityException: Document primary:Music/Singles/Sérgio Mendes & Brasil '66 - Mais Que Nada.ape is not a descendant of primary:gmmp
07:10:34: exists: content://com.android.externalstorage.documents/tree/primary%3Agmmp/document/primary%3AMusic: java.lang.SecurityException: Document primary:Music is not a descendant of primary:gmmp
07:10:34: createFolder: Music: java.lang.SecurityException: Document primary: is not a descendant of primary:gmmp
07:10:34: receiveFile: java.lang.SecurityException: Document primary: is not a descendant of primary:gmmp: file=Music/#Test - Test/01 - Immensità.mp3
07:10:34: exists: content://com.android.externalstorage.documents/tree/primary%3Agmmp/document/primary%3AMusic: java.lang.SecurityException: Document primary:Music is not a descendant of primary:gmmp
07:10:34: createFolder: Music: java.lang.SecurityException: Document primary: is not a descendant of primary:gmmp
07:10:34: receiveFile: java.lang.SecurityException: Document primary: is not a descendant of primary:gmmp: file=Music/#Test - Test/02 - La nostra fine.mp3
07:10:35: exists: content://com.android.externalstorage.documents/tree/primary%3Agmmp/document/primary%3AMusic: java.lang.SecurityException: Document primary:Music is not a descendant of primary:gmmp
07:10:35: createFolder: Music: java.lang.SecurityException: Document primary: is not a descendant of primary:gmmp
07:10:35: receiveFile: java.lang.SecurityException: Document primary: is not a descendant of primary:gmmp: file=Music/#Test - Test/03 - Mistero.mp3
07:10:35: exists: content://com.android.externalstorage.documents/tree/primary%3Agmmp/document/primary%3AMusic: java.lang.SecurityException: Document primary:Music is not a descendant of primary:gmmp
07:10:35: createFolder: Music: java.lang.SecurityException: Document primary: is not a descendant of primary:gmmp
07:10:35: receiveFile: java.lang.SecurityException: Document primary: is not a descendant of primary:gmmp: file=Music/#Test - Test/04 - Conchiglie.mp3


Many thanks

BoringName

  • Full Member
  • ***
  • Posts: 209
Yeah, I don't know what you have done but you shouldn't be selecting the GMMP folder in the wifi app. You need to select your music folder and make sure the wifi app has full file permissions before you try and select a folder.

HannibAlBundy

  • Newbie
  • *
  • Posts: 17
Hi,

If I select my music folder it doesn't work. I'm facing the issue where the app is looking for gmmp playlists' folder:
Quote
2022-09-19: Pixel 4a;  13;  2.2
14:04:29: locate: search=192.168.1., exclude=192.168.1.101
14:04:29: ping: socket ok=/192.168.1.100
14:04:29: ping: hello=MusicBeeWifiSyncServer/1.0
14:04:29: ping: matched=/192.168.1.100,status=OK
14:04:30: ping: socket ok=/192.168.1.100
14:04:30: ping: hello=MusicBeeWifiSyncServer/1.0
14:04:30: ping: matched=/192.168.1.100,status=OK
14:04:54: sendPlaylists: java.lang.SecurityException: Document primary:gmmp/playlists/ is not a descendant of primary:Music
14:04:55: getFiles: java.lang.SecurityException: Document primary:gmmp/playlists/ is not a descendant of primary:Music: path=gmmp/playlists/

But again, according to my settings in Musicbee desktop app that you can see just above, I guess I should select the root folder on my phone but this is not possible anymore:

Then, the android app should look into "*/Music" folder as stated in the desktop app, and selecting the player "GoneMad" tells the android app to look into "*/gmmp/playlists"


Do you think it is a new security restriction from Android 13? How do people using GMMP do?

Many thanks

BoringName

  • Full Member
  • ***
  • Posts: 209
Change the playlists field from "gmmp\playlists\" to "Music\Playlists\"

Clear the app cache\data and select the "Music" folder the next time you run it.

From memory the first sync might fail because the music\playlists folder doesn't exist initially, just running a second sync should be successful. You can bypass this problem by just manually creating the music\playlists folder using the files app on the phone.

The reason I think you are getting an error is the app expects the playlist folder to be a descendant of the music files folder. The changes I suggest above should fix this.

I think you are also confused about what selecting "GoneMad" does. It just tells the app which music player you are using so it can request play count and ratings data from that specific app. It doesn't use that setting to find music or playlists.