Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problems after APT Upgrade
#21
(02-03-2024, 01:14 PM)Nutul Wrote:
(02-03-2024, 12:20 PM)Tim Curtis Wrote: ETA: The OP reported this error message 
Code:
"json.parse unexpected character at line 1 column 1 of the json data"

IIRC there is a legit back-end scenario in the genLibrary() routine where the presence of non-UTF8 characters in the song file metadata can result in json parse failing and an empty libcache_.json file.

Since I see no such message template anywhere, it looks like the response of the json.parse method directly from JQuery. This actually denotes an error in the data.

Yes it's prolly empty JSON data being returned by MPD to the front end thats causing the error to be thrown by the JSON parse function. See below.

Code:
// MPD metadata engine
function engineMpd() {
   $.ajax({
        type: 'GET',
        url: 'engine-mpd.php?state=' + MPD.json['state'],
        async: true,
        cache: false,
        success: function(data) {
            debugLog('engineMpd(): success branch: data=(' + data + ')');

            // Always have valid json
            try {
                MPD.json = JSON.parse(data);
               //console.log(MPD.json);
            }
            catch (e) {
                MPD.json['error'] = e;
            }


Why is it empty? Thats what needs to be reproducible in order to possibly improve the error handling and messages.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Messages In This Thread
Problems after APT Upgrade - by jbaumann - 01-30-2024, 12:58 PM
RE: Problems after Update - by Tim Curtis - 01-30-2024, 01:08 PM
RE: Problems after Update - by jbaumann - 01-30-2024, 01:16 PM
RE: Problems after Update - by Nutul - 01-30-2024, 02:03 PM
RE: Problems after Update - by jbaumann - 01-30-2024, 01:30 PM
RE: Problems after Update - by jbaumann - 01-30-2024, 02:33 PM
RE: Problems after Update - by jbaumann - 01-30-2024, 04:52 PM
RE: Problems after Update - by Nutul - 01-30-2024, 08:28 PM
RE: Problems after Update - by bitlab - 01-30-2024, 09:39 PM
RE: Problems after Update - by jbaumann - 01-31-2024, 10:19 AM
RE: Problems after Update - by Nutul - 01-31-2024, 11:24 AM
RE: Problems after Update - by Tim Curtis - 01-31-2024, 12:44 PM
RE: Problems after Update - by jbaumann - 02-14-2024, 07:27 AM
RE: Problems after Update - by ColinM - 02-02-2024, 06:11 PM
RE: Problems after Update - by Nutul - 02-02-2024, 06:53 PM
RE: Problems after APT Upgrade - by Nutul - 02-02-2024, 07:26 PM
RE: Problems after APT Upgrade - by the_bertrum - 02-03-2024, 11:22 AM
RE: Problems after APT Upgrade - by Nutul - 02-03-2024, 11:31 AM
RE: Problems after APT Upgrade - by Tim Curtis - 02-03-2024, 12:20 PM
RE: Problems after APT Upgrade - by Nutul - 02-03-2024, 01:14 PM
RE: Problems after APT Upgrade - by Tim Curtis - 02-03-2024, 02:20 PM
RE: Problems after APT Upgrade - by Nutul - 02-03-2024, 02:29 PM
RE: Problems after APT Upgrade - by Tim Curtis - 02-03-2024, 02:37 PM
RE: Problems after APT Upgrade - by ColinM - 02-03-2024, 08:36 PM
RE: Problems after APT Upgrade - by Tim Curtis - 02-03-2024, 10:01 PM
RE: Problems after APT Upgrade - by Nutul - 02-03-2024, 08:58 PM
RE: Problems after APT Upgrade - by bitlab - 02-14-2024, 06:54 PM
RE: Problems after APT Upgrade - by jbaumann - 02-15-2024, 04:21 PM

Forum Jump: