Open MapleAtMorning opened 1 year ago
The error URIError: The URI is malformed
indicates that you are trying to encode or decode a URI component that has an invalid format. This could be due to several reasons:
To resolve this issue, you should:
%20
.%25
.Here's an example of how you can replace a standalone percent character with its encoded form:
var str = "60% completed";
var uri_encoded = str.replace(/%/g, "%25");
console.log(uri_encoded); // "60%25 completed"
var decoded = decodeURIComponent(uri_encoded);
console.log(decoded); // "60% completed"
And if you're working with high and low surrogate pairs, make sure they are used correctly:
// Correct usage of surrogate pairs
encodeURI("\uD800\uDFFF"); // "%F0%90%8F%BF"
If you're using a function to decode, such as decodeURIComponent
, ensure that the input is a valid percent-encoded string:
// Correctly encoded URI component
decodeURIComponent("JavaScript_%D1%88%D0%B5%D0%BB%D0%BB%D1%8B"); // "JavaScript_шеллы"
If you're unsure about the validity of the URI or URI component you're working with, you can validate it before encoding or decoding. If the issue persists and you're getting this error in a context where the URI is provided by a third-party service or user input, it may be necessary to add error handling to catch the exception and deal with it appropriately, such as by logging the error or providing user feedback.
I know nothing about coding except that 8800 Blue Lick Rd should be protected.
Unfortunately this isn't my top priority right now and I really can't be bothered to work with this extremely jank ripped and modified code anymore. Hopefully someone with more experience and time is willing to fork it and continue it some day.
Unfortunately this isn't my top priority right now and I really can't be bothered to work with this extremely jank ripped and modified code anymore. Hopefully someone with more experience and time is willing to fork it and continue it some day.
Fair enough. I could give it a shot, although I don't know shit either, sadly. It can work. One day perhaps...
The fix for this is really simple. It has nothing to do with the malformed URI, it is just because the refresh request fails and the script does not know how to handle it. Go to showcase.js and comment out line 53404 and 53405. The downside is it will stop loading in the higher quality textures but that can be fixed as long as you return literally anything when it calls the API.
I see. Thanks.
The fix for this is really simple. It has nothing to do with the malformed URI, it is just because the refresh request fails and the script does not know how to handle it. Go to showcase.js and comment out line 53404 and 53405. The downside is it will stop loading in the higher quality textures but that can be fixed as long as you return literally anything when it calls the API.
Even after doing this it still occasionally has its moments where it locks the user in place and you can't move anymore unfortunately.
Watch the console when that happens. Once you find it, click the source and set a breakpoint. Then move around until it happens again. Once it happens again go up the stack until you find the function that called whatever broke and just remove it if its not important. If it is important you can add an override with the expected data and return it.
I genuinely have zero clue how to fix the malformed URI issue that plagues some tiles. trying to load their images locks you in place unable to move.