Coder Social home page Coder Social logo

Comments (5)

Emilot avatar Emilot commented on May 22, 2024

Error message:

InvalidCharacterError: String contains an invalid character mympd.min.js:113
addMenuItem
http://192.168.0.207/js/mympd.min.js:113:135
showMenu
http://192.168.0.207/js/mympd.min.js:115:135
appInit/<
http://192.168.0.207/js/mympd.min.js:36:372

If i click on then song name, the song added successfully in the queue.
From Menu at the left, it throws the error i mention. Even in the queue(if i added it through click on the name as i mention) i cannot remove the song if i wanted to, because when i click on the "+", throws the same error.

from mympd.

jcorporation avatar jcorporation commented on May 22, 2024

Can you test it with non-minified files and post the error here?

from mympd.

Emilot avatar Emilot commented on May 22, 2024

One is at line 1716, which is this function:
function addMenuItem(href, text) {
return '<a class="dropdown-item" href="#" data-href='' + btoa(JSON.stringify(href)) + ''>' + text +'';
}

The other is 1743 line:
menu += addMenuItem({"cmd": "appendQueue", "options": [type, uri, name]}, 'Append to queue') +

and the other is 434 line:
else if (event.target.nodeName == 'A') {
showMenu(event.target, event);
}

InvalidCharacterError: String contains an invalid character mympd.min.js:1716
addMenuItem
http://192.168.0.207/js/mympd.min.js:1716:63
showMenu
http://192.168.0.207/js/mympd.min.js:1743:17
appInit/<
http://192.168.0.207/js/mympd.min.js:434:13

from mympd.

jcorporation avatar jcorporation commented on May 22, 2024

It seems it is a unicode problem of base44 encode and decode: https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding

I implemented the solution 1 in linked document in the devel branch. Can you please test it?

from mympd.

Emilot avatar Emilot commented on May 22, 2024

Case closed. One more annoying bug goes down.

Thanx JC. Great work.

from mympd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.