-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Error Logging #279
Comments
related #276 |
On the popup, it's hard to get more information about the general error shown. Perhaps the popup error can show an |
There are a lot of websites where the userscripts just stop working, and those errors seem to break the extension too. When this message ("Something went wrong") appears, clicking to retry (even many times) is usually useless. 3 things would be very useful to add:
|
Please provide device details to further help you with your issue: hardware, ios version etc... That error you are seeing is most likely unrelated userscript execution errors. The error you see, likely happens when one of the popup init function has an unresolved promise, which often means something went amiss on the swift/os side. The error that is caught is logged to the console.
There's not much room in the popup to add full details of the error log and probably not useful to most users. That's why the error is usually fully logged in the console. In my experience hitting the As far as error logging improvements go, which is likely unrelated to your issue:
Most errors are printed to the console as mentioned above. In order to access the console you'll need to plug your phone into your computer. The console will have the details of the error, for most errors, however in this case those details will probably not be useful.
Userscripts are isolated from each other and the failure of one script doesn't necessarily mean that all userscripts will fail to execute. That depends on how the user decides to inject their userscripts. Again, this error you are seeing is different than a simple userscript failing to execute.
This is a big ask and feature to implement. I don't have plans for anything like this, but if you'd be willing to contribute, let me know.
|
I'm using an iPad Pro (macOS-15.5-iPad8,11-arm-64bit-1TB). I have a 2Tb iCloud Drive, and the Userscripts folder is in the path: "iCloud Drive ▸ Userscripts". It contains 49 js userscripts. Almost 50% of the websites I navigate give me the crash issue. Unfortunately I cannot access the console log, because my computer is a linux machine and even libimobiledevice stopped working a long time ago after one of the latest iOS updates. I can only use the iPad. Is there a way to get a more meaningful error message? |
Not without having access to a computer running macOS. However, if you look at this issue you will see the error message that, usually, gets logged to the browser console and os console when that error appears. As you can see, the error that gets log is itself quite vague:
As far as I know that error can mean a number of things, but the only time I've seen it myself was when the memory limit was being hit before Apple increased it. in 15.0 it was 6mb but increased to 80mb in 15.1. I don't know if we can be certain it's the memory limit being hit, but it is certainly possible. Reducing the overall memory footprint of the extension would be useful regardless. |
Memory footprint? I have ~8 Mb of .js files in the userscripts folder. But some scripts load icons or external libs from remote servers. Is this enough to get over the 80Mb limit? |
@Emasoft it's possible, especially if all those scripts are being loaded at the same time, but this a guess since we can't properly debug the device also, when I talked about reducing the memory footprint, i meant to further optimize the ios extension where/if possible |
@quoid |
We may should also bring some errors of For example, I write a Since I'm using the key
I was using comments in the script and I didn't realize it had to be in JSON format, causing errors like:
|
I just got "failed to get remote content, invalid url" when trying to import https://github.com/quenhus/uBlock-Origin-dev-filter/blob/main/dist/userscript/google_duckduckgo/all.txt or https://raw.githubusercontent.com/quenhus/uBlock-Origin-dev-filter/main/dist/userscript/google_duckduckgo/all.txt on the latest macOS (13.4.1) and Safari (16.5.1). If that's not the real error I would really love to find out what it is. Here's a screenshot of Safari's console: ![]() Hopefully this isn't a basic user error when trying to import but I wouldn't know because I only see one line of explanation on how to add a remote filter list and it's pretty straightforward. Maybe the problem is that the file extension is not |
Yep -
|
Yikes. Is there a chance to modify the "Add remote" UI to allow all file extensions and also allow specifying what kind of remote file you are adding (CSS / JS)? |
I'd lean more towards allowing Alternatively, you could just copy and paste the code into a new entry (css/js). The |
That works too. Whatever is lowest friction and minimum risk for you.
Does it not automatically and periodically update the script when it's added as an URL? If not then yeah, just adding it inline is a fire-and-forget operation. But if it actually updates the script I'd still prefer that option -- if adding the above functionality is viable. |
In my opinion, there should be no support for If the source is provided as
Yes, currently we don't record install URL in any form, so there will be no updates. But this is planned to be supported in the future and tracked in #248. That is, update checking is currently implemented via |
I see. Well I already set it up inside my iCloud Drive in a dedicated directory and can see the userscript I wanted (and linked above) working both on my Mac and iPhone so I am good. IMO you should eventually imitate uBlock Origin however: namely allow the users to add URLs and periodically pull them and update the DB with their changes. For now I am good but I hope these last few comments outline a potential misunderstanding in the docs (i.e. when I see "Add URL" to me this automatically means "this URL will periodically be pulled and the local DB will be updated with its contents") and maybe a future feature. Your call. Thanks for clearing up the confusion. ❤️ |
Broadly, error logging needs to be improved. Specifically, errors that are delivered in the popup are not very useful.
The text was updated successfully, but these errors were encountered: